summaryrefslogtreecommitdiff
path: root/dot/local/bin/x11-ssh-host
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2017-03-09 12:25:25 -0500
committerAndrew Cady <d@jerkface.net>2017-03-09 12:25:55 -0500
commit58135fd5de1993473f789586e48658096592c8b6 (patch)
tree1118230b14d59cd71bafc3e8a8f75e5e8c271443 /dot/local/bin/x11-ssh-host
parent2d8a341de04e3bc370aec52081238d08a0059fb0 (diff)
aliases to ssh to various hosts
Diffstat (limited to 'dot/local/bin/x11-ssh-host')
-rwxr-xr-xdot/local/bin/x11-ssh-host13
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
2host=$(basename "$0")
3case "$host" in
4 x11-ssh-host) host=$1 ;;
5esac
6
7if [ "$DISPLAY" -a ! -t 0 ]; then
8 exec xterm -T "$host" -e \
9 autossh "$host" -- -t screen -xRR
10else
11 exec \
12 autossh "$host" -- -t screen -xRR
13fi