Wednesday, February 28, 2007

Modifying the GLSlideshow Screensaver settings in Ubuntu

UPDATE: This has been verified to work for 7.10 (Gutsy) as well as 7.04 (Feisty).

For whatever reason in Ubuntu the GLSlideshow screensaver settings are not accessible through the screensaver control panel. We're talking the basics here, like changing the filesystem path to the pictures to display, displaying more than one image (in true slideshow fashion), the duration to display a picture for, etc. So then how does one adjust these properties? This post answers that question.

GLSlideshow gets its settings from two files. The first is .xscreensaver, and the second is glslideshow.desktop. We'll tackle these one at a time.

Starting with .xscreensaver, this file should exist in your home directory; if it doesn't already exist go ahead and create it there. Add the following line to .xscreensaver, where the path represents the folder containing the images you wish to display (adjust the path appropriately for your environment):

imageDirectory: /home/username/Photos

Save this file and close it.

Next modify the settings in glslideshow.desktop to get GLSlideshow to perform as we would like. In Ubuntu this file is typically found here:
/usr/share/applications/screensavers/glslideshow.desktop

If this path isn't appropriate for your system, issue this command to locate this file:
slocate glslideshow.desktop

Edit gslideshow.desktop and look for the following entry:
Exec=glslideshow -root

Modify this line to instead read:
Exec=glslideshow -root -duration 15 -pan 15 -fade 5

Where:
  • duration represents the amount of time (in seconds) to display an image for
  • pan represents the amount of time (in seconds) to run the pan effect on this image
  • fade represents the transition time (in seconds) to fade between images
You are free to add additional options if you wish; see the manpage for glslideshow for more options.

Save this file, then activate the screensaver. GLSlideshow should now present a slideshow of images from the specified directory.

Cites
http://ubuntuforums.org/archive/index.php/t-212512.html

24 comments:

SendDerek said...

Hey, I just wanted to thank you for making this available.

FYI: All of the above instructions still hold true for Ubuntu 7.10 (Gutsy Gibbons).

Anonymous said...

thanks a lot, just what I was looking for

Daniel said...

Thank you, this information is spot on. :)

noisemonkey said...

thx very much...works perfect

Anonymous said...

Awesome mate, thanks heaps. Lovin Ubuntu, this distro rocks!

Anonymous said...

ty, very helpful

MagicFab said...

Works in Hardy (8.04) alpha 4 too.

Adding the following line to the .xscreensaver file will also make this random:
chooseRandomImages: True

bioadam said...

Great guide for those of use tired of looking at space stations!

Anonymous said...

Thanks a lot for this explanation. I just want to add the following: On/off-options have to be unset (i.e. deleted) in .xscreensaver, such as "-clip" (of course, delete it when only you don't want it).

Anonymous said...

works under hardy 8.04.1, thanks for the guide!

Anonymous said...

still works 8.10 the folks at gnome are so silly for not providing a gui for this

Anonymous said...

Thanks very much. I don't understand why Gnome doesn't make something as routine as this more user-friendly. This seems to be a good example of what users used to KDE, osx (or even windoze) get frustrated by when trying to switch to gnome.

Anonymous said...

Great! Still working in Ubuntu. Thank you for sharing.

Chris Beaugrand said...

For some reason when I change the options in the glslideshow.desktop file, the changes don't take effect. I've switched screensavers, even restarted. I'm using 8.10. Anyone have any thoughts?

Anonymous said...

Thanks for the tip.

FYI, 'man glslideshow' will give you all the available options.

For me, I have also specified the '-clip' option which stops black bars appearing at the sides of an image when zoomed out.

WheelDweller said...

A year later, in Karmic, this information is still valuable!

Why doesn't Gnome make this part of a default GUI? Or at LEAST make everything point to a well-known place...

Nic Stage said...

Still good for Ubuntu 9.10. Thanks!

l0b0 said...

Doesn't seem to work on 10.04 - I've modified .xscreensaver to contain only "imageDirectory: /home/jdoe/photos/POD/screensaver" (podget is great), but it still uses the value of XDG_PICTURES_DIR as specified in ~/.config/user-dirs.dirs. Do I need to have xscreensaver installed as well?

Anonymous said...

Works perfectly in 10.04!

Martin said...

Also work perfect in 10.10! Thanks

David said...

This also works with Linux Mint RC10 Julia.
Many thanks, I always wondered how to do that!

Anonymous said...

Works fine in Ubuntu 10.10. Although you might need to "killall -HUP gnome-screensaver" after modifying /usr/share/applications/screensavers/glslideshow.desktop.
Tip: Setting the delay value to something lower than the default 20000 gave me a frame rate boost. (I set it to 2000). But it also boosted my load from 60% to ~97%.. And the transitions are still in the 20 fps region :/

Anderson said...

Very useful. Just like to add that if you see a screen meaning "Technical Problems" like those used in TV, maybe you will need to remove .xscreensaver-getimage.cache (also located in your home folder).

AbeCrab said...

I found that in 11.10 (oneiric) the glslideshow flags are all set by the xscreensaver set-up dialog - there is a "Settings" button.

Editting the file given is no good - you find the file but it's ignored!

Just select GLSlideshow in the choice list and then click "Settings" in the bottom right hand side. You can then use sliders and allsorts, or click "Advanced" and then you can edit the glslideshow command.

I notice the whole command line is now saved into .xscreensaver - you could edit it there, but I'm sure using the dialog is better.