3

What is the lock screen command in Ubuntu 17.10?

I want to shortcut the command since I don't have any dedicated special key for this on my Lenovo T470s. If I press the super (Windows) key and search for 'lock screen' I get a button to click on that does the job but I can't figure out the terminal command from there.

4

You can lock screen using the default Super+L key combination (Super is usually the Windows key).

You can also lock using the following commands

gnome-screensaver-command --lock

(needs gnome-screensaver package installed)

or

dbus-send --type=method_call --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Lock

(needs GDM).

| improve this answer | |
1

The new 19.10 way of doing this is:

xdg-screensaver lock

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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