Hacker News new | ask | show | jobs
by QUrprUd1nCeicw 1254 days ago
>Still isn't possible in Debian Stable if I recall correctly.

It depends on the app. Chances are older apps needs to be updated to use the portal.

>There is a small risk that we end up with competing, mutually incompatible ways of taking screenshots on a Linux desktop.

No, there's only one way. Use the XDG screenshot portal. It's not a library, it's a standard API the desktop implements.

>for no particular reason other than they didn't feel like scoping out the original specification a little more practically

There was a reason. They didn't scope it out because they couldn't. Privileged operations need to be implemented using OS-specific security facilities. There's no way to make this work correctly just with Wayland. On Linux it needs a sandbox, and those are very different in scope and design from a window system.

>But hindsight is 20/20 and the wart is now quite obvious.

No, there's no wart. Or rather, if there is a wart, it's on the OS itself and how it does security. Linux didn't have a way to do this kind of sandboxing before, so someone had to invent that too. Efforts to hack sandboxing into X11 (see Qubes OS) have run into these same problems.

1 comments

Now I'm certainly no expert in this area (and I'm sure it shows) but xdg-desktop-portal was built to support Flatpak and is linked fairly closely to PipeWire.

"The protocol is great, you just need to rebuild your Audio/Visual stack to support it" is certainly a reasonable take when dealing with something as weird as X. But, and I say this with a certain level of sympathy, bit it showcases a deep inflexibility in the design of Wayland.

Taking screenshots is not that hard by default. I'm very glad that someone is taking on the mammoth task of improving the linux graphics stack, but it is obvious that they designed screenshots out of the system then had to work for a decade to design them back in by reworking the way multimedia is done, and de-facto we're only going to be able to use Wayland in conjunction with XDG standards making sure that implementing the light protocol in a light compositor is a mistake. That isn't the end of the earth, it is no worse than what we do now - but it is a glaring weakness in the Wayland protocol that could have found a way to be usable from 2008 -> 2018.

It's not a weakness or inflexibility in the Wayland protocol. There's no way to make it work there. They had to rework the way security is done, and that's a much bigger task that touches lots of other parts of the OS. I keep saying this but you're not listening to me. Why?

Yes, if you want to use a secure system then you need to only go through secure APIs. If you cut out security in the name of making a "light" compositor then you just lose the ability to run sandboxed apps correctly, so it's crippling your desktop for no good reason. The XDG portal was built as a secure API to support Flatpak but it doesn't actually need Flatpak. The compositor is what needs to implement it so any sandbox can use it.