Tag Archives: xpra

Building xpra on RHEL6 as a normal user

Xpra is described as “screen for X”, and while that’s true, I’ve never really used GNU screen much. What I use it for, though, is provide a much faster substitute for X forwarding (even on a local network).

I have access to a nice machine that I’d like to work remotely on. Two catches: I’m not root, and it’s running RHEL6 with minimal extra package repos. To install software locally, I use GNU stow along with some nice setenv action in files sourced by .cshrc. Here is what I was able to do to get Xpra running at a minimum capacity.

Note: $STOW is whatever your stow directory is – all the stow documentation essentially assumes that it’s /usr/local/stow, but in my case it happens to be (wait for it) /home/users/rpavlik/linux/stow/rhel6/stow. Yes, I could have probably chosen a location with a shorter pathname, but inertia makes it not worth changing at this point. I’ll use $STOWPREFIX to refer to wherever stow links things into, usually the parent directory.

  1. I asked my friendly department IT folks to install the dependencies from https://www.xpra.org/trac/wiki/Building – which in my case, wasn’t exactly what happened since EPEL or other package repos are off-limits, but I ended up with whatever the latest official versions are of those dependencies for RHEL6.
  2. Grabbed Cython 0.20.1 since the RHEL6 Cython is too old. Copied the contents of the tarball into $STOW/Cython-0.20.1/lib64/python except for the bin directory, which instead went became $STOW/Cython-0.20.1/bin. Stowed Cython-0.20.1 – note that this is a build-time dependency only (I think).

  3. Made sure that I had my PYTHONPATH environment variable set to include (it may be empty to start) $STOWPREFIX/lib64/python. On the next login, I checked that which cython and cython -V reported values that I expected.

  4. Grabbed Xpra 0.11.6 and unpacked it. I initially built without a lot of ffmpeg/libav stuff, but it turns out that there are patches in the source tree to handle old versions. I patched with these commands:

    • patch -p1 < patches/old-libav-pixfmtconsts.patch (replaced --without-csc_swscale flag)
    • patch -p1 < patches/old-libav-nofree.patch (replaced --without-dec_avcodec flag)
  5. In the source directory, I ran ./setup.py install --home=$STOW/xpra-0.11.6 -without-vpx which almost worked except for one place where it tried to write to /etc. I applied this trivial patch to correct that.

Adding --without-client to the build command is an option I considered since I typically use this home directory on a headless machine, but it’s shared with headfull machines which I might want to use as Xpra clients someday.

And…. that worked! I had to run with --no-mdns since I didn’t apparently have the Avahi mDNS python module installed on the system, but that’s a minor issue easily worked around.