Xpra

Running GUI apps on a remote server without requiring persistent connection.

Yes, you can always VNC or RDP into an X11 session but what if you want it to run faster? Usually you connect to a local X11 server from a remote application over a network (as it was meant to be used) but then if the connection breaks, the app will crash. Xpra to the rescue!

Useful links

https://www.xpra.org/

Setup

Beefy Ubuntu server to run your GUI app

Install and run xpra

Either .deb package

sudo apt-get install xpra
xpra start --bind-tcp=10.188.1.1:6030 :30 --daemon=no

Wrap the last line into a startup script or just omit the --daemon=no argument and start it manually when needed.

Or docker image

docker run -p 10.188.1.1:6030:6030 --user=`id -u` \
  -v /etc/passwd:/etc/passwd:ro \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v /var/log/xpra:$HOME/.xpra \
  smartislav/xpra:latest

Change 10.188.1.1:6030 above to some conveniently accessible yet secure socket address, e.g. one on a VPN IP.

Run a GUI program

I’m running LTSpice here.

DISPLAY=:30 wine-development \
  .wine/drive_c/Program\ Files/LTC/LTspiceXVII/XVIIx64.exe

Oh yes, do it in a tmux or screen.

Feeble Ubuntu laptop

Connect

xpra attach tcp:10.188.1.1:6030

You can safely disconnect and reconnect, the app itself will keep running on the server just fine.

Comments

comments powered by Disqus