Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recently upgraded to 14.04 and since then my lock screen is not working.I read online that gnome-screensaver is not supported in Trusty and it was suggested that I install xscreensaver instead. The latter worked fine for only a few days. Moreover even when I log out, I'm not prompted for a password while logging back in. I read a bit more and found that in Trusty Unity has its own lock screen. So instead of the old lightdm/gnome-screensaver we can use Unity. I found this and tried to check if enabling the lightdm lock screen helped in any way. As it turns out I don't have the Lockscreen option as mentioned in the link. What could be a possible way to solve the issue?

share|improve this question

2 Answers 2

Try these:

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

Then search for "Screensaver" in the menu and tweak its settings to your needs.

To add Xscreensaver to startup, open Startup Applications and add "xscreensaver -nosplash".

To get CTRL + ALT + L to lock the screen and start the screensaver, go to System Settings > Keyboard and on the "Shortcuts" tab, under "System", change the "Lock screen" keyboard shortcut from CTRL + ALT + L to something else, then under "Custom Shortcuts", click the "+" button to add a new custom shortcut, under "Name" enter "Xscreensaver" and under "Command" enter "/usr/bin/xscreensaver-command -lock", then click "Apply".

And finally, click next to the newly created shortcut and press CTRL + ALT + L to assign it to it (or use any other keyboard shortcut you want, but make sure it's not already assign to something else). Alternatively, you can run the following command instead of assigning a new keyboard shortcut for the old screensaver:

sudo ln -s /usr/bin/xscreensaver-command /usr/bin/gnome-screensaver-command

To revert the changes (go back to the black GNOME Screensaver screen), use the commands below:

sudo apt-get remove xscreensaver xscreensaver-gl-extra xscreensaver-data-extra
sudo rm /usr/bin/gnome-screensaver-command
sudo apt-get install gnome-screensaver

If you've used the alternative method to assign CTRL + ALT + L to Xscreensaver lock screen, open System Settings > Keyboard again, remove the custom Xscreensaver command and assign CTRL + ALT + L back to "Lock screen" (under "System").

share|improve this answer
    
I tried adding a custom shortcut with the xscreensaver command, but the shortcut is disabled by default. Whenever I click it the popup with the name and the command pops up. I am unable to assign any shortcut to it –  fts May 3 at 6:17

To manually lock, use the "Ctrl + Alt + L" key combo. For automated locking use the "Brightness and Lock" applet in "System Settings"

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.