Follow

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.

Β· Web Β· 4 Β· 20 Β· 38

How it works? It's a Plasma wallpaper plugin which is an extremely simple QtWayland compositor that only handles a single fullscreen window and draws it - so any Wayland window can be drawn as a background. This window can of course also belong to Xwayland πŸ˜„

This means we can go beyond xscreensaver. How about... Wine? 😁

Show thread

And here it is! Welcome back as my screensaver, Asciiquarium 😊

I could have reimplemented it in Qt, as it was done back in the KDE 3/4 days... or I could just run the original thing in a Konsole window and call it a day 😁

Show thread

@dos The fact that this works at all is so incredibly cool!

@dos
May a Question. I was looking around for a way to have an easy way to give my child a way to play a game on my computer.
Could this tool be configured that way that I could switch between login screen and the lockscreen app on keypress?

@MicKet No, the screenlocker doesn't send any input events to its background (the wallpaper can, but that doesn't help you).

You could run a game in a separate barebones session though, keep your session locked and just switch between them with CTRL+ALT+F<n> keys.

@dos
A question here. I plan to use a certain Device as Thin-client with #MoonlightClient Do you know how to Boot password les into a Single Window application?

@MicKet Gamescope may be a reasonable option too depending on the app.

@dos I play around with #GamesOnWhales and #Lutris to dockerize my old Windows games (without steam). It works really nice and allows me to have them on my PC wit good GPU in my cellar and Play it on any device with Internet I wish.

@dos This makes me want to run 3D Flowerbox/3D Pipes/3D Maze/that 3D Windows XP logo again.

@dos Obligatory question: can you run it as a regular (non-lockscreen) wallpaper too? 😁😁

@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?

@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.

@pup Sure, as soon as I tame the build system and move what's hardcoded to config options.

@pup It's now published in the KDE Store and can be installed with "Get New Plugins" button in Plasma. It's also in AUR as "plasma6-wallpapers-application"

store.kde.org/p/2318884

@dos Can't wait for something like this implemented in swaylock (unofficially).

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