= Building = Platform specific index: * [#FedoraandCentOSRHEL Fedora, CentOS and RHEL] * [#DebianandUbuntu Debian and Ubuntu] * [#openSUSE openSUSE] * [#Gentoo Gentoo] * [#ArchLinux ArchLinux] * [#MicrosoftWindows Microsoft Windows] * [#MacOSX MacOSX] * [#OpenBSD OpenBSD] * [#FreeBSD FreeBSD] == General Information == For running the *nix server, you will need {{{Xvfb}}} or [http://xpra.org/Xdummy.html Xdummy] (if available for your platform), xauth, keyboard utilities and xauth. [[BR]] '''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. [[BR]] Many of those switches are related to [/wiki/Encodings 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) [[BR]] == Patching == There are a number of [/browser/xpra/trunk/src/patches 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 [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=729203 revisit their decision] to ship the libav fork instead of ffmpeg proper. ---- [[BR]] [[BR]] {{{#!div class="box" == [[Image(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 }}} }}} {{{#!div class="box" == [[Image(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 }}} }}} {{{#!div class="box" == [[Image(http://xpra.org/icons/fedora.png)]] [http://fedoraproject.org/ Fedora] and [[Image(http://xpra.org/icons/centos.png)]] [http://www.centos.org/ CentOS] / [https://www.redhat.com/products/enterprise-linux/ 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 [http://www.cython.org/ Cython] via yum: {{{ yum install Cython }}} Otherwise, you will need to [http://www.cython.org/#download download] and build from source (which is trivial), use EPEL ("Extra Packages for Enterprise Linux") or rely on third party packages. {{{ yum install xorg-x11-server-Xorg xorg-x11-drv-dummy xorg-x11-xauth xorg-x11-xkb-utils }}} For x264 support, Fedora users should install the [http://rpmfusion.org/ rpmfusion] repository then: {{{ yum install ffmpeg-devel x264-devel libvpx-devel }}} (building x264/vpx on CentOS is out of scope) At runtime, to get optimal support for PNG, JPEG and WEBP, install: {{{ yum install python-imaging libwebp-devel }}} For {{{OpenGL}}} support add: {{{ yum install PyOpenGL libglpng gtkglarea2 }}} And to run the automated tests with some {{{OpenGL}}} examples: {{{ yum install opengl-games-utils xscreensaver-gl-extras }}} To package [http://alastairs-place.net/projects/netifaces/ netifaces] for [/wiki/Network#mDNS] support, you can use this specfile: [/attachment/wiki/Building/netifaces.spec netifaces.spec]. }}} {{{#!div class="box" == [[Image(http://xpra.org/icons/debian.png)]] [http://www.debian.org/ Debian] and [[Image(http://xpra.org/icons/ubuntu.png)]] [http://www.ubuntu.com/ 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 }}} Notes: * some, generally older, distributions may not have all the development libraries available. * Many distributions ship incomplete libvpx-dev packages that are missing the crucial vpx.pc package config file, you may want to download [http://xpra.org/vpx.pc this copy] and place it in your package config directory - at your own risk. (generally {{{/usr/lib/pkgconfig/}}} or {{{/usr/lib64/pkgconfig/}}}) }}} {{{#!div class="box" == [[Image(http://xpra.org/icons/opensuse.png)]] [http://www.opensuse.org/ 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. }}} {{{#!div class="box" == [[Image(http://xpra.org/icons/gentoo.png)]] [http://www.gentoo.org/ Gentoo] == The [http://packages.gentoo.org/package/x11-wm/xpra?arches=all xpra ebuilds] in portage are reasonably up to date, just do not use the broken versions shipped as "stable"! }}} {{{#!div class="box" == [[Image(http://xpra.org/icons/archlinux.png)]] [https://www.archlinux.org/ Arch Linux] == * Package build for stable versions can be found [https://aur.archlinux.org/packages.php?ID=49348 here] * The bleeding edge svn build is [https://aur.archlinux.org/packages.php?ID=58161 here] }}} {{{#!div class="box" == [[Image(http://xpra.org/icons/windows.png)]] [http://windows.microsoft.com/ Microsoft Windows] == Please follow [http://winswitch.org/dev/win32.html these instructions] to build all the required dependencies (and trim the parts that are only relevant to [http://winswitch.org winswitch]) Then you can find the MS Windows specific build scripts [http://xpra.org/trac/browser/xpra/trunk/src/win32 here] }}} {{{#!div class="box" == [[Image(http://xpra.org/icons/osx.png)]] [http://www.apple.com/osx/ Mac OS X] == Please follow [http://winswitch.org/dev/macosx.html these instructions] to build all the required dependencies (and trim the parts that are only relevant to [http://winswitch.org winswitch]) For clipboard support (client to server), you will also need to install [http://pythonhosted.org/pyobjc/install.html PyObjC] in the jhbuild shell (manual installation recommended) Then you can find the OSX specific build scripts [http://xpra.org/trac/browser/xpra/trunk/osx here] (Unmaintained: for the {{{Qt4}}} client for OSX, see [/wiki/Building/OSX-Qt4]) }}} {{{#!div class="box" == [[Image(http://xpra.org/icons/openbsd.png)]] [http://www.openbsd.org/ OpenBSD] == Install the following packages (ie: {{{pkg_add}}} them): {{{ pkg_add py-gtk2 py-Pillow }}} You may need to install [http://www.cython.org/ 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 }}} }}} {{{#!div class="box" == [[Image(http://xpra.org/icons/freebsd.png)]] [http://www.freebsd.org/ FreeBSD] == ''These instructions are incomplete - feel free to update them!'' You may need to install [http://www.cython.org/ 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}}} }}}