How-To Geek

How to Add Screensavers to Ubuntu 12.04


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.

Installing XScreenSaver

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.

xscreensaver -nosplash


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:

xscreensaver-command -lock


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.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 05/16/12

Comments (10)

  1. cam2644

    The GNOME developers think a black screen that puts your monitor into lower-power mode is optimal……….but a screensaver does have a purpose for many users. Ubuntu 12.04 is a good OS but it is generally more streamlined making individual preferences less important. That’s why articles like yours save us a lot of time and effort.
    I’m using Mint Debian on another machine and find it more user friendly for individual preferences.

  2. Diego A.

    I’m using Ubuntu since the 7.04 version, each time I want to upgrade to a newer version, I finish reinstalling everything again…, I have to start over enabling Compiz, The Cube, looking for themes, installing the TV card, why a wonderfull OS like Ubuntu wants to avoid that users desire to upgrade or even reinstall the OS?, why everything was easier before, and now Ubuntu has less customization and more upgrade issues?. Well, even you could think other thing about my comments, I love Ubuntu….

  3. KeithTheMoth

    VERY IMPORTANT – Once you have created your custom shortcut and clicked Apply, in order to be able assign the actual shortcut keys to it, you must click on the word “disabled” and wait for “disabled” to change to “new accelerator”. If you click on the name of your custom shortcut or anywhere else, the edit dialog for the custom shortcut will just keep popping up and you won’t be able to make the key assignment.

  4. Willie

    Thank you very much. It works!

  5. Brian

    @KeithTheMoth – dude, THANK YOU FOR THAT COMMENT!!

  6. Chris Hoffman

    @KeithTheMoth, Brian

    Thanks for adding that! I’ve clarified this in the post.

  7. Brian Smith

    I’m trying to get around the Ubuntu 12.04 requirement of having to enter my password when I wake the laptop up. There’s one answer out there refering to System -> Preferences, but that seems to be gone. Will setting up the screensaver as you’ve described override the password requirement? I’m pretty sure it won’t, but thought I’d ask :)

    I don’t need a password because this is an almost empty laptop used only for web access.

  8. Damian Mann

    Someone needs to create some screensavers for Ubuntu 12 + that actually look good. Electricsheep seems to be the only option. It’s a great screensaver. But, I like to switch things up once in a while.
    I tried the screensavers from the software centre. They are terrible. They look like they were created in the 80’s or something.
    I’d even use the bubbles one from windows if it was available for Ubuntu. It’s kind of weird how little goes into things looking cool on Ubuntu. They need some graphic designers on the team. People who spend all daywriting code have little or no talent when it comes to eye-popping graphics and screensavers.

  9. Aleen

    ubuntu can be modified alot ive found adding the mint cinnamon or mate, on top of this screensaver and Cairo dock change makes 12.04 personalize able to an extreme.

  10. Wes

    Any way to use my own photos as a screensaver in Ubuntu? Windows has allowed that since the 1800’s.

More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!