Gnome and the glslideshow screensaver setup.

First of all, setting up screensaver configurations in gnome is a total mess. I don’t know why they decided to release and use gnome-screensaver instead of using xscreensaver. And I don’t want to know either.

My ubuntu setup is an archaic one. It’s an upgrade over an upgrade over an upgrade. I probably upgraded 4 or 5 times. So my config files might be overwritten, wrongly upgraded, etc… But I was having this horrible issue of not being able to setup my glslideshow settings.

You can search this online. Mainly people are complaining about how to setup the directory from where glslideshow reads the images, also how to set it up so that it doesn’t idiotically show the same images 5 times over and over again. Well I’ll repeat these in this blog post and some more which are not covered.

Initial Setup:

First of all to setup the directory to read the images go to your home directory and create/edit file .xscreensaver like the one below:

imageDirectory: /home/username/Pictures/Slideshow/or/wherever

This sets up your screensavers that are using images, to use this directory instead of  /usr/share/backgrounds (the default directory). Some people on the internet tells you to symlink it to your directory, but I think this is a far better way of doing it.

If you read the glslideshow manual (RTFM), it tells you that by default glslideshow pans an image for 6 seconds (Ken Burns/Pan Scale effect) and displays it for 30 seconds. This means that the glslideshow will idiotically display the same image 5 times. (30/6=5)

In order to fix this issue, you will need to tell it to pan it n seconds and display it also n seconds. So the command should be:

/usr/lib/xscreensaver/glslideshow -root -pan 6 -duration 6

(-root means display on the root window which is the way screensavers work)

The configuration for this resides at: /usr/share/applications/screensavers/glslideshow.desktop

Go ahead and edit that file as root and change the line that reads:

Exec=/usr/lib/xscreensaver/glslideshow -root

to

Exec=/usr/lib/xscreensaver/glslideshow -root -pan 6 -duration 6

Now you are ready to have a slideshow that displays with pan/scale each image for 6 seconds.

And it all doesn’t work…

This is where the shit hit the fan for me. No matter what I did, my glslideshow was still running as /usr/lib/xscreensaver/glslideshow -root (ps aux | grep glslideshow)

After a stubborn and painful few hours I discovered that these settings were being cached in a file called: /usr/share/applications/desktop.en_US.utf8.cache (This is WTF number one)

If you look at this file, it’s a 56 KB cache file of all the settings gnome is reading for all of it’s applications!! I guess it should have been setup to delete it on restart but for some reason it never got deleted…

After renaming this file (never delete them, always rename them 🙂 ) the slideshow started to run as I wanted it to be.

WTF number two was that when I tried to add new images to my slideshow directory, glslideshow never picked them up. At the end of another painful search I found that the list of images are actually cached in a file called .xscreensaver-getimage.cache under /home/username/tmp/ (username is your username). I got rid of that file…

So now, it looks like I have a slideshow screensaver which kind of works. And hopefully you too…