Created
March 12, 2010 13:39
-
-
Save 1stvamp/330295 to your computer and use it in GitHub Desktop.
Lock both the current host and a remote (or multiple) host at the same time, useful for working with multiple machines using synergy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Replace <local_user> with your local username, <remote_user> with your username on <remote_host> etc. | |
# You'll need an SSH, <private_key>, setup with the remote host to not prompt for a password | |
# (either passphraseless or with ssh-agent running) | |
ssh -i /home/<local_user>/.ssh/<private_key> <remote_user>@<remote_host> "export DISPLAY=:0 && gnome-screensaver-command --lock" | |
gnome-screensaver-command --lock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment