How can I lock my desktop screen from the command line?
Tell me more
×
Ask Ubuntu is a question and answer site for
Ubuntu users and developers. It's 100% free, no registration required.
|
You can lock the computer by running
However this will only work if you have Gnome Screensaver running for your session (should be - unless you've disabled it) you can start that from the commandline with:
|
|||
|
|
If you're in a different (desktop) session (e.g. virtual console, switched to another login, SSH), specify the display explicitly (
To unlock, use the |
|||||||||
|