dot/gpg.conf.m4, dot/gpg-agent.conf, Makefile: Adopt GnuPG configuration.
[profile] / bin / xremote
CommitLineData
a10bf242
MW
1#! /bin/sh -e
2
3case $#,$1 in
4 0,* | 1,*) ok=nil ;;
5 *,*:*) ok=t ;;
6 *) ok=nil ;;
7esac
8case $ok in
9 nil) echo >&2 "usage: $0 HOST:RDPY/LDPY PROG ARGS ..."; exit 2 ;;
10esac
11host=${1%:*} dpy=${1##*:}; rdpy=${dpy%%/*} ldpy=${dpy#*/}; shift 1
12
13ssh -L"/tmp/.X11-unix/X$ldpy:/tmp/.X11-unix/X$rdpy" -Nafx "$host"
14sleep 1
15trap 'trap - INT QUIT HUP EXIT; ssh -Oexit "$host"; rm -f "/tmp/.X11-unix/X$ldpy"' INT QUIT HUP EXIT
16DISPLAY=:$ldpy "$@"