This post shows how to setup a workstation for various Linux distributions.

This uses the lxc scripts described in this blog post:

Inside a container, you can install an LXDE or XFCE desktop and X2Go server. If you route traffic to port 22 of the container, you can connect with the x2goclient to your workstation.

For Ubuntu 14.04:

apt-get install lxde-core
apt-get install software-properties-common
apt-add-repository ppa:x2go/stable
apt-get update
apt-get install x2goserver

For Fedora 20:

yum install @lxde-desktop google-droid-*-fonts
yum install x2goserver

For CentOS 7:

yum -y groupinstall "Xfce"
rpm -ivh
yum install x2goserver
Tags: ,
Posted in Software Development | Comments Closed

My testing environment is a workstation running on a JiffyBox, using X2Go

Here are the steps that I use to setup my machine with OpenSUSE 12.3:

zypper install -t pattern kde4 kde4_basis findutils-locate

Install X2Go as described here:

zypper addrepo
zypper refresh
zypper install x2goserver

Then I run these commands so that the login works with a password:

/etc/init.d/x2gocleansessions start
sed -i "s/PasswordAuthentication .*/PasswordAuthentication yes/g" /etc/ssh/sshd_config
/etc/init.d/sshd start
useradd myusername -m
passwd myusername

To install the latest MonoDevelop, follow these instructions:

zypper addrepo
zypper refresh
zypper install monodevelop-opt

Now I had the problem that MonoDevelop did not start.

I tried everything:

. /opt/mono/
cd /opt/monodevelop/lib/monodevelop/bin
strace MONO_LOG_LEVEL=debug mono -O=-aot  MonoDevelop.exe

but no error message that I would understand.

Then I tried running monodoc, and this finally gave an error that I could understand:

The program 'browser' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadValue (integer parameter out of range for operation)'.
  (Details: serial 131 error_code 2 request_code 25 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

This lead me to this bug report: which mentions X2Go. At the end of that bug, it says that a specific version of Cairo does not support old XRenderers anymore. It has been fixed in version

To build and install that version of Cairo, I followed these steps:

tar xf cairo-1.12.16.tar.xz
cd cairo-1.12.16
zypper install gcc libpng-devel libpixman-1-0-devel make libX11-devel libXrender-devel libXext-devel libXt-devel fontconfig-devel
./configure --prefix=/usr --enable-xlib
make install

Now MonoDevelop and monodoc start fine on OpenSUSE over a remote connection via X2Go.

Tags: , ,
Posted in Software Development | Comments Closed

I am providing now a server for development of OpenPetra, with X2Go desktop remoting.
See more details at

To save costs, I am running the server on a jiffybox, which costs less when you freeze it.

So I am providing a php script that allows starting the machine, and to refresh it. After the last start or refresh, the machine will be stopped and frozen.

Now it would be good to remind the users once in an hour to do visit the refresh link.
I am using zenity to display the message.
This script will get all users logged in over X2Go, and display the message on their desktops:

message="Server will shutdown soon, please refresh if you still need it by visiting"
wall $message
for display in `ps xaf | grep x2goagent | grep -v grep | awk '{ print ( $(NF) ) }'`
  user=`ps xaf | grep x2goagent | grep -v grep | grep "$display$" | awk ' { print ( $(NF-5) ) }' | awk ' { print ( $3 ) }' FS='/'`
  echo "$user $display"
  su - $user -c "zenity --info --display=$display --text='$message'&"

(for better layout, see

The crontab looks like this, to run it every hour:
0 */1 * * * /root/

The php script looks like this:

The script is installed on a separate machine, that is always running.
The users can call jiffybox.php/?operation=refresh to start or refresh the machine.
The cronjob for stopping the machine looks like this:
*/15 * * * * cd ~/subs/jb; php jiffybox.php

Tags: , ,
Posted in Software Development | Comments Closed

For OpenPetra, we want to provide a preconfigured Linux machine, so that interested developers can have a quick start, and don’t need to spend so much time on installing a development environment.

I looked at FreeNX, NeatX, OpenNX, and X2Go.
NeatX does not seem to be continued.

FreeNX with OpenNX works, but I had problems with the sound.
To install FreeNX on Ubuntu Oneiric, follow the instructions at Ubuntu Forums. This avoids the problem with esound and libesd0 packages.

Finally, I have to say that X2Go works best for me. Sound is played, and access from Windows and Linux works fine to my Linux Remote Desktop.

To install the X2Go server on Ubuntu Oneiric:

 apt-add-repository ppa:x2go/stable
 add universe to /etc/apt/sources.list
 apt-get update
 apt-get install x2goserver

You get the client from

One thing I had problems with: there was a blank or black screen, after logging in.
To debug this: I searched the log files, but could not find any clues. Then I remembered this: use the terminal as login shell, which works. There you can start your desktop manager, in my case /usr/bin/startlxde.
The error that came up was: missing
I then found on the mailing list a discussion:
So I added the line 


at the top of /usr/bin/startlxde, and everything works now.

I also installed libjpeg-turbo, which should make the remote desktop even faster:

wget '' -O libjpeg-turbo_1.2.0_i386.deb
dpkg -i ...
rm /usr/lib/i386-linux-gnu/
ln -s /opt/libjpeg-turbo/lib/ /usr/lib/i386-linux-gnu/

One useful key combination is ctrl alt t, which allows you to terminate or to suspend the current session.
It seems ctrl alt k does not work with X2Go, which would allow the task switching with Alt Tab to be inside the Linux workstation.
The shortcuts available from NoMachine are listed here:

By the way, I got X2Go work fine on virtual machines running on VMWare ESXi, and also on OpenVZ.