Setting up Xpra

Linux  Debian 

Install Xpra on the server and client:

apt-get install xpra

To easily use Xpra in a LAN/VPN for one command at a time, create the following script. Please note that this script will not work for a remote system behind a NAT without the necessary ports opened. Change HOST and PORT to the desired values.



ssh $HOST -- xpra start :100 --start-child="$@" --exit-with-children --bind-tcp=$PORT

# Tries to open HOST:PORT up to 10 times
for i in $(seq 0 9); do
    if netcat -v -w 2 $HOST -z $PORT; then
    sleep 2

xpra attach --encoding=x264 tcp:$HOST:$PORT

Then use the script like this, assuming it’s called

./ xterm