This is an old revision of the document!
wiki-writing-todo ()
This document makes use of several variables to address paths in a generic, but distinct way. They are not meant to be used via shell, but for human parsing. No program of the x2go suite actually uses them for anything. You may “set” them to whatever value you want to (in your head), just don't change them half-way through the building process. The “default value” is merely a suggestion.
Name | Description | Default value |
---|---|---|
$X2GO_BASE_DIR | Parent directory of the x2goclient source tree | /usr/src |
$X2GO_CLIENT_DIR | Directory containing the x2goclient source tree | $X2GO_BASE_DIR/x2goclient-git |
$X2GO_DIST_SRC | Directory containing x2goclient dependencies source trees | $X2GO_CLIENT_DIR/dist |
$X2GO_DIST_INST | Installation directory of x2goclient dependencies | $X2GO_DIST_SRC/inst |
$NX_BASE_DIR | Common NX directory | /usr/src/NX |
$NX_LIBS_SRC | Directory containing the NX libs source tree | $NX_BASE_DIR/nx-libs-git |
$NX_DIST_SRC | Directory containing NX libs dependencies source trees | $NX_BASE_DIR/dist |
$NX_DIST_INST | Installation directory of NX libs dependencies | $NX_DIST_SRC/inst |
Prepare $X2GO_BASE_DIR if need be.
# mkdir -p "$X2GO_BASE_DIR" # cd "$X2GO_BASE_DIR"
Fetch the x2goclient sources.
# git clone git://code.x2go.org/x2goclient.git x2goclient-git
Prepare the dependencies directories.
# mkdir "$X2GO_DIST_SRC" # mkdir "$X2GO_DIST_INST"
Prepare $NX_BASE_DIR.
# mkdir -p "$NX_BASE_DIR" # cd "$NX_BASE_DIR"
Fetch the NX libraries sources.
# git clone git://code.x2go.org/nx-libs.git nx-libs-git
Prepare the dependencies directories.
# mkdir "$NX_DIST_SRC" # mkdir "$NX_DIST_INST"
Qt4 is a hard dependency. You can either download and install the SDK package for Mac OS X provided by Nokia, or, if you want to redistribute/deploy x2goclient on other machines, build your own version from source.
If you decide to build from source, follow these instructions, else skip to the NX part.
Download the source package from the official Qt site (.tar.gz recommended.)
Put it into $X2GO_DIST_SRC.
Unpack it.
# cd "$X2GO_DIST_SRC" # tar -xzvf qt...tar.gz # cd qt-...
Configure the qt source tree. We will disable unused stuff and build universal (for deployment.)
If you don't intend to deploy x2goclient, you can remove all -arch parameters and further speed up compilation.
If you don't want to debug x2goclient, replace -debug-and-release with -release for added speed.
Remember to substitute the variables with the correct path values!
# CXX="g++-4.2" CC="gcc-4.2" OBJC="gcc-4.2" PKG_CONFIG="/usr/bin/pkg-config" ./configure -prefix "$X2GO_DIST_INST/qt" -prefix-install -debug-and-release -opensource -shared -fast -largefile -no-exceptions -no-xmlpatterns -accessibility -stl -no-sql-psql -plugin-sql-sqlite -no-qt3support -no-multimedia -no-audio-backend -no-phonon -no-phonon-backend -svg -no-javascript-jit -no-webkit -no-script -no-scripttools -no-declarative -no-declarative-debug -platform macx-g++ -graphicssystem raster -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-neon -system-zlib -qt-libtiff -qt-libpng -qt-libmng -qt-libjpeg -openssl-linked -rpath -v -no-optimized-qmake -no-nis -cups -iconv -no-pch -no-dbus -cocoa -framework -dwarf2 -arch "x86_64 x86 ppc" -confirm-license -nomake demos -nomake examples -nomake docs -sdk /Developer/SDKs/MacOSX10.5.sdk
If everything went through cleanly, proceed to the next step.
Run make and pray. Pray strongly. To whomever or whatever you want, just pray.
# make
If everything went through without errors, install Qt.
# make install
libssh uses CMake to configure the source build. Please download and install CMake from the official CMake repository.
Download the source package from the libssh repository. Note that currently 0.5.2 is buggy, at least on Mac OS X. Please use 0.5.1 for now.
Put it into $X2GO_DIST_SRC.
Unpack the source.
# tar -xzvf libssh-...tar.gz # cd libssh-...
Create a build subdir.
# mkdir build # cd build
Configure libssh.
Again, substitute variables. If you don't need multiarch support, replace “CMAKE_OSX_ARCHITECTURES:STRING=i386 -arch x86_64 -arch ppc” with “CMAKE_OSX_ARCHITECTURES:STRING=”.
# cmake -D "CMAKE_BUILD_TYPE:STRING=Release" -D "CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-4.2" -D "CMAKE_CXX_FLAGS:STRING=-pipe -Wall -Wextra" -D "CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG" -D "CMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-4.2" -D "CMAKE_C_FLAGS:STRING=-pipe -Wall -Wextra" -D "CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG" -D "CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON" -D "CMAKE_INSTALL_PREFIX:PATH=$X2GO_DIST_INST" -D "CMAKE_OSX_ARCHITECTURES:STRING=i386 -arch x86_64 -arch ppc" -D "CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.5" -D "CMAKE_OSX_SYSROOT:PATH=/Developer/SDKs/MacOSX10.5.sdk" -D "CMAKE_VERBOSE_MAKEFILE:BOOL=ON" -D "CMAKE_SKIP_RPATH:BOOL=NO" -D "CPACK_BINARY_BUNDLE:BOOL=OFF" -D "CPACK_BINARY_OSXX11:BOOL=OFF" -D "WITH_BENCHMARKS:BOOL=OFF" -D "WITH_CLIENT_TESTING:BOOL=OFF" -D "WITH_DEBUG_CALLTRACE:BOOL=ON" -D "WITH_DEBUG_CRYPTO:BOOL=OFF" -D "WITH_GCRYPT:BOOL=OFF" -D "WITH_INTERNAL_DOC:BOOL=OFF" -D "WITH_LIBZ:BOOL=ON" -D "WITH_PCAP:BOOL=OFF" -D "WITH_SERVER:BOOL=OFF" -D "WITH_SFTP:BOOL=ON" -D "WITH_SSH1:BOOL=ON" -D "WITH_STATIC_LIB:BOOL=ON" -D "WITH_TESTING:BOOL=OFF"
Build the source.
# make
Install libssh.
# make install
Remove the shared libraries (we only need the static one.)
# rm "$X2GO_DIST_INST/lib/"libssh*.dylib
Run the following commands as a regular, non-root user. You'll need the root password to install them.
1. → nxproxy has to be installed from nx-libs.git
Install nxproxy from git
$ git clone git://code.x2go.org/nxproxy $ cd nxproxy $ autoconf $ ./configure --prefix=/usr $ make $ su -c "make install"
2a. Install x2goclient from git
$ git clone git://code.x2go.org/x2goclient $ cd x2goclient $ export PREFIX=/usr $ make build_client && make install_client
2b. Also build+install x2goplugin
$ make build_plugin && make install_plugin