News for hackers. Stuff that matters.
Re:Show HN: Bonk, a command-line tool for X11 window management by yjftsjthsd-h on Sunday April 07, 2024 @05:39PM (#39964196)
Further, it's not even clear that this kind of program is practically possible on Wayland. At best, that's yet another new protocol someone would need to invent that only some compositors would implement.
Re:Show HN: Bonk, a command-line tool for X11 window management by shmerl on Sunday April 07, 2024 @05:50PM (#39964280)
> Further, it's not even clear that this kind of program is practically possible on Wayland.

It's pretty clear. But some are too stuck up to even research it or be part of shaping it. Which is common among legacy vendors who very rarely even care to communicate with Wayland developers about their needs.

Those who aren't stuck up deal with it just fine (OBS Studio for example).

Re:Show HN: Bonk, a command-line tool for X11 window management by yjftsjthsd-h on Sunday April 07, 2024 @07:45PM (#39964932)
Lol - it's "stuck up" to prefer software that works? If you want people to switch, it'd help to actually cover their use cases. Showing up to proclaim software "obsolete" when the supposed replacement literally doesn't support the features in use, then... what, claiming we're bad people for not contributing to Wayland? is the cultural part of why people don't like Wayland. (In a distant second place behind the technical reasons people don't like it, which boils down to missing features and present bugs.)
Re:Show HN: Bonk, a command-line tool for X11 window management by shmerl on Sunday April 07, 2024 @07:47PM (#39964939)
Stuck up means they don't care to collaborate. If they don't, how would anyone know about their specific needs? Those who don't have this dinosaur mentality do work with Wayland developers and their needs are addressed faster. Others learn the hard way but also usually like to complain that "things don't work".
Re:Show HN: Bonk, a command-line tool for X11 window management by t0b1 on Monday April 08, 2024 @10:30AM (#39970112)
Maybe people don‘t because they see, for example, Valve (a billion dollar company) struggling to get GNOME to implement drm-leasing for VR headsets. IIRC they‘ve been at it for multiple years, too.

Or maybe it‘s because the compositor developers are not exactly concerned about ease of development. To quote a GNOME dev[0] about support for the aforementioned drm-leasing protocol:

> I honestly don't have a problem with forcing clients to implement the portal if they want to work on mutter.

I wouldn‘t blame the people who choose to simply not engage with that process, especially those who work on these things in their free time.

[0]: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2759

Re:Show HN: Bonk, a command-line tool for X11 window management by jrm4 on Sunday April 07, 2024 @08:33PM (#39965173)
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?

Re:Show HN: Bonk, a command-line tool for X11 window management by epoxia on Sunday April 07, 2024 @08:59PM (#39965282)
My 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) )
Re:Show HN: Bonk, a command-line tool for X11 window management by ElectroBuffoon on Sunday April 07, 2024 @11:58PM (#39966089)
For improved security with X11, try firejail+Xpra, or Qubes OS. They will not only help in the graphical front, but also others like processes and storage.
Re:Show HN: Bonk, a command-line tool for X11 window management by bitwize on Tuesday April 09, 2024 @02:35AM (#39976691)
Workarounds for the inherently broken security model of X11.

Gee, if only there were a modern display server protocol with a fixed security model!

Re:Show HN: Bonk, a command-line tool for X11 window management by jrm4 on Tuesday April 09, 2024 @01:28PM (#39981829)
All models are wrong, some are useful?

Theoretically, X11 is dangerous. But what isn't?

Re:Show HN: Bonk, a command-line tool for X11 window management by shmerl on Sunday April 07, 2024 @08:43PM (#39965215)
Re:Show HN: Bonk, a command-line tool for X11 window management by donio on Sunday April 07, 2024 @11:03PM (#39965869)
Besides 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"

Re:Show HN: Bonk, a command-line tool for X11 window management by shmerl on Sunday April 07, 2024 @11:23PM (#39965950)
It'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.
Re:Show HN: Bonk, a command-line tool for X11 window management by bee_rider on Monday April 08, 2024 @03:09AM (#39967021)
This 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.

Re:Show HN: Bonk, a command-line tool for X11 window management by shmerl on Monday April 08, 2024 @09:23AM (#39969474)
The idea is that to worry about security in something broken by design is a folly.
Re:Show HN: Bonk, a command-line tool for X11 window management by bee_rider on Monday April 08, 2024 @12:41PM (#39971442)
Right, 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).
Re:Show HN: Bonk, a command-line tool for X11 window management by yjftsjthsd-h on Tuesday April 09, 2024 @09:33AM (#39979264)
Are you posting from seL4, OpenBSD, or Genode?
Re:Show HN: Bonk, a command-line tool for X11 window management by yjftsjthsd-h on Sunday April 07, 2024 @08:50PM (#39965239)
>> 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.

Re:Show HN: Bonk, a command-line tool for X11 window management by shmerl on Sunday April 07, 2024 @09:30PM (#39965447)
For 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/

Re:Show HN: Bonk, a command-line tool for X11 window management by yjftsjthsd-h on Sunday April 07, 2024 @10:19PM (#39965670)
> 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.

Re:Show HN: Bonk, a command-line tool for X11 window management by shmerl on Sunday April 07, 2024 @10:29PM (#39965715)
Makes 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.

Re:Show HN: Bonk, a command-line tool for X11 window management by yjftsjthsd-h on Sunday April 07, 2024 @11:23PM (#39965951)
Or 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.
Re:Show HN: Bonk, a command-line tool for X11 window management by shmerl on Monday April 08, 2024 @09:31AM (#39969552)
You couldn't really since it's DOA. Otherwise you'd be stuck with unsupported path.