I had a random thought - "what would it take to support arbitrary old screensavers in Plasma 6 again?" 🤔 So here's xscreensaver safely rendered as a background for Plasma screen locker, working on both Wayland and X11 sessions. Turned out so much simpler than I expected 😁 Just some 70 lines of pure QML and a tiny glue to launch the process.

@dos I don't really understand what this is, but here's where I got stuck last time I tried to solve this: jwz.org/b/ykrj So if you have a portable solution, I'd love to hear it.

@jwz This is Plasma specific - it's effectively making kscreenlocker outsource its background rendering to another process, which doesn't even have to be aware that it's being used as a screensaver (or a wallpaper, it's the same there). That said, there's no reason other DEs couldn't handle it the same way. A ext-session-lock-v1 locker could also become a simple compositor like this and just pass the buffer forward.

@dos So does this involve process B rendering onto a wl_surface made by process A? Or is it a whole nested compositor?

Follow

@jwz This one is a simple nested compositor indeed, as that's what was easy to do with the available ready-made building blocks :) But technically it doesn't even have to be a "compositor" at all to do this. Wayland itself is a buffer-passing protocol with some optional extras on top after all, so it could pass the client's wl_buffer straight to the server.

Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml