When using Awesome Window Manager, how do you set a hotkey to lock your system?
I'd preferably like to use Win+L so that I can lock my screen when needed.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
From Arch Linux How to lock screen with awesome window manager [SOLVED]:
I will also recommend
xscreensaver, simply because it has ways of letting you know when the screen is locked (it comes with a ton of screensavers to chose from). To lock using
xscrensaver, do this:
- Install xscreensaver (Ed:
sudo apt install xscreensaver)
xscreensaver -no-splash &to your
$HOME/.xinitrc(Ed: This file doesn't exist in Ubuntu Unity 16.04. In Startup Applications you add the command
- Make a keybinding in Awesome that spawns
xscreensaver-command -lock. This will start the screensaver and ask for a password.
slockis rather small, but all it does is blank the screen and wait for input. Input is not even echoed, you don't see anything, so you might as well have a locked box and not know it.
When you see (Ed: ...) above, they are comments added by me and are not in Arch Linux answer