Table of Contents

How to Betatest a newer NX-Libs version from Arctica

What is Arctica and what do they have to do with X2Go and NX-Libs?

The Arctica Project is a fork/spin-off of X2Go, and overlapping with X2Go in several goals as well as the names of the volunteers involved.

Currently, one of the most important sub-projects within the Arctica project is the task of updating the NX-Libraries (the code that NoMachines was forced to release under GPL, on which FreeNX, NeatX, X2Go etc. all depend). Some X2Go volunteers are joining in on that effort as well, also, there are sponsors involved, namely Qindel/TheQVD, who work on improving the NX-Libs themselves as well as paying others to do so.

From time to time, Arctica will bundle up a release (see e.g. the announcement here: https://sunweavers.net/blog/node/52), but they provide nightly builds as well: https://sunweavers.net/blog/node/20.

X2Go bases its NX-Libraries releases on Arctica's release versions, similar to how Debian prefers “stable and well-tested” over “bleeding edge”.

It is possible to “pimp” X2Go with Arctica's NX-Libs, though we strongly advise against doing so on a production server.

Please, try this on a test server, not on your production machine, and always make a backup copy before installing/upgrading.

That said, we are heavily interested in finding betatesters, so these new NX-Libs may become part of X2Go proper in the future.

If you're able and willing to test, then please read on.

Installation Instructions

This should work for Debian (starting with Jessie) as well as for Ubuntu Server (starting with 16.04 LTS).

It has been tested with Ubuntu Server 16.04 and 18.04, as well as Debian Buster with the “regular” (non-nightly) Arctica repository. Everything else is still awaiting tests by volunteers like you.

#!/bin/bash
# https://wiki.x2go.org/doku.php/doc:howto:nx-libs-betatesting
set -e # abort on all errors

if ! [ $(id -u) -eq 0 ] ; then
	echo 'This script must be run as root, or with sudo prefixed to its call.'
	exit 1
fi

if [ -f /etc/os-release ] ; then
	. /etc/os-release
else
	echo '/etc/os-release not found. Unable to detect distribution.'
	exit 1
fi

if [ 'debian' != "$ID" ] && [ "ubuntu" != "$ID" ]; then
	echo 'Unsupported distribution. Only Debian and Ubuntu are supported at the moment.'
	exit 1
fi

apt install gnupg -y

if [ 'debian' = "$ID" ] ; then
	# add the X3Go repo key (Debian only)
	apt-key adv --recv-keys --keyserver keys.gnupg.net E1F958385BFE2B6E
fi

# add the X2Go repo
if [ 'ubuntu' = "$ID" ] ; then
	add-apt-repository ppa:x2go/ppa # for Ubuntu
elif [ 'debian' = "$ID" ] ; then
	echo 'deb http://packages.x2go.org/debian '$VERSION_CODENAME' main' >/etc/apt/sources.list.d/x2go.list # for Debian
fi

# add the Arctica repo key
wget -qO - http://packages.arctica-project.org/archive.key | apt-key add -

# add the Arctica repo
echo 'deb http://packages.arctica-project.org/'$ID' '$VERSION_CODENAME' main' > /etc/apt/sources.list.d/arctica.list

# OR try the Arctica nightly repo
# echo 'deb http://packages.arctica-project.org/'$ID'-nightly '$VERSION_CODENAME' main' > /etc/apt/sources.list.d/arctica.list

# update the package list before installing anything
apt update

# update the base system to the current package versions
# Download everything first, then upgrade, then dist-upgrade
apt dist-upgrade -d -y
apt upgrade -y
apt dist-upgrade -y

# Install X2Go packages, a minimal MATE Desktop, and Firefox as test application
apt install -y \
    x2goserver \
    x2goserver-xsession \
    x2gomatebindings \
    mate-core \
    mate-applets mate-menus \
    mate-notification-daemon \
    mate-screensaver \
    libcanberra-pulse

if [ 'ubuntu' = "$ID" ] ; then
	apt install -y firefox ubuntu-mate-themes # for Ubuntu
fi
if [ 'debian' = "$ID" ] ; then
	apt install -y firefox-esr mate-themes # for Debian
fi

# add a user
if ! id -u x2gotestaccount ; then
	useradd -m -s /bin/bash x2gotestaccount
	echo 'Please set a password for user "x2gotestaccount".'
	passwd x2gotestaccount
fi
echo 'Setup complete.'

On the X2GoServer, edit /etc/x2go/x2goagent.options:

Also on the X2GoServer, verify that /usr/bin/x2goagent is a symlink pointing to /usr/bin/nxagent.

Next, disable XINERAMA in your X2GoClient's session profile(s).

You should also add the Arctica repo on the client where you wish to use X2GoClient, and run apt update && apt dist-upgrade -d -y && apt upgrade -y && apt dist-upgrade -y on it.

If you don't/can't do that (e.g. because you're running Windows or macOS on your client), connecting with X2GoClient 4.0.5.2 should still work, though you might not experience all the benefits of the new NX-Libs.

When your first session is up and running, check the following on the server:
  1. ps u -C x2goagent (identify the pid of your session's x2goagent)
  2. grep -e libX11 -e libNX_X11 /proc/<pid>/maps

This should only show libraries from the nx installation directory, not from the system.

Reporting Bugs

Please follow the instructions listed at Reporting Bugs. Do subscribe to the X2Go-Dev Mailing List beforehand, please (instructions on how to do that are linked within that page). It may well be possible that your bug report gets forwarded to Arctica, so you might want to subscribe to their mailing list(s) as well.

Also, when reporting a bug, please indicate which repositories you were using, and the X2Go/NX/Arctica-related package versions you have installed.