Ubuntu 12.04 doesn’t ship with any screen savers, just a black screen that appears when your system is idle. If you’d rather have screensavers, you can swap gnome-screensaver for XScreenSaver.
Screensavers were actually removed back in Ubuntu 11.10. Ubuntu uses gnome-screensaver and inherited the change from upstream GNOME. The GNOME developers think a black screen that puts your monitor into lower-power mode is optimal.
First, fire up a terminal from Ubuntu’s Dash.
Next, run the following command to uninstall gnome-screensaver:
sudo apt-get remove gnome-screensaver
Install XScreenSaver and some additional screensaver packages with the following command:
sudo apt-get install xscreensaver xscreensaver-data-extra xscreensaver-gl-extra
Configuring Your Screensaver
After installation, perform a search in the Dash for Screensaver. Launch the Screensaver utility and use it to configure XScreenSaver and select your screensaver settings.
The Screensaver utility will prompt you to stop the gnome-screensaver process and launch the xscreensaver background process when you start it.
By default, XScreenSaver will choose a random screensaver each time it starts. You can specify the screensavers it chooses from or enable “Only One Screensaver” mode to always use your favorite screensaver.
XScreenSaver doesn’t embrace gnome-screensaver’s minimalism — many XScreenSaver screensavers offer a large amount of options you can tweak by clicking the Settings button.
Adding to Startup
To actually use the screensavers, you’ll want XScreenSaver to start in the background each time you log in. If it doesn’t start, it can’t notice your system is idle and launch screensavers.
Get started by launching the Startup Applications utility from the Dash.
Add a startup program with the following command. The name and comment here can be anything you like.
Replacing Lock Screen
Unity calls gnome-screensaver when you click the Lock Screen option in the system menu or use the Ctrl+Alt+L keyboard shortcut. To lock your screen with XScreenSaver, you can create a custom keyboard shortcut that calls XScreenSaver instead.
First, open the Keyboard utility from the Dash.
Click the Shortcuts tab, select the Custom shortcuts section, and click the + button. Specify the following command for your custom shortcut:
Click the word “disabled” after creating your custom shortcut and key in your desired keyboard shortcut when the words “new accelerator” appear – Ctrl+Alt+L is the default shortcut that locks your computer. If you use the default combination, you’ll be prompted to reassign it away from the default gnome-screensaver shortcut.
Use the keyboard shortcut whenever you want to lock your system. Unfortunately, the Lock Screen option in Unity’s system menu doesn’t work with XScreenSaver.
Reverting Your Changes
Reverting these changes is simple. Just run these commands to uninstall XScreenSaver and reinstall gnome-screensaver:
sudo apt-get remove xscreensaver xscreensaver-data-extra xscreensaver-gl-extra
sudo apt-get install gnome-screensaver
If you reassigned the Ctrl+Alt+L keyboard shortcut, go back into the Keyboard configuration window, delete your custom shortcut, and reassign Ctrl+Alt+L to the Lock screen option under System.
Ubuntu’s developers plan on writing a new screensaver system to replace gnome-screensaver and adding it to Ubuntu by default. In the future, installing XScreenSaver will not be necessary.