Using xpra to run remote X applications

This post describes how you can run a X application on a host and view it on another.

Xpra is a tool which allows you to run X programs — usually on a remote host — and then direct their display to your local  machine, disconnect  from these programs, and reconnect from the same or another machine, all without losing any state. It differs from standard X forwarding in that it allows disconnection and reconnection without disrupting the forwarded application; it differs from  VNC and similar remote display technologies in that xpra is rootless: i.e., applications forwarded by xpra appear on your desktop as normal windows managed by your window manager, rather than being all “trapped in a box together”. Xpra also uses a custom protocol that is self-tuning and relatively latency-insensitive, and thus is usable over network connections that are too slow or unreliable for standard X forwarding. Xpra can also be used to shadow an existing X11 display.

Example to start a xpra X session and then start the X text editor gedit

$> xpra start :<DISPLAY NUMBER> && DISPLAY=:<DISPLAY NUMBER> gedit "

Example – Start geeqie

$> xpra start :100 && WINEDEBUG=-all DISPLAY=:100 geeqie &

Example using other video encoding, no audio, no clipboard

$> xpra --encoding=x264 --quality=80 --no-bell --no-speaker --no-pulseaudio --no-clipboard --no-notifications attach :100

If you combine using xpra and SSH client then you can connect to your X application from anywhere and continue you X application session.