Version 41 (modified by 7 years ago) (diff) | ,
---|
Building
Platform specific index:
- Fedora, CentOS and RHEL
- Debian and Ubuntu
- openSUSE
- Gentoo
- ArchLinux
- Microsoft Windows
- MacOSX
- OpenBSD
- FreeBSD
- RaspberryPi
General Information
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, many Debian versions require the "old-libav*
" patches.
Hopefully they will revisit their decision to ship the libav fork instead of ffmpeg proper.
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
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
Fedora and [[Image(...)]] 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
Debian and Ubuntu
For building you will need to install:
apt-get install libx11-dev libxtst-dev libxcomposite-dev libxdamage-dev \ libxkbfile-dev \ python-all-dev python-gobject-dev python-gtk2-dev cython
If you encounter "errors on char [32] keys_return .. Expected ')'
", then your version of Cython is probably too old, either upgrade it (from backports) or build it from source.
apt-get install xvfb xauth x11-xkb-utils
For x264 and vpx support, you should install:
apt-get install libx264-dev libvpx-dev libswscale-dev libavcodec-dev
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.
Gentoo
The xpra ebuilds in portage are reasonably up to date, just do not use the broken versions shipped as "stable"!
Microsoft Windows
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
Mac OS X
Please follow these instructions to build all the required dependencies (and trim the parts that are only relevant to winswitch)
For clipboard support (client to server), you will also need to install PyObjC in the jhbuild shell (manual installation recommended)
Then you can find the OSX specific build scripts here
(Unmaintained: for the Qt4
client for OSX, see wiki/Building/OSX-Qt4)
OpenBSD
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
FreeBSD
These instructions are incomplete - feel free to update them''
You may need to install cython from source if the version in the repository is too old.
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
RaspberryPi
Just follow the generic instructions above and make sure to apply patches where needed.
For example, raspbian: Compiling xpra for the Raspberry Pi