How do I configure the screensaver in Ubuntu? I can see that gnome-screensaver is running.
3 Answers
Starting with 12.04, Ubuntu doesn't ship with any screensavers, 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
Open a terminal and 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.
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
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
Source and more about: How to Add Screensavers to Ubuntu 12.04.
-
1This is a really stupid question, but how do I set when it will start the screensaver?– MadTuxJul 8, 2013 at 18:42
-
1Superb answer! @MadTux: you set when it will start in the bottom corner of the 'screensaver' program window Oct 22, 2013 at 6:20
-
You can configure
xscreensaver
from the command line by runningxscreensaver-demo
. Apr 24, 2014 at 9:07 -
Great resource! Please also add this information to your post. It's about the fact that Ctrl+Alt+L stops working when replacing Gnome's screensaver with XScreensaver, and how to fix that: askubuntu.com/questions/75692/… May 14, 2014 at 18:01
-
no, you don't have to uninstall gnome-screensaver, and install xscreensaver. You can just go to System Settings -> Brightness and Lock to setup the idle time of gnome-screensaver. The gnome-screensaver can put your LCD monitor into low activity mode so it is the best for your monitor.
-
While gnome-screensaver didn’t get DPMS running in natty, in precise it finally does (i.e. my LCD backlight is actually off!) – The place to configure the timeout is right; but I don’t know why it has to display my full name (in the corner of a black screen) for a while, before it starts ... “saving”. Mar 23, 2014 at 16:27
Radu's answer is a good one so I won't duplicate it. I will point out extra steps recommended by the xscxreensaver
developer. I'm also including a short paragraph of history from the developer.
USING GNOME OR UNITY
For the better part of a decade, GNOME shipped
xscreensaver
as-is, and everything just worked out of the box. In 2005, however, they decided to re-invent the wheel and ship their own replacement for the xscreensaver daemon called "gnome-screensaver", rather than improving xscreensaver and contributing their changes back. As a result, the "gnome-screensaver" program is insecure, bug-ridden, and missing many features of xscreensaver. You shouldn't use it.To replace gnome-screensaver with xscreensaver:
Fully uninstall the gnome-screensaver package.
sudo apt-get remove gnome-screensaver
Launch xscreensaver at login.
Select "Startup Applications" from the menu (or manually launch "gnome-session-properties") and add "xscreensaver".
Make GNOME's "Lock Screen" use xscreensaver.
sudo ln -sf /usr/bin/xscreensaver-command /usr/bin/gnome-screensaver-command
That doesn't work under Unity, though. Apparently it has its own built-in screen locker which is not gnome-screensaver, and cannot be removed, and yet still manages to be bug-addled and insecure. Keep reinventing that wheel, guys! (If you have figured out how to replace Unity's locking "feature" with xscreensaver, let me know.)
Turn off Unity's built-in blanking.
Open "System Settings / Brightness & Lock";
Un-check "Start Automatically";
Set "Turn screen off when inactive for" to "Never."
Disclaimer
I do not agree with the strong language of the developer but felt it better to include the history rather than hide it.
Ubuntu 18.04 special notes
Many have complained when locking screen with Ctrl+Alt+L external monitors blank instantly and those with dpms are switched off. This causes unwanted delays when unlocking screen. Using xscreensaver
will circumvent that particular problem.
You can decommission the Ctrl+Alt+L shortcut from gnome-screensaver
and assign it to a new command for xscreensaver
:
xscreensaver-command -lock
This keyboard shortcut reassignment also works in Ubuntu 16.04.