Screensaver without a Desktop ?

While I was playing around with Linux as a small business server, a web client, kiosk pc, etc - all systems with minimal support for graphical stuff, no desktop environment and what not, just a few windows at best - it occurred to me that you don't really need a desktop to run an screensaver. Just a minimal xwindows setup would be sufficient, no ?

So I gave it a try - here's how :

We do need an xserver, some x-windows utilities, and the xscreensaver program, so we get those first :

	apt-get install x-window-system xterm twm xscreensaver

Then we go through the xserver setup, untill we can startx. xscreensaver runs best as a non-root user, so we log on as any user, and startx

To configure the screensaver, open a shell (in X environment) and run xscreensaver-demo . This produces a GUI where you can configure the screen saver : which screensaver, and with what settings (timeout, speed, ....). In the 'Advanced' tabs, you can also set power save options for your monitor (standby, suspend, power down, ...)

The GUI will look rather familiar : it's the same thing you get to see when you configure a screensaver in KDE or Gnome or any other desktop / windows environment :-)

There's no 'OK' or 'Save' button, but when you close the setup screen, you should find a .xscreensaver file in your home directory, containing the configuration of the screensaver.

The screensaver needs the 'screensaver daemon' to work. It was started when you opened xscreensaver-demo, but that won't happen every time, so your for the screensaver to work, i.e. kick in after the time-out you've set, the screensaver daemon needs to be running already. we add a statement (xscreensaver& ; i.e. run screensaver program as background proces) to /etc/X11/Xsession.d/99xfree86-common_start so it will be executed when the xwindows session is started :

		exec $STARTUP

Then, given the idle time-out in your configuration in ~/.xscreensaver, the desired screensaver (The Matrix, no doubt), will kick in ...

The Matrix screensaver

In this multimedia kiosk pc, the screensaver is started from the window manager configuration file in the user home directory. This makes the screensaver user-specific and solves the problem that xscreensaver does not like to run as root.

Not satisfied with Debian's rather conservative approach to xserver setup and graphics configuration ? Impressed by how Redhat and Knoppix seem t get the maximum out of every monitor and video card ? Learn how to use knoppix hardware detection and xserver setup on a regular Debian system.

Koen Noens
October 2005