#!/bin/bash # Start emacsclient on the local display. # Do it in such a way that this script can be used as an Erlang port, # meaning that if stin is closed, the client will stop. # For that, socat is used as a wrapper. # This was quite tricky to figure out.. HOST=10.1.3.29 export DISPLAY=:0 ssh -X -o ServerAliveInterval=10 -o ServerAliveCountMax=8 $HOST /home/tom/bin/emacsclient.port # FIXME: Closing the window will hang it. # Guess: window has no time to properly code before the X tunnel is gone.