4 ms·
Check ydotool for an xdotool replacement: https://github.com/ReimuNotMoe/ydotool https://github.com/ReimuNotMoe/ydotool The lack of a common screenshot protoco
by cycloptic 6y ago
Check ydotool for an xdotool replacement: https://github.com/ReimuNotMoe/ydotool https://github.com/ReimuNotMoe/ydotool
The lack of a common screenshot protocol isn't related to security. The desktops just haven't been able to agree on a common protocol (yet?)
- pmoriarty 6y agoydotool only supports a tiny fraction of xdotool's features. ...and that's unlikely to improve much any time soon, since, according to ydotool's README: "Since Jun, 2019, I have little time to maintain this project"
- cycloptic 6y agoCheck the paragraphs below that where the developer asks for help either by donations or by pull requests. I understand you probably don't want to do that because you're fine with xdotool for now, but the options are there should you need them.
- pmoriarty 6y agoOk, so I can write the features ydotool is missing or pay someone to do it. I guess those options are the same for any software. Either way, ydotool is clearly not a viable replacement for xdotool right now, if it will ever be.
- cycloptic 6y agoIt likely won't ever be a drop-in replacement because a lot of X operations don't really make sense in Wayland. (Even in X, xdotool isn't perfect and a lot of its commands won't work if your window manager doesn't support the right hints) Unless you feel like volunteering to make a standard for this, you'll get the best mileage out of using an API specific to your compositor rather than waiting for someone else to come up with a standard. I know GNOME exports its internals with a javascript interface, and Sway has a way to run various commands using a JSON interface too.
- nsajko 6y agoYou're missing the point, which is that all of this should have been a part of Wayland, because "the desktops" will never agree on a common protocol. Also, you're wrong that this isn't related to security, I can't be bothered to dig up some quotes right now, but it is/was actually very common to explain the lack of a screenshot feature on Wayland with security, and even to dismiss the feature altogether as a security issue.
- cycloptic 6y agoMaking it a part of Wayland would not have accomplished much. If the desktops really couldn't agree on a common protocol then you would end up with a bad standard that no desktop implements. See wl_shell for another reason why doing this in the core protocol would have likely been a mistake. I don't know who was painting it as a security issue but they're mostly wrong. The security issue is in restricting use of those capabilities to only privileged applications. Maybe other (embedded?) compositors left that out entirely for security reasons, but GNOME and KDE always had plans to include screenshots, and wlroots has it too. Weston even had its screenshooter protocol for a while now but the other desktops decided not to use it and went their own way, for various reasons. (Full-featured screen capture is actually not as simple as you'd think, and it gets messier when pipewire and zero-copy capturing are on the table) Edit: Check here for some background https://gitlab.freedesktop.org/wayland/wayland/-/issues/32 https://gitlab.freedesktop.org/wayland/wayland/-/issues/32