How to manually start an XScreenSaver application in root window (full screen)

screensaverx11xscreensaver

I've downloaded the XScreenSaver collection, to dabble a bit in visual effects, etc.

I've compiled mine from source, but they're obviously also available from most distro's repos.

Now, every screen saver in that collection is an application that can run either in a window mode, or by writing to the root window with the -root option.

Problem is, while starting a screen saver in windowed mode is working fine:

cd /usr/libexec/xscreensaver
./apple2 -text -program 'uname -a'

I'd now like to run the application in fullscreen. each XScreenSaver program comes with an extra switch: -root, supposedly to run it in fullscreen.

The problem is, running it simply with the -root switch does nothing:

./apple2 -text -program 'uname -a' -root

The application seems to be running in the background (I can confirm with ps), and I can stop it with Ctrl-C, however it produces no output to the terminal, and there's no window opening, or anything.

I suspect the root window is hidden behind things like my desktop, panels and other windows.

When the XScreenSaver deamon invokes the application, it does some sort of trickery to bring the screensaver to the front, I'm guessing.

So, anyway, any ideas how I could make any XScreenSaver application start in fullscreen, possibly with the -root switch?

I'm using XFCE4 on Fedora 23.

Best Answer

You could try the program I wrote for the very same purpose: https://github.com/grwlf/xscreensaver-run

Just build it and run

./xscreensaver-run /usr/libexec/xscreensaver/apple2 -text -program 'uname -a'

It works by creating a full-screen window and then calling the screensaver with correct -window-id <arg> argument.

Related Question