Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you're not familiar, the way X11 works is comparable to "multiplayer notepad" for your pixels ("multiplayer MSPaint"?).

All your monitors are combined into a large canvas where every pixel can be written and read by any X11 client.

Screenshots (and screen sharing) could be silently performed with zero user feedback (or any good way to even detect when apps might be doing this maliciously, AFAIK).

This is one of the big "security implications" that motivated Wayland (and somewhat similarly, the Flatpak sandbox and the XDG Portal infrastructure that has by now outgrown it).

The infrastructure is already there, for 3rd party apps to request these abilities (with the user getting the choice of following through, or denying the request), e.g.:

- https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.fr...

- https://flatpak.github.io/xdg-desktop-portal/docs/doc-org.fr...

Keep in mind that any action which doesn't require interactivity every time (e.g. restarting the screensharing of a previously-chosen window/display) could have "user gave permission" be remembered, but that seamless case still only applies to that combination (so that client can't peek at anything else than what it was offered).

Anyway, what the blog post is talking about is really just 3rd party apps that haven't been updated (and e.g. might already not function properly inside Flatpak).

> feature parity

If we are being honest, screenshots/screensharing was never a "feature" of X11, it was a big security hole abused as a feature.





> The infrastructure is already there, for 3rd party apps to request these abilities (with the user getting the choice of following through, or denying the request), e.g.:

Why can't the infrastructure include the user simply allowing the app to continue to have access without a specialized infrastructure of app request (that requires updating the app)?

> really just 3rd party apps that haven't been updated

What's with the downplaying "just" again? Have all the best or most popular apps been updated to ensure no disruption?

> screenshots/screensharing was never a "feature" of X11, it was a big security hole abused as a feature.

So what was the screenshot feature of X11? Also classifying use as abuse isn't that honest, only the lack of security is


> So what was the screenshot feature of X11?

In case I wasn't clear enough, there was never a screenshot feature. Any X11 client could read any pixel written by any other X11 client.

> Have all the best or most popular apps been updated to ensure no disruption?

I am not familiar with DE-agnostic "screenshot apps" for Linux, they always seemed more common on other OSes, and I've always used the DE-specific apps (which were the first to support such mechanisms, some of them even using more direct DE-specific private protocols instead of XDG Portals).

But I spent a few seconds googling for general screenshot apps, found Flameshot (which makes sense as a cross-platform app), and it turns out that support for the XDG Portal approach was added to it almost 5 years ago:

https://github.com/flameshot-org/flameshot/pull/1272

And if you peek around the diff, you can tell that KDE/GNOME-specific support, on Wayland - using DBus but not the XDG Portals protocol - already existed, in early 2021, in fact...

https://github.com/flameshot-org/flameshot/commit/a5df852268...

That's the commit that added KDE/GNOME-specific Wayland screenshot support.

8 years ago, in a 3rd-party app!

> Why can't the infrastructure include the user simply allowing the app to continue to have access without a specialized infrastructure of app request (that requires updating the app)?

I'd forgotten that this happened, but for screensharing from a X11 client, someone already went through the trouble of emulating it (on top of the XDG Portals + PipeWire infrastructure):

https://blog.davidedmundson.co.uk/blog/xwaylandvideobridge/

It's only a temporary hack, and it only matters for X11 clients running under XWayland - if an app can run as a native Wayland client, it should have XDG Portals-based implementations of relevant features.

> What's with the downplaying "just" again? Have all the best or most popular apps been updated to ensure no disruption?

Am I downplaying, or are you describing a vague category of "the best or more popular apps" without giving examples?

I feel like it's too easy for some of this stuff to end up in FUD-like arguments without considering the objective reality (of how far we've come in the past few years etc.).

Anyway, my subjective take is that X11 took a decade or two too long to die, and most (if not all) gripes users might have with Wayland can be traced back to X11 outliving its UNIX Workstation origins and having never been designed as a Personal Computing graphical environment.


> In case I wasn't clear enough, there was never a screenshot feature. Any X11 client could read any pixel written by any other X11 client.

Which is a load of FUD, the X11 security extensions from (checks google) 1996, restrict this.


The 1996 extension had severe limitations. Untrusted clients have no clipboard, but also no GPU acceleration at all and other features were barely tested using it so it was somewhat random if they would work. It breaks a ton of applications and was therefore used by approximately no one.

Ok, so instead of a couple UAC style prompts for screen readers, macro recording, desktop sharing, etc, and some tweaks to GDK, we got what? An entire new backend GDK windowing system, and a pile of broken applications? And its been decades?

And its not like actual flaws people found couldn't be fixed.

There is a word for this.


Did you consider that maybe when you hold an opinion different than the people actually knowledgeable about a topic - like the people developing desktop environments and the former developers of X building Wayland - it might be because you are wrong and have a poor understanding of the field and not because they want to annoy you?

The flaws were not limited to the 1996 poor security extensions. These kind of half broken extensions are everywhere in X11. At some point, if the tweaks you have to do is basically rewriting the whole rendering pipeline and adding new APIs for the most significant systems, what you are doing is strictly équivalent to writing a new piece of software which is exactly what the people behind Wayland did.

And don't worry, the change adverse people you see here complaining about limitations fixed years ago would be complaining the same if the effort was on rewriting part of X11. That's life. Armchair complainers and keyboard warriors will complain while actual doers push things forward.


> Which is a load of FUD, the X11 security extensions from (checks google) 1996, restrict this.

Wait, what ? X11 has extensions ? As in can be "extended" ? And has the same thing since ( for the sake of dialogue) 1996 ? That't why it must die. We need a monolith window system, with clear versions, all incompatible with each other. Only then, real progress can be made. /s


> All your monitors are combined into a large canvas where every pixel can be written and read by any X11 client.

Heh. I learned this hard way when trying to set up multiple monitors with different refresh rates




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: