Ubuntu 12.04 doesn’t have any screen savers by default but only a black screen when your system is idled. You can enable screen savers by replacing default gnome-screensaver with xscreensaver.

  • 1. Remove default gnome-screensaver.

    Search “terminal” from the dash or Ctrl+Alt+T to launch a terminal window,

    execute following commands to remove gnome-screensaver:

    sudo apt-get remove gnome-screensaver
  • 2. Install xscreensaver and some additional packages with this command:
    sudo apt-get install xscreensaver xscreensaver-data-extra xscreensaver-gl-extra

  • 3. Launch and configure xscreensaver. First time it prompts to stop gnome-screensaver for xscreensaver to work properly

  • 4. Make xscreensaver auto-start at login.

    Launch Startup Applications from the dash home. Click Add to add xscreensaver as a auto-start app. Command area input xscreensaver -nosplash

  • 5. Lock Screen.

    The default lock screen key combination launches gnome-screensaver. You can disable it by Top Right corner menu -> System Settings -> Keyboard -> Shorcuts tab -> System

    Then under Custom Shortcuts, click + to add shortcut to launch xscreensaver to lock screen. Command area input xscreensaver-command -lock

In addition, to revert all settings execute following to remove xscreensaver and install gnome-screensaver.

sudo apt-get remove xscreensaver xscreensaver-data-extra xscreensaver-gl-extra
sudo apt-get install gnome-screensaver