How to activate or deactivate a Linux host with Gnome remotely?

I have a Fedora Linux server with Gnome 3. I want to lock / unlock the remote Gnome desktop remotely. How to activate or deactivate it remotely through SSH?

Use gnome-screensaver-command. It is not specific to Gnome 3.

Turn the screensaver on (blank the screen):

$ gnome-screensaver-command -a

If the screensaver is active then deactivate it (un-blank the screen)

$ gnome-screensaver-command -d
Leave a Reply

Your email address will not be published. Required fields are marked *