I tried the combination CTRL+ALT+L or L but it is not working. But if I select the menu item Lock screen from the Setting drop down it works.
Any thoughts on how to fix keyboard shortcut?
I tried the combination CTRL+ALT+L or L but it is not working. But if I select the menu item Lock screen from the Setting drop down it works.
Any thoughts on how to fix keyboard shortcut?
In the top panel right corner choose System Settings to select Keyboard in the Hardware section, or type "key.." in the Dash then select Keyboard:
In the Shortcuts tab all key combinations are listed. You may change them there or add your own custom shortcut. To have the poweroff shortcut back add it with a custom shortcut for the following command:
Note: to be able to add a custom shortcut we may have to clear an already existing shortcut if this uses the same keys.
The GNOME lock screen feature depends on the gnome-screensaver . In case you have removed it or did not install it in a custom environment you will have to install it first.
I was experiencing this symptom, but none of the above solutions were working. I found out that this was because I had previously disabled the screen lock because I did not want the screen to lock when the screensaver starts.
The takeaway is that screen lock will not work unless it is enabled in your gnome settings. You can ensure it is enabled with the following command:
After running this, the Super+L hotkey worked fine.
This seems to have been improved in 12.10.
If you go into System Settings > Keyboard > Shortcuts, System,
then left-click once on 'Lock screen',
the Ctrl+Alt+L on the right changes to 'New accelerator...[something]', at which point you can hold Super [Windows key] and press L.
The keyboard shortcut will then show as 'Super+L' and works immediately.
This is also an issue in 20.04 when using lightdm. For the default lock screen shortcut to work switch to gdm3.
For lightdm you need to add a custom shortcut with the command
dm-tool lock
.For my debian based crunchbag Distro the Window_Logo_Key+L is the shortcut for locking the screen but you of course change it as mentioned above
I also suffered when turning off the screen, could only turn off the computer. But for myself, I found a solution: Ctrl + Alt + F1 a terminal without a graphical shell will appear and immediately a Ctrl + Alt + F8 will be prompted to log in. Good luck.
Sorry for abusing old threads but I looked too for this issue and want to share my experiences without opening a new thread for this, to avoid more waste data. Today I figured out that both lock screen (like mentioned above) and monitor standby was disabled. And gnome-screensaver was removed. But I didn't disabled both of them nor removed gnome-screensaver. What the heck is going on here?! What did disable them?
Ah btw. I'm use Ubuntu 20.04 and Nvidia display driver.
Edit: I know now what it is. It's the Phoronix Benchmark Test. It disables the lock screen and display standby.
In Kubuntu version 18.04 / Plasma, this appears to be found under "Screen Locking". From the start menu, type "Screen..." and you'll see the applet allowing you to change this setting.
For Xubuntu (18.04) the command is
flock4
. It can be associated with shortcut via:None of the answers here worked for me.
Instead, based on this, I installed
gnome-screensaver
and setSuper+L
to the following command:gnome-screensaver-command -l
. Works like a charm.