HowTo: Create your own Screensaver using native Ubuntu tools.

What's the point of this tutorial?

This tutorial is it is here for those who wish to work with what is already installed on their system and wish to have a screen background that changes at predetermined intervals. It is for those who want to understand the already natively available AND installed system. It has been tested on Ubuntu 10.04 Lucid Lynx which is the current LTS. I will not, because I don't have any earlier versions installed anymore, be testing this on anything prior to Ubuntu 10.04. As each new version is released I will test it and report any difficulties found. If you have difficulties please feel free to let me know what they are and we can work through them together. It is based on the script and setup for the background named "Cosmos" which comes pre-installed in Ubuntu 10.04.

Please note: This is just 1 way of doing this, there are many more ways and formats possible. Choose what is the best for you. This tutorial isn't here to dictate to anyone what is the best method for you to use. Instead, as has already been stated, it is here for those who wish to work with what is already installed on their system. If you find something others can use you could create a Tutorial on it to help others. Please do not turn this tutorial into a "my way is the best way" discussion, instead treat it like the technical tutorial it is and leave discussion about other methods to other threads.

Note: I do not know if this will work in Kubuntu, Xubuntu, or any other variant other than Ubuntu. IF you try this in anything other than Ubuntu 10.04 and it works please let us know so we can add the information to this thread and give you the credit for your hard work in testing this in an untested variant.

1: Preliminary work.
Follow the instructions in this thread.

2: Finding the required files.
Taken from this thread.

Now you have your slideshow setup and in the right place you need to go to Places > Search for Files. Search for Cosmos and you will find:
  • cosmos-slideshow.desktop (a configuration file in /usr/share/applications/screensavers)
  • cosmos (the folder containing the Cosmos backgrounds which you will have noticed is used as the basis of the slideshow background)
  • cosmos.xml (again used as the basis for the background slideshow)

3: Modifying the file.
Open cosmos-slideshow.desktop by opening a terminal and typing or pasting.
gksudo gedit /usr/share/applications/screensavers/cosmos-slideshow.desktop
Now you have that open change the following ITALIC entries to suit your screensaver.

[Desktop Entry]
Comment=Display a slideshow of pictures of the cosmos
Exec=/usr/lib/gnome-screensaver/gnome-screensaver/slideshow --location=/usr/share/backgrounds/cosmos
Save the file with A NEW NAME, this is so you don't lose cosmos.

4: Telling Ubuntu that you have a new Screensaver.
Now that you have done that press Alt-F2 and in the dialogue box type in gconf-editor. Go Apps > gnome-screensaver. On the opposite pane you should see a list go down until you see "mode", tap on mode twice and you will get another dialogue box appear, enter single into the Value line and click ok. Open the Screensaver preferences choose you new screensaver and your done.

Test it out and let us know how you go.

If you have any hints or suggestions regarding this format please feel free to make them and I will adjust this post accordingly.