Skip to content

Instantly share code, notes, and snippets.

@zyrx
Created August 11, 2015 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zyrx/eb7c12a5c3f3cb53c60a to your computer and use it in GitHub Desktop.
Save zyrx/eb7c12a5c3f3cb53c60a to your computer and use it in GitHub Desktop.
With this two command you can lock and unlock your remote computer with just one ssh command.
$ ssh -X user@server "export DISPLAY=:0; gnome-screensaver; gnome-screensaver-command -l;"
$ ssh -X user@server "export DISPLAY=:0; gnome-screensaver; gnome-screensaver-command -d;"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment