Python – Setting up xpra for client use in OS X

mac-osxpythonremote desktopx11x11forwarding

I've been trying to get xpra to run on OS X for the last few days to connect to my Ubuntu server. Note that there's a GUI for it called shifter, but that (at least on OS X) is still far too buggy.

For those who don't know what xpra is, if you know what screen is, it's like screen for GUI X Windows apps tunneled over ssh. You can render a remote X app locally so it's faster than sending a series of compresses screen shots (like VNC), but with xpra you can disconnect and reconnect on different computers. To get the basic functionality you can just type "ssh -X server.location" and any GUI app you open from the command line will open locally.

I've been able to get xpra to build by doing the following:

  1. Download pari-all-0.0.6.tar.gz from the xpra site listed under upstream and untar it.
  2. Issue the following Mac Ports command (Dependencies thanks to RogBlog):
    sudo port install python25 python26 py26-pyrex py26-gtk xorg-libXtst py25-gobject py25-gtk py25-nose py26-nose xorg-libXdamage xorg-libXcomposite xorg-libXtst xorg-libXfixes
  3. In the upstream list of v0.0.06 patches (NOT 0.0.8pre!) on the xpra site listed above, download mswindows-conditional-pyrex.patch.
  4. Open the patch with your favorite text editor and change the single occurrence of "win" in it to "darwin".
  5. Apply the patch to setup.py.
  6. Run do-build in the command line.

Now where I'm stumped: how do I run xpra? The build produces a sub directory called install/bin in which xpra is located, but when I try to run it I get the following error:

Traceback (most recent call last):
  File "./xpra", line 4, in <module>
    import xpra.scripts.main
ImportError: No module named xpra.scripts.main

There is a file called main.py under xpra/scripts, but I don't know any python and I'm not sure if this is what it's looking for, and what to do with it even if it is.

My goal is to set up xpra so I can install it into /usr/bin (or some other common path for executables) and execute it whenever I please. What do I do next?

Best Answer

Now (as of March 2016) available via 'brew install Caskroom/cask/xpra'

Related Topic