Remote Desktop to Pi - How to install NXServer on Pi


41 posts   Page 1 of 2   1, 2
by diygadget » Mon Sep 17, 2012 5:59 pm
Hi, I have put up an instruction on how to install nxserver on pi:

http://www.tiaowiki.com/w/Install_NX_Se ... spberry_Pi

After you have done the steps mentioned in the tutorial, you can access your Raspberry Pi from any machine use NX Client.

For people who don't know NX, NX is a remote desktop protocol similar to VNC but a lot faster then VNC.

Screen shot:

Image
Posts: 1
Joined: Mon Sep 17, 2012 5:38 pm
by computaholic » Fri Oct 05, 2012 2:27 pm
For some reason, compiling in folder

nxcompext

does not work. Any Idea?
Posts: 4
Joined: Mon Jun 25, 2012 8:36 pm
by caldimerda » Tue Oct 09, 2012 10:13 am
OK, I seem to have got this to work. I made a couple of changes to the very helpful information provided here: http://www.tiaowiki.com/w/Install_NX_Se ... spberry_Pi

When compiling the nomachine sources, you can jump straight to "make World" in ./nx-X11 - it compiled all the nomachine sources for me and fixed the errors with nxcompext that I got when trying to compile one source folder at a time.

Oh - and where he says you can get a coffee while compiling, IMHO you can make that dinner - it isn't quick :-) You could drink several coffees while the package manager installs the prerequisites...

After the installation, my clients - nomachine or openNX - did not work using the xdm or custom options. As far as I can see the freenx server can't find an appropriate X window manager corresponding with these session options, no matter what I did on either client or server (I wonder if the OP has installed xdm?) Anyway - after a *lot* of searching and not finding an answer, I simply changed the kde start command in /var/NX/etc/node.conf from startkde to startlxde and then told my client to use kde. It works so far.

Finally - slightly OT - my r-pi with the latest debian soft-float image (because I'm using the JDK) had a 128M:128M RAM split between CPU and GPU - so not much usable memory. I copied the 192M start.elf and it all runs a lot quicker.
Posts: 20
Joined: Tue Oct 09, 2012 9:41 am
by zaggynl » Tue Oct 09, 2012 2:20 pm
Hi, sorry to resurrect this thread.
I'm trying to compile it per folder and run into the missing files with nxcompext
How do I do this "make World?"
make World
make: *** No rule to make target `World'. Stop
Posts: 3
Joined: Tue Oct 09, 2012 2:18 pm
by zaggynl » Tue Oct 09, 2012 3:20 pm
zaggynl wrote:Hi, sorry to resurrect this thread.
I'm trying to compile it per folder and run into the missing files with nxcompext
How do I do this "make World?"
make World
make: *** No rule to make target `World'. Stop


Whoops, for some reason I hadn't fully extracted the nx-X11 folder, disregard.
Posts: 3
Joined: Tue Oct 09, 2012 2:18 pm
by computaholic » Tue Oct 09, 2012 3:46 pm
Thx for the answers.

Well, I used the Unix-Custom->Start command at startup: /usr/lib/startlxde AND create virtual desktop (this refers to the official nomachine client) and it works.

Thanks for the usefull information, I guess now nx server is not that much of problem anymore;)
Posts: 4
Joined: Mon Jun 25, 2012 8:36 pm
by zaggynl » Wed Oct 10, 2012 9:12 am
Managed to get freenx-server installed I think, copied over the freenx-server init.d script from an ubuntu server and changed this variable: PATH_BIN=/usr/NX/bin
Changed the port in node.conf to my ssh port, imported the generated client.id_dsa.key.
Restarted freenx-server.

Can't connect with OpenNX, it simply crashes on connection or displays session startup failed
Nomachine NX Client stops with the following error:
cat: /usr/NX/var/db/running/sessionId{(STDIN)}: No such file or directory

I did follow the instructions for copying over the node.conf file and uncommenting
#COMMAND_MD5SUM="openssl md5"

Did I miss anything?
Posts: 3
Joined: Tue Oct 09, 2012 2:18 pm
by computaholic » Wed Oct 10, 2012 9:53 am
did you change

#COMMAND_MD5SUM="openssl md5"

to

COMMAND_MD5SUM="md5sum"

?
Posts: 4
Joined: Mon Jun 25, 2012 8:36 pm
by flowersrj » Sat Oct 20, 2012 5:42 am
Hi,

Should one a reference to nxserver when doing a PS AUX ?

Thanks, Rich
Posts: 3
Joined: Thu Oct 18, 2012 10:52 pm
by mdroberts1243 » Wed Dec 12, 2012 2:23 am
Thank-you Caldimerda!

After the installation, my clients - nomachine or openNX - did not work using the xdm or custom options. As far as I can see the freenx server can't find an appropriate X window manager corresponding with these session options, no matter what I did on either client or server (I wonder if the OP has installed xdm?) Anyway - after a *lot* of searching and not finding an answer, I simply changed the kde start command in /var/NX/etc/node.conf from startkde to startlxde and then told my client to use kde. It works so far.


Worked for me too!
-mark.
Posts: 1
Joined: Wed Dec 12, 2012 2:21 am
by caldimerda » Wed Dec 12, 2012 11:04 am
Hi Mark - glad it helped.

For anyone finding this topic - a gotcha that I couldn't fix is this -

In order to connect to an existing remote session from any client, the client must define the same window dimensions and colour depth. The dimensions bit is easy - it's defined in the client session - but the colour depth is automatically provided by the client computer and there is nothing NX can do about it. So to connect to a 32 bit session, your client PC must be configured for 32-bit colours. Now I can connect to my Raspis from all my Windows and Linux PCs.

Sounds simple but I wasted a lot of time trying to configure the NX client on my old Linux laptop configured at an economical 16 bit colour depth - but I can't. Loads of posts on the www were telling me this and I should have believed them...
Posts: 20
Joined: Tue Oct 09, 2012 9:41 am
by cymerman » Fri Dec 14, 2012 3:22 pm
Thank-you Caldimerda!

After the installation, my clients - nomachine or openNX - did not work using the xdm or custom options. As far as I can see the freenx server can't find an appropriate X window manager corresponding with these session options, no matter what I did on either client or server (I wonder if the OP has installed xdm?) Anyway - after a *lot* of searching and not finding an answer, I simply changed the kde start command in /var/NX/etc/node.conf from startkde to startlxde and then told my client to use kde. It works so far.


Worked for me too!

Just to be a little more clear for other noobs like me....

sudo vi /usr/NX/etc/node.conf

Find:
#COMMAND_START_KDE=startkde

Replace with:
COMMAND_START_KDE=startlxde

Go to NX Client and pick KDE

You good to go !!!

Dont forget to copy the KEY into your NX Client also
Posts: 2
Joined: Fri Dec 14, 2012 3:15 pm
by cymerman » Fri Dec 14, 2012 4:18 pm
After doing all that I cant see the TEXT next to the icons.... What am I missing?

I can connect using KDE on my NX Client but I dont see TEXT next to icons nor when I type a URL on the browser.

Image

Uploaded with ImageShack.us
Posts: 2
Joined: Fri Dec 14, 2012 3:15 pm
by dairon » Sat Dec 15, 2012 12:26 pm
Hi guys,

I also have problems with the nx installation... hopefully you can help me.

I went through the configuration and i'm now trying to connect to my PI. Unfortunately the session just stops after 'downloading session information'. Every second time I try it tells me that the session has been terminated. In the details there are no errors. For more info please refer to the output below:

Info: Display running with pid '6380' and handler '0x90562'.

NXPROXY - Version 3.4.0

Copyright (C) 2001, 2010 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '4936'.
Session: Starting session at 'Sat Dec 15 13:21:42 2012'.
Warning: Connected to remote version 3.5.0 with local version 3.4.0.
Warning: Consider checking http://www.nomachine.com/ for updates.
Info: Connection with remote proxy completed.
Warning: Unrecognized session type 'unix-desktop'. Assuming agent session.
Info: Using LAN link parameters 1536/24/1/0.
Info: Using pack method 'adaptive-9' with session 'unix-desktop'.
Info: Not using NX delta compression.
Info: Not using ZLIB data compression.
Info: Not using ZLIB stream compression.
Info: Not using a persistent cache.
Info: Forwarding X11 connections to display ':0'.
Info: Listening to font server connections on port '11000'.
Session: Session started at 'Sat Dec 15 13:21:42 2012'.
Session: Terminating session at 'Sat Dec 15 13:21:43 2012'.
Info: Your session was closed before reaching a usable state.
Info: This can be due to the local X server refusing access to the client.
Info: Please check authorization provided by the remote X application.
Session: Session terminated at 'Sat Dec 15 13:21:43 2012'.


While going through the installation steps everything worked except the second patching with the self created patch file. The code in there seems to be wrong as I get errors that some commands do not work (it tells me anything with hunk 606..).

How can i check if everything is working properly? How can I debug the connection to see where the error occurs? Hopefully you guys can help me as I'm stuck since hours.. :(

Thanks a lot,
dairon
Posts: 28
Joined: Sat Dec 15, 2012 12:17 pm
by dairon » Sat Dec 15, 2012 1:27 pm
hi again,

I tried restarting the PI and connecting again but still it was not working. After I installed the newest version (same as on the PI) on another PC the connection was successfully established... :D Even though I can now connect to my PI I've got the same issue as cymerman. No text is visible when connected remotely..

What does this mean?

thanks for you support
Posts: 28
Joined: Sat Dec 15, 2012 12:17 pm
by Gnome » Sat Dec 15, 2012 9:05 pm
For info, if you want to use RDC from a windows machine I find "xrdp" is excellent and very quick to install.

Code: Select all
sudo apt-get install xrdp
Regards

Gnome
User avatar
Posts: 3
Joined: Sat Dec 15, 2012 6:55 pm
by dairon » Sat Dec 15, 2012 11:21 pm
hi gnome,

thanks for your response. Of course, there are a lot remote access tools out there. The reason why I want to use nx is that it is tunneled via port 22 and I do not have to open other tcp ports which will compromise security. NX feels also faster than xrdp as far as I can see.

many thanks,
dai
Posts: 28
Joined: Sat Dec 15, 2012 12:17 pm
by caldimerda » Mon Dec 17, 2012 6:56 pm
Hi Dairon

I'm not sure I can help with the fonts issue. All I know about fonts is that I think they are all local to the client and are scaled to match what the server is trying to display (eg if server uses courier 8 point but you lack that, the client picks something close).

My desktop looks OK - but the Raspis have no icons or background image to reduce the overhead of using x-windows. I'm using the 3.5.0-9 NX client on windows and a 3.3 NX client on two old Debian.laptops.

Regards Caldimerda
Posts: 20
Joined: Tue Oct 09, 2012 9:41 am
by carlosap78 » Thu Jan 03, 2013 8:03 pm
If you have compiled freenx, please share your binaries for raspbian, its a pain and time consuming to compile it, please! :mrgreen:

Thanks
Posts: 1
Joined: Thu Jan 03, 2013 7:56 pm
by mhfrey » Sun Jan 13, 2013 7:41 pm
I an trying to get NX running by compiling from the sources as the wiki states. I am doing something dumb or do not have something installed, I get the following configure error when trying to configure nxcomp:

./configure
checking for g++... g++
checking for C++ compiler default output file name... configure: error: C++ compiler cannot create executables
See `config.log' for more details.

Any help in fixing this would be appreciated. The configure log is:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was

$ ./configure

## --------- ##
## Platform. ##
## --------- ##

hostname = raspberrypi
uname -m = armv6l
uname -r = 3.2.27+
uname -s = Linux
uname -v = #250 PREEMPT Thu Oct 18 19:03:02 BST 2012

/usr/bin/uname -p = unknown
/bin/uname -X = unknown

/bin/arch = unknown
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin
PATH: /usr/local/games
PATH: /usr/games


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1433: checking for g++
configure:1449: found /usr/bin/g++
configure:1459: result: g++
configure:1475: checking for C++ compiler version
configure:1478: g++ --version </dev/null >&5
g++ (Debian 4.6.3-12+rpi1) 4.6.3
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:1481: $? = 0
configure:1483: g++ -v </dev/null >&5
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.6/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-12+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.6.3 (Debian 4.6.3-12+rpi1)
configure:1486: $? = 0
configure:1488: g++ -V </dev/null >&5
g++: error: unrecognized option '-V'
g++: fatal error: no input files
compilation terminated.
configure:1491: $? = 4
configure:1514: checking for C++ compiler default output file name
configure:1517: g++ -O3 -fno-rtti -fno-exceptions -I../nx-X11/exports/include conftest.cc -L../nx-X11/exports/lib >&5
conftest.cc: In function 'int main()':
conftest.cc:16:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.
Preprocessed source stored into /tmp/cckHqhQh.out file, please attach this to your bugreport.
configure:1520: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:1559: error: C++ compiler cannot create executables
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_prog_ac_ct_CXX=g++

## ----------------- ##
## Output variables. ##
## ----------------- ##

ALL=''
CC=''
CFLAGS='-O3 -I../nx-X11/exports/include'
CPPFLAGS=''
CXX='g++'
CXXCPP=''
CXXFLAGS='-O3 -fno-rtti -fno-exceptions -I../nx-X11/exports/include'
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA=''
INSTALL_PROGRAM=''
INSTALL_SCRIPT=''
LDFLAGS=''
LIBOBJS=''
LIBS=' -L../nx-X11/exports/lib'
LIBVERSION=''
LTLIBOBJS=''
MAKEDEPEND=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
SHELL='/bin/bash'
VERSION=''
X_CFLAGS=''
X_EXTRA_LIBS=''
X_LIBS=''
X_PRE_LIBS=''
ac_ct_CC=''
ac_ct_CXX='g++'
armcc=''
armcxx=''
bindir='${exec_prefix}/bin'
build_alias=''
datadir='${prefix}/share'
exec_prefix='NONE'
host_alias=''
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='NONE'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME ""
#define PACKAGE_STRING ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""

configure: exit 77
Posts: 2
Joined: Sun Jan 13, 2013 7:35 pm
by SoliDeoGloria » Mon Jan 28, 2013 4:29 am
cymerman wrote:After doing all that I cant see the TEXT next to the icons.... What am I missing?

I can connect using KDE on my NX Client but I dont see TEXT next to icons nor when I type a URL on the browser.

Uploaded with [url=http://imageshack.us]ImageShack.us

dairon wrote:hi again,

I tried restarting the PI and connecting again but still it was not working. After I installed the newest version (same as on the PI) on another PC the connection was successfully established... :D Even though I can now connect to my PI I've got the same issue as cymerman. No text is visible when connected remotely..

What does this mean?

thanks for you support


I have this problem too. From searching on the internet, it appears to be a problem with GTK programs and libcairo. Google "libcairo nx" for more information. Downgrading libcairo seems to be a fix, although a bad one. I'd be interested if anyone has a better solution.
Posts: 5
Joined: Mon Jan 28, 2013 4:24 am
by SoliDeoGloria » Mon Jan 28, 2013 11:35 pm
It also might be of note, that a friend of mine on a linux machine could see fonts just fine. But my Windows machine can not.
Posts: 5
Joined: Mon Jan 28, 2013 4:24 am
by NOsen » Wed Feb 06, 2013 11:41 pm
i get this error on paching

Code: Select all
patch --verbose < ../nx_3.5.0.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|
|
|--- nxloadconfig.orig   2009-05-26 16:13:02.000000000 -1000
|+++ nxloadconfig        2009-05-26 16:13:22.000000000 -1000
--------------------------
Patching file nxloadconfig using Plan A...
Hunk #1 FAILED at 606.
1 out of 1 hunk FAILED -- saving rejects to file nxloadconfig.rej
Hmm...  Ignoring the trailing garbage.
done




And when i run
Code: Select all
sudo /usr/NX/bin/nxsetup --install


i get this error

Code: Select all
Error: Could not find 1.5.0 or 2.[01].0 or 3.[01].0 version string in nxagent. NX 1.5.0 or 2.[01].0 or 3.[012].0 backend is needed for this version of FreeNX.



any ideas whats wrong ?
Posts: 1
Joined: Wed Feb 06, 2013 11:08 pm
by LowOnPancakes » Mon Feb 11, 2013 1:08 am
I'm hoping someone my help get me pointed back in the right direction as I've been struggling to get NXserver up and running. I think I've installed and patched everything correctly on the server side, including the change to reference from kde to lxde. I'm using Nomachine client on windows. When I try connecting, it looks like a remote desktop window starts, then auto closes after about a second. The session detail is listed below for any insight.

Info: Display running with pid '6100' and handler '0xf0830'.

NXPROXY - Version 3.5.0

Copyright (C) 2001, 2011 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '3300'.
Session: Starting session at 'Sun Feb 10 17:04:18 2013'.
Info: Connection with remote proxy completed.
Warning: Unrecognized session type 'unix-kde'. Assuming agent session.
Info: Using LAN link parameters 1536/24/1/0.
Info: Using pack method 'adaptive-9' with session 'unix-kde'.
Info: Not using NX delta compression.
Info: Not using ZLIB data compression.
Info: Not using ZLIB stream compression.
Info: Not using a persistent cache.
Info: Forwarding X11 connections to display ':0'.
Info: Forwarding SMB connections to port '445'.
Info: Forwarding multimedia connections to port '6000'.
Info: Listening to font server connections on port '11000'.
Session: Session started at 'Sun Feb 10 17:04:18 2013'.
Info: Established X server connection.
Info: Using shared memory parameters 0/0K.
Session: Terminating session at 'Sun Feb 10 17:04:21 2013'.
Session: Session terminated at 'Sun Feb 10 17:04:21 2013'.


Any help would be greatly appreciated.
Posts: 4
Joined: Mon Feb 11, 2013 12:54 am
by SoliDeoGloria » Mon Feb 11, 2013 4:05 am
I think I may have had the same problem as you at some point, but I can't remember what I did to rectify the situation. Try this and tell me how it works. In the connection setting in the area mark desktop choose unix in the first list box, custom in the second and then hit the setting button in the same area. Then in the application area choose "Run the following command" and for the command put "/usr/bin/lxterminal" (without quotes). In the same window make sure the "floating window" option is checked. Hit okay on everything and try connecting.

Hope this helps!
Posts: 5
Joined: Mon Jan 28, 2013 4:24 am