6 ms·
This is a bit off topic, but the article reminded me of something that's always bothered me: one of the (several) motivations for creating Wayland was to fix th
by kelnos 5y ago
This is a bit off topic, but the article reminded me of something that's always bothered me: one of the (several) motivations for creating Wayland was to fix the security issues with X11, namely that any X client can read and manipulate the windows belonging to any other X client. And I've heard claims that this problem is just unsolvable.
It... doesn't seem like it is, really. Couldn't we modify the X server so clients just can't do that anymore? And then introduce a new X extension that provides for cases where this does need to happen, like the window manager (which could be granted blanket permissions), and other apps that would cause a dialog to pop up where the user could approve or deny access (think apps that take screenshots, or video conferencing apps that share the screen or specific windows with other participants). This permissions dialog could be handled by the window manager, or perhaps some standalone app that is somehow securely registered with the X server via this new X extension.
I expect there are some other issues (and things that will break[0]) with apps not knowing about other apps' windows, but I'm not convinced those issues can't be solved. I could even imagine that this new regime might only implement partial isolation, where clients can't read pixels from or fake events to other clients' windows (among other things), but can know the sizes and positions of other windows, and maybe even read some whitelisted set of window properties. I think that would still address most, if not all, security concerns with the current model.
(Just to present some credentials so this doesn't come off as a clueless, "duh, this is so easy, you morons"-type post: I've written an X11 compositor, hacked on a window manager, built a simple toy WM for fun, and was once a co-maintainer of a reasonably popular desktop environment. So I'm not a complete noob here.)
Certainly there are other benefits to Wayland over X11, not just security: greatly simplifying the graphics situation, moving the compositor into the "server" where IMO it belongs, etc. But I'm still not completely sold on the idea that this is worth a multi-decade project to completely replace this critical bit of the Linux GUI stack.
I'm also not convinced that the X server can't be extended in other ways to fix other deficiencies. Of course, at the end of the day, I'm not doing the work, and the nature of open source means that if everyone wants to work on Wayland and no one wants to work on X11 or the xorg server, that's just the way it will be. But it feels like if we'd put even a fraction of the Wayland effort toward making X11 better, we'd be done by now, and people writing X11 applications would mostly not have had to do all that much work to migrate (and many wouldn't have to do any). Would it be as objectively "good" as Wayland supposedly is? No, probably not, but perhaps that doesn't matter.
[0] One thing I can think of here is that some applications need to open more than one connection to the X server, and the X server would see them as separate clients. That could break an application that expects to be able to share and manipulate resources between the multiple connections. But perhaps that could be worked around by grouping permissions not solely by connection, but by process ID. There are probably still some edge cases here, but I think changing the apps here would be ok to do; at least, it seems like less work to accept this sort of breakage and try to fix the apps rather than develop an entirely new windowing system!
- DyslexicAtheist 5y ago> one of the (several) motivations for creating Wayland was to fix the security issues with X11 security was only a footnote in the list of arguments of why X has/had to go. X11 maintainer Daniel Stone's[0] very funny but also educational talk[1] from 2013 linux.conf.au has a lot of the gory details that make you say thank fuck and good riddance. The talk will make you feel truly grateful instead of nostalgic. Anyone who missed the 3 decade long discussion of why X is bad give it a go (it'll put good cheer in your heart I promise). > I'm also not convinced that the X server can't be extended in other ways to fix other deficiencies. it's not about whether anyone _can_ but if anyone should and is willing to do so is the right question (that Daniel's talk answers). BUT X IS THE UNIX WAY! << so what is the 1 thing X does, and what is it doing well? [0] https://www.fooishbar.org/about/ https://www.fooishbar.org/about/ [1] https://www.youtube.com/watch?v=RIctzAQOe44 https://www.youtube.com/watch?v=RIctzAQOe44
- salawat 5y ago>so what is the 1 thing X does, and what is it doing well? That... Isn't entirely fair. UNIX Philosophy is usually applied at the program level. You're talking the entire X stack, which, like it or not, started as "Network agnostic graphical computing" which was composed out of a handful of programs, and a protocol. Now. We all know it isn't that now; and I don't buy that it's all X's fault. You have what, going on 40 years worth of dead ends there, that obviously someone thought was going to be important at some point, but which also were emergent outcomes of a bunch of companies doing, among other things, pursuing their own ends without tipping their hand to everyone else trying to yoink an idea or two. If you don't think X suffered for it, I'd like to point you at the rats nest of abstractions you end up having to navigate. And no, a compositor doesn't magically make it go away. Further, how many people here discussing/developing/opining have read, understood and reasoned about the source as a whole to the point of actually getting something working? I'd wager not many. Next time I have a few months, it's on my TODO list. I have gone through the X.Org Dev docs a couple times though. Need to probably print it out and do some bookmarking to build up my haptic recall model for it.
- bitwize 5y agoThis. Anyone who is thinking of posting "but muh network transparency" or some other tired old argument needs to stfu, watch Daniel Stone's talk, and realize that literally everyone with knowledge of the Linux graphics stack feels the exact same way. X is the internal combustion engine of window systems: it's really bad and it's got to go; give or take epsilon literally 100% of domain experts have known it's got to go for decades; yet here we are still stuck with it. You WILL be running a Wayland desktop in the near future. Xorg itself is already unmaintained abandonware. The next step is deprecating and removing X support from the major toolkits. Beyond that, who knows. Probably Xwayland itself will be deprecated and removed too. Best to suck it up, burn your X config to the ground, and start afresh with Wayland. If it's janky, submit bug reports or PRs. Just rip the band-aid off already, because nobody wants to hear your hemming and hawing when the axe finally comes for X.