603 karma · joined April 19, 2021
I can't say I agree with this. If it were true, containers would not be so ubiquitous.
Expanding udev's library would probably end up a decent size library of other functionality, I don't think there is any good way around needing this. This is not code that could be deleted from systemd if it was separated. The way eudev has handled it is by doing what you describe and copying those shared functions out from systemd: https://github.com/gentoo/eudev/tree/34b2037d379e33f1cf79a34...
The result of that being there are two copies of the same shared code floating around, which is what they were trying to avoid.
If you need to multiplex a wait for multiple processes, it's safer to use epoll with several pidfds. But you still eventually may need to call waitid(-1, ...) to reap any forked processes, and there really is no good way around that.
Input injection is being worked on in a different library, that brings a standard API that's supposed to work the same across Wayland, X11, and with sandboxed contexts: https://gitlab.freedesktop.org/libinput/libei
In Wayland the situation is also not so much different from Windows, you would just reconfigure and extend the DE itself. You are already relying on them to provide most of the UI to an extent.
This problem has been solved in the DEs for quite some time now, global hotkeys is probably the very last thing you want to reach for, when all other options are exhausted.
And when that happens, I don't know about other DEs, but the way you're describing with extensions is mostly how GNOME Wayland already works. If you want to intercept a key, you ship an extension for that, and display a UI to rebind the keys, or you can place additional entries in the system's keyboard settings panel. What you can't do is have random unprivileged processes intercept keys without the user's permission.
Inkscape, old style: https://media.inkscape.org/media/resources/file/inkscape-0.4...
GNOME builder, new style: https://gitlab.gnome.org/GNOME/gnome-builder/raw/master/doc/...
The old style has four bars at the top (titlebar, menubar, toolbar, secondary toolbar). The new style merges them all into one bar and moves the menus into the hamburger menu. The margins may be bigger in the new style but ultimately, space is saved and the UI chrome is reduced. Also, GNOME Builder is not an application designed totally around touch screens -- it's a text editor, for typing into.
I sympathize if you don't like this style of app (and I encourage you to use different apps if you were used to having a lot of menus and toolbars, and you don't like the new style of GNOME apps), but what you are saying about the design goals and motivations does not match what the developers are actually doing.
Once the service forks then it becomes a problem. If you use cgroups it can be solved separately with the cgroup freezer, but there are still some open issues with this in systemd: https://github.com/systemd/systemd/issues/13101
https://lwn.net/Articles/773459/
https://lwn.net/Articles/784831/
In essence it's a classic TOCTTOU.
To actually make good native touch/tablet apps in GNOME, you need to use a separate library called libhandy (renamed libadwaita for GTK4), and the app needs to be designed in a different way. You can usually tell the difference with an app made specifically for touch screens because it will totally de-emphasize the keyboard and mouse. I see more and more of these type of apps but only in the last couple of years, and it's mostly not to target tablets but to target the new open source phones e.g. Librem, Pinephone, etc.
The apps are a different story, those tend not to go for a lot of customization and will usually just focus on optimizing for one or two use cases. If you have other use cases, the suggestion there would probably be to make a separate app.
>The main reason why they haven't yet is most likely that their attempts to integrate dbus into the kernel and systemd more tightly were rejected by the kernel devs; if I remember rightly that was expected to be the point at which you could not use it without systemd.
That seems quite dubious, udev has never depended on dbus, and there really would be no reason for it to ever do that.
>Using the kernel interfaces that udev relies on without using udev itself is also unsupported and the developers consider it within their rights to break those as well.
This I know is true, the netlink stuff varies really wildly from driver to driver. The alternative would be to put udevd and the other userspace bits into the kernel, which I really doubt anyone wants to do.