In the recent past, Gnome desktop used to come with a package called ‘xscreensaver’. It’s a screensaver program that has few built in screensavers (including some third-party created beautiful looking 2D & 3D ones too) and it was used by Gnome, KDE and other desktops (some still do) as well.
But later, Gnome developers decided to replace it with a package of their own called the ‘gnome-screensaver (KDE also has a tool of their own). Now to be honest, I don’t know much about this package, and ironically it’s called ‘gnome-screensaver’, but other than locking and dimming the screen, it cannot execute a screensever (yuk! :D).
Then again, using a screenasaver that requires a reasonable amount of your computer’s resources (specially some of those 3D ones) might not be a good idea while running on your battery (more resources = more power consumption = shorter battery life), however when running on AC or if you use a desktop computer or if you just bloody fancy having one, then you can easily enable those screensavers in Ubuntu Linux with ease nonetheless :).
Lets do it …
Step 1: First of all, let’s get rid of the default ‘gnome-screensaver’ that comes with Ubuntu (I’m using Ubuntu 12.04 Precise Pangolin). For that, open your Terminal window and enter the below command.
sudo apt-get autoremove gnome-screensaver
Step 2: Now enter the below command to install the ‘xscreensaver’ package.
sudo apt-get install xscreensaver
Step 3: This only will install 3 or 4 basic screensavers, but if you like, you can use the below commands to install a lot of 2D and 3D screensavers as well.
sudo apt-get install xscreensaver-gl-extra xscreensaver-data-extra
Step 4: Now we have to make sure the xscreensaver is running from the background every time you log into the desktop. For that, from the right top corner of your screen, click on the user-menu and click on the ‘Startup Applications…’ item as shown below.
Then, click on the ‘Add’ button to create a new startup entry. And fill the three fields using the below data.
Name: You can enter any name here, but let’s just call it the ‘Screensaver Program’.
Command: Copy and paste the below command into this one (don’t change anything).
Comment: You can enter a small description here if you like, it’s optional though.
Then click on the ‘Save’ button and close the windows. Now reboot your PC and ‘xscreensaver’ will run automatically from the background, that’s it!.
Wait, I forgot something! 😉 …
How to set/change a screensaver and their settings …
Step 5: After rebooting your PC, click on the ‘Dash’ button in Unity and search for ‘screensaver’, and Ubuntu should find the program (as shown below).
Then simply click on this icon and then it should open up the ‘xscreensaver’ configuration window and you can use it to preview, change individual screensaver related settings, adjust various power related option etc.
Put the number of minutes that you want your screensaver to appear in the field called ‘Blank After’. And you can use this window anytime you want to change between screensavers as well.
Yup, that’s pretty much it. Now you should have properly setup the screensaver package in Ubuntu, Enjoy!.