xpra icon
Bug tracker and wiki

Version 52 (modified by Antoine Martin, 3 years ago) (diff)

--

Building

Platform specific index:

General Information

Before attempting to build from source, make sure that all the required dependencies are installed.

For running the *nix server, you will need Xvfb or Xdummy (if available for your platform), xauth, keyboard utilities and xauth.


Do not mix source installation with packages. Remove one completely before installing the other.

Switches

There are a number of build switches, which you can see with:

./setup.py --help

These should be auto-detected in most cases.

Many of those switches are related to picture encodings. On some platforms with older versions of libraries, it is possible, preferable and often mandatory to build static versions of the codecs. (see "--with-static*" flags)

Patching

There are a number of patches in the source tree that may need to be applied to build on some platforms to deal with library or tools compatibility.

In particular, older Debian versions require the "old-libav*" patches. (see [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729203)




http://xpra.org/icons/gears.png

Building with distutils

For installing into a local ./install directory as a normal user, simply run:

./setup.py install --home=./install

You then have to add the local installation directory to your PYTHONPATH whenever you want to use xpra:

PYTHONPATH=./install/lib*/python xpra ...

To install globally for all users via sudo:

rm -rf build install
sudo ./setup.py install

http://xpra.org/icons/remove.png

Uninstall

setuptools/distutils do not provide any uninstallation mechanism, this has nothing to do with Xpra. That said, it is generally enough to remove (but you must ensure that these are the correct files as you may damage your system otherwise!):

/usr/bin/xpra
/usr/lib*/python*/*-packages/xpra*
/usr/share/xpra

http://xpra.org/icons/fedora.png - http://xpra.org/icons/centos.png

Fedora and CentOS / RHEL

For building you will need to install:

yum install gcc python-devel libXtst-devel libXdamage-devel \
	  	gtk2-devel pygtk2-devel pygobject2-devel libxkbfile-devel

Fedora and RHEL7/CentOS7 users can install Cython via yum, our repositories also include a more up to date version of Cython for all versions.

yum install Cython
yum install xorg-x11-server-Xorg xorg-x11-drv-dummy xorg-x11-xauth xorg-x11-xkb-utils

For picture and video encoding support, install the private libraries and their development headers from the repository:

yum install ffmpeg-xpra-devel x264-xpra-devel libvpx-xpra-devel libwebp-devel

Building against the default (and often outdated) host libraries or using third-party repositories (EPEL, rpmfusion, etc) is not recommended.

When building against those private libraries, you must point the compiler and linker to their location, ie for 64-bit:

LDFLAGS=-Wl,-rpath=/usr/lib64/xpra \
PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib64/xpra/pkgconfig \
    ./setup.py install

The spec files used for building all the packages found in the repositories can be found here: xpra/trunk/rpmbuild. More information on the private libraries setup can be found here: #613.

For OpenGL accelerated client rendering support, add:

yum install PyOpenGL PyOpenGL-accelerate pygtkglext

http://xpra.org/icons/debian.png - http://xpra.org/icons/ubuntu.png

Debian and Ubuntu

Sadly, you will need at least one patch to build on Debian / Ubuntu systems: browser/xpra/trunk/debian/patches.

Install:

apt-get install libx11-dev libxtst-dev libxcomposite-dev libxdamage-dev \
                libxkbfile-dev \
	  	python-all-dev python-gobject-dev python-gtk2-dev cython

Make sure that your version of Cython is recent enough.

Also install some X11 utilities if not installed already:

apt-get install xauth x11-xkb-utils

And for video support (x264 and vpx), you should install:

apt-get install libx264-dev libvpx-dev

Note: starting with version 1.0, we use a private version of ffmpeg - see #1256 for details.

http://xpra.org/icons/opensuse.png

openSUSE

For building you will need to install:

zypper install gcc python-cython python-devel \
		gtk2-devel python-gtk-devel python-gobject2-devel
zypper install libXrandr-devel libXtst-devel libXcomposite-devel 
zypper install xorg-x11-server-extra xorg-x11-xauth xkeyboard-config

No idea which ffmpeg libraries to use, sorry.

http://xpra.org/icons/gentoo.png

Gentoo

The xpra ebuilds in portage are reasonably up to date, just avoid the outdated versions shipped as "stable"

http://xpra.org/icons/archlinux.png

Arch Linux

  • Package build for stable versions can be found here
  • The bleeding edge svn build is here

http://xpra.org/icons/windows.png

Microsoft Windows

Warning: this is hard.

Please follow these instructions to build all the required dependencies (and trim the parts that are only relevant to winswitch)

Then you can find the MS Windows specific build scripts here

http://xpra.org/icons/osx.png

Mac OS X

To build all the required dependencies, use our jhbuild modulesets, see ticket:533#comment:58 and these instructions (and trim the parts that are only relevant to winswitch)

Then you can find the OSX specific build scripts here

http://xpra.org/icons/openbsd.png

OpenBSD

Unsupported.

Install the following packages (ie: pkg_add them):

pkg_add py-gtk2 py-Pillow

You may need to install cython from source if the version in the repository is too old.

For video encoding support install:

pkg_add x264 libvpx ffmpeg

At runtime, you may also want to have installed:

pkg_add libwebp

http://xpra.org/icons/freebsd.png

FreeBSD

These instructions are incomplete and outdated - feel free to update them''

Video support may not work at present due to incompatibilities with the versions of libav/ffmpeg.

The Xvfb tool can be found in the package: xorg-vfbserver (not obvious!) Other packages you will need:

  • for running it: xauth xkeyboard-config
  • for building / downloading the source: gcc cython subversion
  • X11 libraries: libXrandr libXtst libXcomposite libXdamage
  • GTK: py27-gobject py27-gtk2
  • strongly recommended addons: py27-lz4 py27-rencode py27-numpy py27-PyOpenGL py27-PyOpenGL-accelerate

RaspberryPi

Just follow the generic instructions above and make sure to apply patches where needed.
For example, raspbian: Compiling xpra for the Raspberry Pi - but make sure to install globally with sudo ./setup.py install rather than dealing with unusual install paths.