diff options
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 | ||