News for hackers. Stuff that matters.
Re:Phoenix: A modern X server written from scratch in Zig by mikkupikku on Thursday December 25, 2025 @03:07AM (#46382947)
What's the simple way for a bash script to get the title of the currently focused window? In X this is easy and the bash script will work with every DE. In Wayland you have to write a different solution for each compositor/DE.. Prove me wrong, please.

It shouldn't be hard, all I want to do is fuzzy match window titles to named audio streams in pipewire, but "Oohh noo that's a security flaw!" say the patronizing Wayland developers who care more about making their own lives as developers simple than supporting basic desktop functionality.

Re:Phoenix: A modern X server written from scratch in Zig by imtringued on Thursday December 25, 2025 @05:51AM (#46383629)
> In X this is easy and the bash script will work with every DE. In Wayland you have to write a different solution for each compositor/DE.. Prove me wrong, please.

I don't know what you expect people to prove other than that X and Wayland both have the same problem but since X is so complicated there is only one implementation to begin with, which makes it look like X has solved the problem even though it suffers from exactly the same problem.

Re:Phoenix: A modern X server written from scratch in Zig by mikkupikku on Thursday December 25, 2025 @08:56AM (#46384427)
There are in fact multiple implementations of X and xdotool works with all of them. Typical Wayland advocate, doesn't know what the fuck he's talking about while telling people to just ignore the problems they have with Wayland, probaby because you don't even understand the problem in the first place. Why did you even respond to me? To insult me? To waste my time?
Re:Phoenix: A modern X server written from scratch in Zig by yjftsjthsd-h on Thursday December 25, 2025 @09:07AM (#46384485)
> There are in fact multiple implementations of X and xdotool works with all of them

Are there non-Xorg X servers for Linux that are usable? Asking because I'd like to try them if they exist

Re:Phoenix: A modern X server written from scratch in Zig by saint_yossarian on Thursday December 25, 2025 @06:35AM (#46383778)
> all I want to do is fuzzy match window titles to named audio streams in pipewire,

> basic desktop functionality

I feel your pain, but find your idea of "basic" functionality amusing.

That said, `pw-dump` / `pactl` will give you client names, which often match the window titles.

Re:Phoenix: A modern X server written from scratch in Zig by mikkupikku on Thursday December 25, 2025 @08:52AM (#46384397)
I know how to get the audio stream names, the problem is the window titles. With X it's easy, just call xdotool. I'm sure it's probably easy enough on Windows and MacOS too. Wayland is the weird one for making focused window titles privileged information.

Anyway, I do think I've created what should be considered basic desktop functionality here, a simple hotkey that mutes or otherwise changes the volume only of the focused window. Every desktop should have it.

This is just one of the tools I've made for myself with X which I do not want to do without and this makes Wayland a non-option for me. If I can't use X and can't replicate things like this with Wayland, then maybe I should switch to MacOS at that point because the dream of controlling my own computer seems like it's dying anyway.

Re:Phoenix: A modern X server written from scratch in Zig by KerrAvon on Thursday December 25, 2025 @10:50AM (#46385076)
Wayland is approximately correct in this case and Windows and Mac are behind the security curve for bincompat reasons; window titles certainly leak PII. There should be a way to do it, but it is sensitive information.
Re:Phoenix: A modern X server written from scratch in Zig by wpm on Thursday December 25, 2025 @12:14PM (#46385689)
Is there any documented attack on macOS or Windows that utilized window title information?
Re:Phoenix: A modern X server written from scratch in Zig by michaelmrose on Monday December 29, 2025 @12:45PM (#46423167)
Never in history. If you have software running on your system attacking you then you have so many more issues than the adversary knowing your window titles.
Re:Phoenix: A modern X server written from scratch in Zig by rcxdude on Thursday December 25, 2025 @06:37PM (#46387769)
Sure, but again there's no interest in actually making a standard way to do it. I can understand it being something that arbitrary applications probably shouldn't be able to access, but that somehow turns into no way to do it, or complete fragmentation where every DE does it with arbitrary differences (or, more realistically, some DEs support it and others don't).
Re:Phoenix: A modern X server written from scratch in Zig by yjftsjthsd-h on Thursday December 25, 2025 @06:39PM (#46387780)
Okay; is there a way to do it? Can I, the user, decide that I do actually want a program to see titles? Or is it still impossible because 17 years isn't enough to implement utterly trivial APIs that people want?
Re:Phoenix: A modern X server written from scratch in Zig by account42 on Thursday January 08, 2026 @05:35AM (#46539483)
You are aware that by default programs you run have access to your entire home directory, right? Applying any restrictions to them in the windowing protocol is security theater.