NX on Android
by cs
Before anyone gets excited: I’m cheating here. This is not a native NX client for Android (more on that at the end of this post). I’m running ubuntu in a chroot environment under Android. It works surprisingly well though.
Ubuntu on Android
Installing Ubuntu in a chroot environment is not the scope of this post. Complete Linux Installer from the Google Play Store makes the process relatively pain-free. Go for Ubuntu 12.04 with the LX Desktop Environment that comes with the “Small Ubuntu Image”.
NX client
Installing an NX client is unfortunately a bit harder than I would have hoped. QtNX is part of the standard Ubuntu repositories, but the Qt widgets didn’t seem to work properly – not sure whether it’s a problem with LXDE or with the VNC client, but the controls (dropboxes etc.) simply didn’t render. Therefore we’ll resort to OpenNX. Binary Debian packages are only available for x86 so that we’ll have to build from source. Launching your newly installed Ubuntu will get you to a root terminal within your chroot environment. First, you’ll have to install some build dependencies:
apt-get install libwxgtk2.8-dev libssl-dev libjpeg-turbo8-dev libpng-dev g++ make libx11-dev libxmu-dev
We’ll get nxssh and nxproxy directly from NoMachine’s open source site (the fixed IPs might change over time!):
cd ~
wget http://64.34.173.142/download/3.5.0/sources/nxproxy-3.5.0-1.tar.gz
wget http://64.34.173.142/download/3.5.0/sources/nxcomp-3.5.0-2.tar.gz
wget http://64.34.173.142/download/3.5.0/sources/nxssh-3.5.0-2.tar.gz
tar -xzf nxproxy-3.5.0-1.tar.gz
tar -xzf nxcomp-3.5.0-2.tar.gz
tar -xzf nxssh-3.5.0-2.tar.gz
cd nxssh
CFLAGS="-I/root/nxcomp" ./configure
make
cp nxssh /usr/local/bin/
chmod 755 /usr/local/bin/nxssh
cd ../nxproxy
./configure
make
cp nxproxy /usr/local/bin/
chmod 755 /usr/local/bin/nxproxy
Then we’ll build OpenNX:
cd ~
wget http://downloads.sourceforge.net/project/opennx/opennx/CI-source/opennx-0.16.0.724.tar.gz
tar -xzf opennx-0.16.0.724.tar.gz
cd opennx-0.16
./configure
make
make install
Some permissions for key files need to be fixed:
chmod 755 /usr/local/share/keys
chmod 666 /usr/local/share/keys/server.id_dsa.key
That’s it. Open a VNC connection to localhost:5902, select “Run” from the start menu and launch opennx.
Native NX client for Android
It should be pretty straightforward to build a native NX client connecting to a native X server. I’ve already ported most of the dependencies for another project. Let me know if there’s any interest.
Would love a native android nx ckient, thanks. Xrdp is ok, freenx rocks.
Compiling opennx I get and internal gcc-4.6 error.
Everything went well until that step?
Could you post the exact error message?
Here is stdout and stderr:
make all-recursive
make[1]: Entering directory `/root/opennx-0.16′
Making all in po
make[2]: Entering directory `/root/opennx-0.16/po’
make[2]: Leaving directory `/root/opennx-0.16/po’
Making all in docs
make[2]: Entering directory `/root/opennx-0.16/docs’
make[2]: Nothing to be done for `all’.
make[2]: Leaving directory `/root/opennx-0.16/docs’
make[2]: Entering directory `/root/opennx-0.16′
CXX opennx-opennxApp.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
make[2]: *** [opennx-opennxApp.o] Error 4
make[2]: Leaving directory `/root/opennx-0.16′
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/opennx-0.16′
make: *** [all] Error 2
Could you use
make V=1
and then post how the compiler is invoked (the line should start with “g++ -DHAVE_CONFIG_H […]”)
I originally used the large ubuntu image. using the small image as you reccomend works fine.
Now how do I use it. Like how do I get the keys right.
When I connect to a known good nxserver, I get the logo screen but then it times out, Any ideas on why. I’m not sure where it could be logged.
Mike
Ok, I started over again on a HP touchpad tablet and all went well. It works perfectly. So yhe nook color just can’t do it.
I found qtnx 0.9-3ubuntu4 to be working quite good and performant on ubuntu12.04 (lxde-Image from Complete Linux Installer on Android 4.04 stock, Samsung P3110).
No rendering issues at all yes. FreebVNC however seems to be more stable than androidVND.
Only keyboard-mapping is weird in Android, disturbing in nx-session (xmodmap -pke > android.map [on local desktop] and subsequent adding “clear Shift
keycode 10 = Shift_L NoSymbol Shift_L NoSymbol Shift_L” helped
I’m interested in a native NX client for Android.
Hello people,
Perhaps bVNC, my open-source VNC app with AutoX functionality, would serve your purposes? AutoX provides the same functionality as NX but uses VNC rather than a compressed X protocol. The back-end consists of x11vnc and Xvfb or Xvnc.
It’s available on Google Play and Blackberry World for free and as donation-ware. Search for “bVNC” and you’ll find it easily, but here is a link:
http://play.google.com/store/search?q=bvnc
Here is a link to the instructions for AutoX:
http://iiordanov.blogspot.ca/2012/10/looking-for-nx-client-for-android-or.html
and a link to my post about a checf cookbook I wrote to configure a shared server automatically for AutoX (overkill for personal installations, but if you’re a fan of chef, why not?)
http://iiordanov.blogspot.ca/2013/03/chef-cookbook-for-autox-like-nx-with.html
I hope you like it!
Iordan
Hi there, you will see how development is coming along with both the Android and iOS native clients on our Facebook and Google pages. They’re part of the roadmap for NoMachine 4, currently in beta (2).
http://www.nomachine.com/download-beta.php
https://www.facebook.com/nomachine
Come and see! Thanks, Sarah from Nomachine
[…] on Android or iOS, although a how-to for geeks describes how to run NX in a chroot environment with Ubuntu on Android; however, the benefits of this solution in the daily grind would appear to be […]