Monday, 27 February 2012

Ubuntu Oneiric and X2Go with LXDE for Remote Desktop

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.

Friday, 3 February 2012

Ext.Net 1.2 and Mono 2.10 on Ubuntu Oneiric

We have upgraded all the code of OpenPetra to .net 4.0.
We also upgraded to Ext.Net 1.2.

There were two bugs in Mono 2.10, which were show-stoppers: was a problem with the mono compiler, in Mono 2.10.x
This was fixed in mono master.

So I tried to build mono from master, but then I had problems with fastcgi, while xsp4 was serving the content correctly:
This was also fixed in mono master.

Below is a link to a tar.gz file, that contains the build of Mono, with mod_mono and xsp, at the beginning of February 2012.

I wanted to use lighttpd and fastcgi with Mono and Ext.Net, but that did not work.
The error that I got was similar as to described here, but without a solution that works for me:
It works fine with xsp4.

I then tried with mod_mono and apache2:
I came across this issue, that the resources cannot be loaded. The solution from that thread also helped me:
Add CleanResourceUrl = "false" to your .aspx file:
<ext:ResourceManager  runat="server" CleanResourceUrl="false" />

So here are my configuration steps for Ext.Net with Mono and Apache2:

This works with Ubuntu Oneiric 64 bit (11.04). But it might work on other Ubuntu/Debian version as well. I have also used it on CentOS.

apt-get install apache2
cd /opt
for 32 bit: wget
tar xzf mono.tar.gz
cd /usr/lib/apache2/modules/
for 32 bit: wget
cd /etc/apache2/mods-enabled
# note that mod_mono.conf contains this line:
# MonoServerPath /opt/mono-2.10-git/bin/mod-mono-server4
vi /etc/init.d/apache2
# search for LANG, and replace with this line:
ENV="env -i LANG=en_GB PATH=/opt/mono-2.10-git/bin:/usr/local/bin:/usr/bin:/bin"
Mono will create a directory /var/www/.mono which should not be public.
In your apache site configuration file, add just before  <Directory /var/www/>
<directorymatch \.mono>

           Deny from all
cd /var/www
tar xzf extnet-sample-mono.tar.gz
chown -R www-data:www-data /var/www
/etc/init.d/apache2 restart

See the result here:

This is the demo for the Desktop from Ext.Net 1.2, with a slight modification in Default.aspx and Desktop.aspx for the ResourceManager as described above.