Hacker News new | ask | show | jobs
by Cadwhisker 2201 days ago
For me, XPRA has been a revelation for how I use Linux remotely. It's the GUI version of the "screen" command.

For those who haven't used it and want to try it, you install "xpra" on your Linux box with "yum" or "apt", then fire up an xpra server with "xpra start" (or "nohup xpra start &"), then make a note of which extra display it has added (like ":1"). It's not replacing the display manager (as far as I'm aware).

Download a windows client from xpra.org, then connect through SSH. Once connected, you get a small icon in the Windows taskbar with lots of menu options. Under the "Start" option, you have sub-menus which give you access to all the Linux desktop programs on the target machine.

For example, I use XPRA to connect to my Ubuntu 20.04 laptop and run "Start -> Accessories -> Terminal Emulator". It opens an XFCE4 terminal on my Windows desktop, looking as if it was a native Windows application. In the terminal, I can type "thunar" and a new Thunar file manager window will open on the Windows desktop, or "xemacs" for a text editor.

It's very fast because it's only sending 1 window at a time, not the whole desktop. I can disconnect, then re-connect and the windows will re-appear as I had left them.

It's not perfect (some dialog boxes don't respond to mouse clicks), but it is worth playing with.

1 comments

I haven't tried xpra specifically, but from your description it reminds me of regular X server running on either windows or mac is (xming and xquartz respectively).
Nope, completely different. Xpra is resistant to network failures, while X server requires a stable network connection to keep the apps running. Xpra is also completely agnostic to the applications GUI: it just streams video and input events.

Rough X vs Xpra sketch:

                          |                    |
  display <-> X server    | <----X proto-----> | app
                          |                    |
                          |                    |
  display <-> Xpra client | <---h264/input---> | Xpra server <-X proto-> app
                          |                    |
                          |~~~~~~network~~~~~~~|
thanks for the explanation!