11

I can't enable lock screen mode in my laptop and also in my PC. I went to system setting > screen > lock Ctrl+Alt+L : Nothing happens! the shortcut is there but not works !

sudo apt-get --reinstall install gnome-screensaver :
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 dassault-systemes-draftsight:i386 : Depends: sendmail:i386 but it is not installable
                                     PreDepends: libdirectfb-extra:i386 (>= 1.2.7-2) but it is not going to be installed
                                     PreDepends: libxcb-render-util0:i386 (>= 0.3.6-1) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Jorge Castro
  • 71,754
mahdiar
  • 846
  • what happens if you run gnome-screensaver-command -l ? – fossfreedom Dec 21 '11 at 22:10
  • nothing happens ! – mahdiar Dec 21 '11 at 22:21
  • try sudo apt-get --reinstall install gnome-screensaver and then try again gnome-screensaver-command -l – fossfreedom Dec 21 '11 at 22:26
  • I can't ! it says :"You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: dassault-systemes-draftsight:i386 : Depends: sendmail:i386 but it is not installable PreDepends: libdirectfb-extra:i386 (>= 1.2.7-2) but it is not going to be installed PreDepends: libxcb-render-util0:i386 (>= 0.3.6-1) but it is not installable E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). " – mahdiar Dec 21 '11 at 22:31
  • ok - we are narrowing down the issue - you've got package issues. Either remove that draftsight package or try and fix it ... maybe this Q&A helps? http://askubuntu.com/questions/39647/how-do-i-install-draftsight-cad – fossfreedom Dec 21 '11 at 22:43
  • I removed it and the re-installation completed without any errors . – mahdiar Dec 22 '11 at 03:17
  • @Mahdiar We don't do "solved" here, so I rolled back your question, you can post how you solved it as an answer at the bottom, and then check the checkmark to mark it solved. Thanks! – Jorge Castro Dec 23 '11 at 17:59

4 Answers4

14

Ctrl+Alt+L

The above keyboard shortcut will lock your screen.

jrg
  • 60,611
  • 3
    Thanks But it doesn't work ! – mahdiar Dec 21 '11 at 22:23
  • 1
    @mahdiar but you just said in the comment on the other answer that it works. – jrg Dec 21 '11 at 22:26
  • Sorry !!! I mean I can see the correct shortcut key in the settings but it doesn't work ! – mahdiar Dec 21 '11 at 22:30
  • @mahdiar interesting... I think fossfreedom is on the right track in the answer above. – jrg Dec 22 '11 at 02:31
  • Works for me! Upvote. I have xscreensaver installed but disabled, and in power I tell it never to disable the screen. But Ctrl-Alt-L is perfect. Now I can walk away safely while a long copy is running. Thank you, @James! It only took about 2 minutes of searching to find your answer. Pretty cool. – SDsolar Apr 03 '17 at 21:45
10

I installed ubuntu tweak . go to the "Tweaks" part and then to the "Security related" . Then unchecked "Disable lock screen " ! Thats it !

mahdiar
  • 846
8

I was reading around & saw that some computers if CON+ALT+L doesn't work to try the "Windows" botton + L (the button with the little Windows logo, if that's the type of computer you're using) WIN+L ---> It worked on mine, I couldn't find the shortcuts mentioned above so I tried this & it worked! Good luck!!

Vanna
  • 81
  • 1
  • 1
2

Try screensaver command, and see if this is the keyboard (shortcut) or the application (graphics function) that is not working:

gnome-screensaver-command -l

Also check shortcut: (should be Ctrl-Alt-L )

>> System Settings >> Keyboard >> Shortcuts >> System

  Lock screen                                  Ctrl+Alt+l
david6
  • 14,499