diff options
author | Andrew Cady <d@jerkface.net> | 2017-03-09 12:25:25 -0500 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2017-03-09 12:25:55 -0500 |
commit | 58135fd5de1993473f789586e48658096592c8b6 (patch) | |
tree | 1118230b14d59cd71bafc3e8a8f75e5e8c271443 /dot/local/bin/x11-ssh-host | |
parent | 2d8a341de04e3bc370aec52081238d08a0059fb0 (diff) |
aliases to ssh to various hosts
Diffstat (limited to 'dot/local/bin/x11-ssh-host')
-rwxr-xr-x | dot/local/bin/x11-ssh-host | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dot/local/bin/x11-ssh-host b/dot/local/bin/x11-ssh-host new file mode 100755 index 0000000..2869854 --- /dev/null +++ b/dot/local/bin/x11-ssh-host | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/sh | ||
2 | host=$(basename "$0") | ||
3 | case "$host" in | ||
4 | x11-ssh-host) host=$1 ;; | ||
5 | esac | ||
6 | |||
7 | if [ "$DISPLAY" -a ! -t 0 ]; then | ||
8 | exec xterm -T "$host" -e \ | ||
9 | autossh "$host" -- -t screen -xRR | ||
10 | else | ||
11 | exec \ | ||
12 | autossh "$host" -- -t screen -xRR | ||
13 | fi | ||