4 ms·
This was the question I came to ask. I've been a Wayland avoider because for me there was nothing "broken" to be fixed. Occasionally, I've enjoying playing aro
by jrm4 3y ago
This was the question I came to ask. I've been a Wayland avoider because for me there was nothing "broken" to be fixed.
Occasionally, I've enjoying playing around with window management and hacking with WMs, using stuff like this and/or xdotool and wmctrl.
I was curious as to what this might be like in Wayland-land? Do tools like this even exist?
- shmerl 3y agoYes: https://github.com/ReimuNotMoe/ydotool https://github.com/ReimuNotMoe/ydotool
- yjftsjthsd-h 3y ago>> Occasionally, I've enjoying playing around with window management and hacking with WMs, using stuff like this and/or xdotool and wmctrl. Ydotool readme: > Currently implemented command(s): > type - Type a string > key - Press keys > mousemove - Move mouse pointer to absolute position > click - Click on mouse buttons So... No.
- shmerl 3y agoFor what xdotool does - pretty much a substitute. For anything else you need a compositor specific tool. KWin scripts or something might work for KDE: https://develop.kde.org/docs/plasma/kwin/ https://develop.kde.org/docs/plasma/kwin/
- yjftsjthsd-h 3y ago> For what xdotool does - pretty much a substitute. No; for just the input functions, and that only if you're not using `--window`, it's a substitute. But xdotool is a lot more than that. > For anything else you need a compositor specific tool. Yes, exactly. For the things that were asked for, your best hope is do see if your particular compositor deigned to provide the API surface, and then if it did, write something that uses those non-portable APIs to do what you want.
- shmerl 3y agoMakes perfect sense for it to be something that interacts with the compositor. So KWin does expose such API. But that's not part of Wayland itself or its protocols. Want to make it easy? Use KDE which cares about flexibility and write scripts for it. Otherwise - probably tough luck, not sure how much other compositors even care about such things.
- yjftsjthsd-h 3y agoOr I could just use X11, where this is a solved problem using a single API that works on arbitrary window managers / desktop environments. The only problem is people keep showing up to tell me that I need to stop using it and use their feature-poor alternative.
- shmerl 3y agoYou couldn't really since it's DOA. Otherwise you'd be stuck with unsupported path.
- donio 3y agoBesides the limitations others have mentioned users should be aware that since ydotool works by writing events directly into /dev/uinput the input will go to whatever happens to be focused at the moment. It will happily type your secrets into a chat window if you move the mouse at the wrong time. There is no way to do the equivalent of xdotool type --window 0x600005 "my important input"
- shmerl 3y agoIt's not like xdotool is so secure in the first place. X11 is one huge hole from that perspective. Anything can read anything and all your important input can be read by some other window anyway.
- bee_rider 3y agoThis is a totally different issue; Wayland gives up the ability to provide user-aid that prevents an obvious human error. This is not really a security issue, it is a usability issue that can just happen to allow a user to make a security slip-up. In exchange, Wayland gains… well, nothing really, the idea is that it’ll protect users from malicious programs peeking at other windows on their computer. But in that case situation is already FUBAR, there’s no way to protect a computer that is already running attacks locally on itself.
- shmerl 3y agoThe idea is that to worry about security in something broken by design is a folly.
- bee_rider 3y agoRight, the idea of running hostile programs on your system is broken by design, Wayland is engaging in folly by trying to protect against it. X11 gives up that pointless quest and, by doing so, at least it can provide some extra user-assistance features (including ones that can help mitigate security related user errors).
- epoxia 3y agoMy understanding is that "window managing" tools like this are not possible due to how wayland handles information. Pro: More secure than x11, Con: I can't use wayland. Aside from investing a lot of time learning how to use a tiling wm I dont see how I'm going to get over my addiction to minimizing only the active window. ( xdotool windowminimize $(xdotool getactivewindow) )
- ElectroBuffoon 3y agoFor improved security with X11, try firejail+Xpra, or Qubes OS. They will not just help in the graphical front, but also others like processes and storage isolation.