Live data from Hacker News

Exploring the Fragmentation of Wayland, an xdotool adventure

semicomplete.com

31–40 of 97 posts

Re: Exploring the Fragmentation of Wayland, an xdotool adventure

#31
tl;dr Wayland doesn't have a good set of universally adopted input emulation and UI automation protocols yet, which makes a portable UI automation utility with the full scope of `xdotool` impossible to write. Work remains to be done to close this gap.

The X protocols in this area were not very good, but due to there being a single viable implementation you could rely on them being present (similar to using MSIE-only features in that browser's dominant era).

Re: Exploring the Fragmentation of Wayland, an xdotool adventure

#32

Second system effect is the curse of FOSS projects. It's been that way for decades. I don't see a reliable solution for the structural problem that doesn't somehow end up like a Benevolent Dictatorship. At the end of the day, designing complex systems by committee is hard to do. Maybe there is a maximum size of a group beyond which the communication matrix between the members starts to fracture?

"that doesn't somehow end up like a Benevolent Dictatorship"

Is that a problem though? If you want to get shit done, you need someone to take responsibility for the decisions. Otherwise you get design-by-committee and endless bikeshedding and software nimbyism.

I don't see how else it could work...

Re: Exploring the Fragmentation of Wayland, an xdotool adventure

#33
post #25

In my opinion, three basic things are needed: - Device emulation: uinput covers this; requiring root is reasonable for what it does. - Input injection. Like XTEST, but ideally with permissions and more event types (i.e. tablet and touch events.) libei is close but I think it should be a Wayland protocol. - UI automation: Right now I think the closest you can get is with AT-SPI2, for apps that support it. This should…

This is a good and informative comment.

Re: Exploring the Fragmentation of Wayland, an xdotool adventure

#34

You'll never find me saying that Wayland development is good in its present state. I think it's a mess and it has a lot of issues. But let's be honest about Xorg. The overwhelming majority of people who worked on Xorg are now developing Wayland. Why? Because developing Xorg is a massive pain in the butt. It is a 400K LOC behemoth of a project and it has a ridiculous amount of technical debt. I would have to imagine t…

The overwhelming majority of people who worked on x11 are retired and a growing minority are dead.

This is the fourth incarnation of x11 and the people working on it now have nothing to do with the people who developed it.

Xorg is the castodian group who started life as a fork, of a fork, of a fork of an spinout from mit.

Them trying to kill X11 is laughable to anyone who knows anything about its history.

Wayland on the other hand is now 18 years old and we've been told it will be good any day now for 18 years.

Re: Exploring the Fragmentation of Wayland, an xdotool adventure

#35

You'll never find me saying that Wayland development is good in its present state. I think it's a mess and it has a lot of issues. But let's be honest about Xorg. The overwhelming majority of people who worked on Xorg are now developing Wayland. Why? Because developing Xorg is a massive pain in the butt. It is a 400K LOC behemoth of a project and it has a ridiculous amount of technical debt. I would have to imagine t…

> The overwhelming majority of people who worked on Xorg are now developing Wayland.

I've never seen this documented.

> It is a 400K LOC behemoth of a project and it has a ridiculous amount of technical debt.

So we have people who want to create features but do not want to pay for technical debt. So.. they create more technical debt? Is there some indication that the wisdom of the crowd is particularly valuable here?

> I would have to imagine that if the Xorg developers thought they could fix Xorg, they would do that instead of making a new thing.

It seems like all the paid developers are working on Wayland while many of the volunteers are working hard to continue Xorg despite all the sponsored efforts to artificially shutter the project.

The article authors main complaint seems to be that distributions forced users to choose between one or the other when, at this point in history, there are zero good reasons to have done that.

Open source used to be about choice. Now it's about paid interests bullying you out of that choice. And Hacker News readily defends this in the name of modernity for it's own sake. It's truly a bizarre outcome to me.

Re: Exploring the Fragmentation of Wayland, an xdotool adventure

#36
post #6

Earlier quoted context omitted.

There wasn't a need to have 10s of different wayland compositors. There is not a need to endlessly bikeshed over extentions instead of delivering user value. These are failures of leadership in driving the replacement of X. Just compare this to Windows and how they made this rearchitecture of making their compositor more modern without splitting into 10s of compositors and breaking a ton of apps.

Here you're just comparing proprietary closed source development to open source development. In the proprietary version the goal is to improve a product. The OSS goals are much harder to pin down and can be different person to person, but it wouldn't be unreasonable to have a goal of "make it so that other devs can make their own compositors easily" and therefore you're describing an obvious success. Short term this…

It isn't particularly easier to make your own compositor either, as you now also have to bring your own window manager. What made the X architecture much more interesting is that it avoided coupling the window manger to the compositor. Hell: there even are multiple popular compositors for X, as they also managed to avoid coupling the compositor to the display server (which would be the one part of the system that you don't find too many of -- though there were multiple implementations over the years! -- but that's not really much different than Wayland where everyone is using the same library to implement the behaviors as part of their coupled-together balls of mud.)

Re: Exploring the Fragmentation of Wayland, an xdotool adventure

#37
Yes the international keyboard support is pretty bad in both X and Wayland. For example, try using Left Shift to switch to layout 1 (while retaining its shift functionality) without patching Gnome. It's impossible.

Or, try making a virtual on-screen keyboard that would send characters that are not in the layout (for example, Greek character with US keyboard layout). Again, you cannot do that, and it's difficult to understand why virtual keyboard has to be restricted with characters printed on physical keyboard.

And if you want to use remote desktop from a computer with Greek layout to a computer with US layout... again, it's going to be difficult. X server-based remote apps would simply temporarily patch the layout and add non-existent keys there to be able to report the key press on a remote machine with different layout. xdotool, I think, used the same hack to input characters that are not in the layout.

Re: Exploring the Fragmentation of Wayland, an xdotool adventure

#38

You'll never find me saying that Wayland development is good in its present state. I think it's a mess and it has a lot of issues. But let's be honest about Xorg. The overwhelming majority of people who worked on Xorg are now developing Wayland. Why? Because developing Xorg is a massive pain in the butt. It is a 400K LOC behemoth of a project and it has a ridiculous amount of technical debt. I would have to imagine t…

Right, I think we can all mostly agree that the old state of things wasn't great/sustainable. The problem, IMHO, is that they went hard on the second-system syndrome and went way too far the other way. This allowed them to replace a massive messy codebase with a nice clean codebase that doesn't do the things people actually need from it. Xorg put everything - way too many features - into one single display server (Xo…

> IMHO, with hindsight, they should have done this...

FWIW, it was also obvious to many people--certainly anyone who had ever been part of one of these big refactors before, whether as the platform or the user--that this is how it should have been done when they started... they just didn't care, and then they spent a decade both directly and indirectly (by condoning the behavior) bullying people who were concerned about the process and insisting that people who even still today have perfectly working systems were/are committing some kind of cardinal sin by not embracing the one true path of Wayland, despite regressions. It is extremely difficult to find any sympathy for the people involved :/.

Re: Exploring the Fragmentation of Wayland, an xdotool adventure

#39
Xdotool and Xmodmap are the two main reasons why, after a few months running Wayland+keyd+dotool I went back to X11. I found really hard to have the following things working at once:

- Italian layout for my keyboard with heavily-customized AltGr keys for mathematical notation (in X11 it's just a matter of having a Xmodmap file)

- Using Espanso for many common shortcuts like :date: (current YYYY-MM-DD date) and :pidigits:

- A reasonable way to run Windows in a VM while using an Italian layout for my keyboard

- The possibility to use automation scripts using something as close as possible to xdotool

- Sometimes I use my home keyboard, sometimes I use my work keyboard, and sometimes I use my laptop keyboard. I expect the system to work in the same way regardless of my input device

It's not that Wayland prevents one from doing all this stuff, but the available solutions were fragile and complicated and took me so long before figuring solutions that only worked partially... For instance, to make keyd work as expected, I was forced to set up my Italian keyboard as an English keyboard and then remap all the keys manually... And every time I plugged a new keyboard, I had to tell keyd to enable my customizations on it, because telling it to use the layout with any keyboard conflicted with VirtualBox.

I understand that X11 is too complicated to be maintained, but from an user's perspective, so far I am far more efficient in X11.

Re: Exploring the Fragmentation of Wayland, an xdotool adventure

#40
post #34

You'll never find me saying that Wayland development is good in its present state. I think it's a mess and it has a lot of issues. But let's be honest about Xorg. The overwhelming majority of people who worked on Xorg are now developing Wayland. Why? Because developing Xorg is a massive pain in the butt. It is a 400K LOC behemoth of a project and it has a ridiculous amount of technical debt. I would have to imagine t…

The overwhelming majority of people who worked on x11 are retired and a growing minority are dead. This is the fourth incarnation of x11 and the people working on it now have nothing to do with the people who developed it. Xorg is the castodian group who started life as a fork, of a fork, of a fork of an spinout from mit. Them trying to kill X11 is laughable to anyone who knows anything about its history. Wayland on…

I mean, Wayland works fine for me. I'm using niri and an nvidia card.
Post reply on HN