# Installing NX Server Free Edition (not FreeNX)

## nondystam

Can someone provide some instructions on how to install the NX Server Free Edition, available from http://www.nomachine.com/select-package.php?os=linux&id=1 ?

It is not in portage, and the downloads only offer DEB, RPM and compressed TAR packages. I assume it is possible to use one of these versions in Gentoo without any hassles, but I am not sure what steps are involved?

In addition, how would I go about starting the server automatically during the boot process? Is it as simple as using rc-update or do I need to make a script as well?

Thanks.

----------

## tightcode

I would also be interested in this. I have read a few howtos for FreeNX but also from what I read the NoMachines free version is much more stable and has less issues than FreeNX.

Has anyone here successfully setup the "Official" free version of NXserver by NoMachines ?

At the time of posting the the version available is: nxserver-2.0.0-76

I have searched the forums, the wiki as well as bugzilla with no information on this.

Thanks to anyone who has anything to share!

Cheers,

 TightCode

Post Scriptum: Another thing of interest is the newly OpenSourced 2X TerminalServer:

Press release: http://www.2x.com/news/linuxterminalserver.htm

Download area: http://code.2x.com/linuxterminalserver/downloads

----------

## GNUtoo

http://gentoo-wiki.com/HOWTO_FreeNX_Server

----------

## tightcode

new_to_non_X86, As the title of this thread and the two posts (nondystam's and mine), we are discussing NX Server Free Edition, which is NOT FreeNX. Would you happen to have any experience with it ?

Thanks!

TightCode

----------

## GNUtoo

sorry

and no i don't have any experience with it   :Crying or Very sad:   :Crying or Very sad:   :Crying or Very sad: 

----------

## moe

Hi,

At the moment I'm replacing an Ubuntu nxserver with a Gentoo nxserver. I also want to use the Nomachine free for ever edition. I installed the nxserver in the following way:

```

cd /usr

tar xvzf /.../nxnode-2.0.0-100.i386.tar.gz

tar xvzf /.../nxclient-2.0.0-98.i386.tar.gz

tar xvzf /.../nxserver-2.0.0-76.i386.tar.gz

emerge lib-compat

/usr/NX/scripts/setup/nxnode --install debian

/usr/NX/scripts/setup/nxserver --install debian

```

I've choosen debian, because I believe this system is nearest to gentoo, the install scripts warns about missing /et/rc.d directories, but in my setup the nxserver is startet while the connect clients, not as a daemon. I believe this is the normal case, a daemon is only used in greater installations. But I'm not absolutely sure.

A connection with the linux nxclient will fail at this moment because no fonts (esp. fixed) can be found. nxnode will search them in the old XFree-Dirs, so you must add this to /usr/NX/etc/node.cfg:

```
AGENT_EXTRA_OPTIONS_X="-fp /usr/share/fonts/default/,/usr/share/fonts/misc/,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi"
```

Now a gnome-session will be started. I've installed only gnome-light at this moment, nxclient will need qt, but the nxserver uses only some files of nxclient, so it seems that nxserver works even with no qt installed.

I haven't tested anything more at this time, but I think its a good base to do more testing by yourself.

HTH & excuse my english, Maurice

----------

## 2lt.chronic

I have also been watching for news about this from gentoo devs. I have been running this version on an ubuntu machine since its release and it works great and stable (from the .deb package). But nothing yet, this is what always depresses me about gentoo

----------

## moe

I was also wondering about, but NX installs in a seperate directory /usr/NX so its not too complicated to install or deinstall it manually.

BTW: A few month ago, 2x has released a NX-Server and -client under the gpl, but it seems nobody is working on a ebuild right now. If I have more time, I will try to bring this in portage.

----------

## SilentShadow

Hi to all

i follow the moe instructions (to much easy to be real  :Laughing:  ) and now I'm dead in to this error:

Client Side

```

NX> 203 NXSSH running with pid: 14099

NX> 285 Enabling check on switch command

NX> 285 Enabling skip of SSH config files

NX> 285 Setting the preferred NX options

NX> 200 Connected to address: 192.168.0.201 on port: 22

NX> 202 Authenticating user: nx

NX> 208 Using auth method: publickey

/usr/NX/bin/nxserver.bin: symbol lookup error: /usr/lib/libssl.so.0.9.8: undefined symbol: EVP_idea_cbc

NX> 280 Ignoring EOF on the monitored channel

NX> 280 Ignoring CLOSE on the monitored channel

Killed by signal 15.

```

Server Side

```

........

Sep 26 15:51:37 xdev001 sshd[18383]: debug1: server_input_channel_req: channel 0 request shell reply 0

Sep 26 15:51:37 xdev001 sshd[18383]: debug1: session_by_channel: session 0 channel 0

Sep 26 15:51:37 xdev001 sshd[18383]: debug1: session_input_channel_req: session 0 req shell

Sep 26 15:51:37 xdev001 sshd[18383]: debug1: Forced command '/usr/NX/bin/nxserver --login'

Sep 26 15:51:37 xdev001 sshd[18383]: debug1: Received SIGCHLD.

Sep 26 15:51:37 xdev001 sshd[18383]: debug1: session_by_pid: pid 18395

Sep 26 15:51:37 xdev001 sshd[18383]: debug1: session_exit_message: session 0 channel 0 pid 18395

.........

```

I'don't found anything usefull on the web about "EVP_idea_c/usr/lib/libssl.so.0.9.8: undefined symbol: EVP_idea_cbc"

also I don't understand why the option --login is not list in the help of nxserver command, but is not so importan i think

Have you any idea?

Thanks a lot Dario

----------

## SilentShadow

 :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy:   :Very Happy: 

resolved my litle problem.

- mask the latest openssl ebuild (openssl-0.9.8c-r2)

- downgrade openssl (actualy I've installed openssl-0.9.7k)

- revdep-rebuild

- /etc/init.d/sshd restart

bye Dario

----------

## moe

Do you use an unstable system? Here is 0.97k the latest stable version, 0.9.8* is ~arch-masked.

But good to know, if 0.9.8 will be marked as stable an my nxserver stops working.

----------

## SilentShadow

no the openssl-0.9.8c-r2 ebuild is marked as stable for x86 in my portage copy

```
# Copyright 1999-2006 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/dev-libs/openssl/openssl-0.9.8c-r2.ebuild,v 1.2 2006/09/24 09:46:27 hansmi Exp $

inherit eutils flag-o-matic toolchain-funcs

DESCRIPTION="Toolkit for SSL v2/v3 and TLS v1"

HOMEPAGE="http://www.openssl.org/"

SRC_URI="mirror://openssl/source/${P}.tar.gz"

LICENSE="openssl"

SLOT="0"

KEYWORDS="-* alpha amd64 ~arm ~m68k ppc ~ppc64 ~s390 ~sh ~sparc x86"

.....

```

bye Dario

----------

## moe

Sorry, I was ssh'ed to an outdated gentoo machine, at the moment I looked for this. You are right, openssl-0.9.8 is stable, and my nxserver is also running with openssl-0.9.8c-r2. This is a fresh install with Gentoo 2006.1 so I believe there was never an older version of openssl installed.

If you upgrade openssl again, an do then a revdep-rebuild, nxserver should also be running.

HTH Maurice

----------

## ekenberg

 *moe wrote:*   

> 
> 
> ```
> AGENT_EXTRA_OPTIONS_X="-fp /usr/share/fonts/default/,/usr/share/fonts/misc/,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi"
> ```
> ...

 

Depending on what fonts you have installed, this will vary. Instead of copying the above, I suggest just getting your current Xorg fontpath and use that:

```
grep FontPath /var/log/Xorg.0.log
```

Otherwise, thanks for the information - I'm now running the free NX client/server between home and office, and it's working great!

----------

## SilentShadow

hi,

With a new fresh installation the problem appear again, now with dev-libs/openssl-0.9.8d.

```

NX> 208 Using auth method: publickey

nxserver: symbol lookup error: /usr/lib/libssl.so.0.9.8: undefined symbol: EVP_idea_cbc

NX> 280 Ignoring EOF on the monitored channel

NX> 280 Ignoring CLOSE on the monitored channel

Killed by signal 15.

```

same solution to bypass the problem.

Strange I'm the only one with this error?   :Sad: 

ciao Dario

----------

## jroo

I'm having problems with the server installation:

```
# ./scripts/setup/nxserver --install debian

NX> 700 Installing: server at: ti loka   24 22:10:11 2006.

NX> 700 Autodetected system: debian.

NX> 700 Install log is: /usr/NX/var/log/install.

NX> 700 Creating configuration file: /usr/NX/etc/server.cfg.

./scripts/setup/nxserver: line 719: cd: /etc/rc3.d: No such file or directory

./scripts/setup/nxserver: line 721: cd: /etc/rc2.d: No such file or directory

./scripts/setup/nxserver: line 723: cd: /etc/rc5.d: No such file or directory

./scripts/setup/nxserver: line 725: cd: /etc/rc6.d: No such file or directory

./scripts/setup/nxserver: line 727: cd: /etc/rc0.d: No such file or directory

NX> 723 Cannot start NX statistics:

NX> 709 NX statistics are disabled for this server.

NX> 700 WARNING: Error when trying to connect to NX server, error is:

NX> 700 WARNING: NX> 203 NXSSH running with pid: 16207

NX> 200 Connected to address: 127.0.0.1 on port: 22

NX> 202 Authenticating user: nx

NX> 208 Using auth method: publickey

NX> 204 Authentication failed..

NX> 700 WARNING: nxsetup cannot validate the sanity of the current installation:

NX> 700 WARNING: the current system or NX configuration could be broken.

NX> 700 WARNING: If difficulties arise (for example sessions cannot be started),

NX> 700 WARNING: it is advisable that you try to uninstall the NX server and the

NX> 700 WARNING: NX client packages then install them again.

NX> 700 WARNING: Search also the NoMachine Knowledge Base at the URL below:

NX> 700 WARNING: http://www.nomachine.com/kb

NX> 700 WARNING: for common errors encountered when performing a software update

NX> 700 WARNING: and the related hints on how to solve them..

NX> 700 Installation of NX server was completed with warnings.

NX> 700 Please review the install log '/usr/NX/var/log/install'

NX> 700 for further details.
```

Has anyone else encountered this kind of problem? I can't connect to server and after a while I noticed everything is not set properly as you can see from the warnings above.

Ebuilds would be great. I could even try do do those by myself if I only could get this thing up and running.

----------

## SilentShadow

hi jroo,

in the log:

```

NX> 208 Using auth method: publickey

NX> 204 Authentication failed..

```

the publickey authentication doesn't work.

I suggest you to verify your ssh configuration /etc/ssh/sshd_config for the line: "AuthorizedKeysFile"

and then verify the file in the folder /usr/NX/home/nx/.ssh/ the name must be identical and the file must have the public keys of nx server

if this is not your solution maybe you hava regenerated the key pairs for publickey authentication so you need to enter in the AuthorizedKeysFile the new public key that you can find in the file "/usr/NX/etc/keys/node.localhost.id_dsa.pub"

bye Dario

----------

## jroo

There is something else wrong with my configurations. It seems like nxssh is failing.

Here is messages from /var/log/messages:

```
Oct 28 17:18:27 tranquillity sshd[20302]: Accepted publickey for nx from 192.168.0.100 port 56300 ssh2

Oct 28 17:18:27 tranquillity sshd(pam_unix)[20307]: session opened for user nx by (uid=0)

Oct 28 17:18:28 tranquillity sshd[20321]: Accepted keyboard-interactive/pam for tmp from 127.0.0.1 port 35025 ssh2

Oct 28 17:18:28 tranquillity sshd(pam_unix)[20327]: session opened for user tmp by (uid=0)

Oct 28 17:18:28 tranquillity sshd(pam_unix)[20327]: session closed for user tmp

Oct 28 17:18:28 tranquillity 2.1.0-9[20314]: User 'tmp' logged in from '192.168.0.100'. 'NXLogin::set'

Oct 28 17:18:31 tranquillity 2.1.0-9[20314]: Selected node host:localhost with port:22 'main::selectNode'

Oct 28 17:18:31 tranquillity 2.1.0-9[20314]: Current selected node: localhost is in status: running  'main::selectNode'

Oct 28 17:18:32 tranquillity 2.1.0-9[20314]: ERROR: nxssh process exited with '255' 'NXNodeExec::exec'

Oct 28 17:18:32 tranquillity sshd[20337]: Accepted keyboard-interactive/pam for tmp from 127.0.0.1 port 35027 ssh2

Oct 28 17:18:32 tranquillity sshd(pam_unix)[20343]: session opened for user tmp by (uid=0)

Oct 28 17:18:34 tranquillity 2.1.0-7[20344]: INFO: Proxy IP: $res_node_ip:192.168.0.100, $res_node_realip: 'main:nxnode:5406'

Oct 28 17:18:34 tranquillity 2.1.0-9[20314]: Session '0ACA6ED1485EF8C54668B6596BB9D30B' started by user 'tmp'. 'NXShell::handler_session_start'

Oct 28 17:18:34 tranquillity 2.1.0-9[20314]: ERROR: run command: no child process with pid 20330 Logger::log nxserver 3591

Oct 28 17:18:34 tranquillity 2.1.0-9[20314]: User 'tmp' from '192.168.0.100' logged out. 'NXLogin::reset'

Oct 28 17:18:35 tranquillity 2.1.0-7[20344]: INFO: Using port '1017' on node 'tranquillity' for session 'unix-kde'. 'main:nxnode:5472'

Oct 28 17:18:35 tranquillity 2.1.0-7[20344]: INFO: Using host from available host list: '192.168.0.100'. 'main:nxnode:5473'

Oct 28 17:18:36 tranquillity 2.1.0-7[20344]: ERROR: run command: process: 20365 finished with: 1 'main:nxnode:3592'

Oct 28 17:18:36 tranquillity sshd(pam_unix)[20307]: session closed for user nx

Oct 28 17:18:37 tranquillity 2.1.0-7[20375]: ERROR: Error when monitoring session: Session has finished but proxy connection was not closed. 'NXSessionMonitor:NXSessionMonitor.pm:1395'

Oct 28 17:18:37 tranquillity 2.1.0-7[20375]: INFO: Directory '/home/tmp/.nx/C-tranquillity-1017-0ACA6ED1485EF8C54668B6596BB9D30B' renamed into '/home/tmp/.nx/F-C-tranquillity-1017-0ACA6ED1485EF8C54668B6596BB9D30B' for further investigation 'main:nxnode:5637'

Oct 28 17:18:38 tranquillity 2.1.0-7[20344]: INFO: Session 'unix-kde' on port '1017' failed. 'main:nxnode:5680'

Oct 28 17:18:39 tranquillity sshd(pam_unix)[20343]: session closed for user tmp

Oct 28 17:18:44 tranquillity 2.1.0-9[20369]: ERROR: NXNodeExec: Cannot kill nxssh process: No such process 'NXNodeExec::exec'

Oct 28 17:18:44 tranquillity 2.1.0-9[20369]: User 'tmp' from '192.168.0.100' logged out. 'NXLogin::reset'
```

And from nxclien's detailed log dialog:

```
NXPROXY - Version 2.1.0

Copyright (C) 2001, 2006 NoMachine.

See http://www.nomachine.com/ for more information.

Info: Proxy running in client mode with pid '20301'.

Session: Starting session at 'Sat Oct 28 17:18:35 2006'.

Info: Synchronizing local and remote caches.

Info: Handshaking with remote proxy completed.

Info: Using lan link parameters 1536/24/1/0.

Info: Using image streaming parameters 50/128/1024KB/6144/768.

Info: Using image cache parameters 1/1/32768KB.

Info: Using pack method '16m-rle-9' with session 'unix-kde'.

Info: Using product 'LAS/None/LASN/None'.

Info: Not using NX delta compression.

Info: Not using ZLIB data compression.

Info: Not using ZLIB stream compression.

Info: Not using persistent cache.

Info: Listening for font server connections on port '11017'.

Session: Session started at 'Sat Oct 28 17:18:35 2006'.

Info: Established X server connection.

Info: Using shared memory parameters 1/2048K.

Error: Connection with remote peer broken.

Error: Please check the state of your network and retry.

Session: Session terminated at 'Sat Oct 28 17:18:36 2006'.
```

It seems like nxssh is failing and I tried to run nxssh from command line. And the result was:

```
# /usr/NX/bin/nxssh

/usr/NX/bin/nxssh: error while loading shared libraries: libXcomp.so.2: cannot open shared object file: No such file or directory
```

Isn't that library from package libXcomposite? I have version 1.3.1 installed. And I'm using Xorg 7 -- could that be the problem?

----------

## jroo

Oh my. It was the font problem that has been resolved above   :Embarassed: 

Now I'm running with NXserver. Thanks for the help. If I have time, I might try to do ebuild for nxserver

----------

## jrenraw

Submitted a bug/request for new ebuild.

https://bugs.gentoo.org/show_bug.cgi?id=153866

----------

## jake1981

I downloaded this from experimental feed in NX overlay..

Installation worked just fine, expect when I tried it, I got a licensing issue error, even though this was supposed to be

FREE-EDITION. Well, this was mentioned in overlay browser..

So I thought about trying something, I first thought that I'd install nxserver with help of this thread ( install for debian )

and backup files from that (well, mostly server.lic and other license files) and then install it and use licenses from that first install.

Well, first thing I noticed, there's updated versions of nxnode and nxserver-freeedition on nomachine's site, so I first

enabled ebuild to download these versions:

nxnode-2.1.0-12.i386.tar.gz

nxserver-2.1.0-13.i386.tar.gz

Then I installed:

```

mainframe usr# emerge -avt =net-misc/nxclient-2.1.0 =net-misc/nxserver-freeedition-2.1.0 =net-misc/nxnode-2.1.0

```

Before copying licenses from backup I tested, and TADAH! It works..

No need to copy licenses, you just need to use these updated versions..

Okay, I got that fixed, could someone post these instructions to bugs.gentoo.org ?

What now? Well, the trickiest part  :Smile:  My nxclient on my windows machine is broken, when it tries to contact

to X, connection fails  :Smile:  Happy that I was able to fix ebuild for nxserver-freeedition, it propably

was the easier part than fixing stuff for windows.. okay, going googling for some tips..

EDIT:

Second fix comes here.. I noticed that I wasn't able to connect even from localhost because of a small font issue..

ebuild needs to be modified to create a symlink if xorg>7.0 is used.. Well, it propably won't hurt to create this symlink

anyway, as it fails if xorg < 7.0 since directory already exists in that location..

Okay.. Here's a fix..

```

mainframe usr# ln -s /usr/share/fonts /usr/X11R6/lib/X11/fonts

```

EDIT2:

Init script for nxsensor is broken. Find this part from script to fix it:

```

start() {

        is_enabled || return 1

        ebegin "Starting nxsensor"

        $NX_SENSOR_CMD -a $NX_SENSOR_HOST -a ":ffff:$NX_SENSOR_HOST" -P $NX_SENSOR_PORT -d

```

and remove -a ":ffff:$NX_SENSOR_HOST"

This will make it work as it should.  Unfortunately I'm a little busy now and I don't have time and resources

from my other tasks for fixing ebuild, I just gave a list this time for what is needed to make it work.

So if someone just would merge all this to ebuilds, it would be good enough even for main portage..  :Smile: 

----------

## Voyageur

OK I finally have a working solution! jake1981, I don't know how you got a working setup, since the ebuilds did not manage the node.lic license file. Thanks to the NoMachine support FAQs for pointing the problem.

The problem was: nxnode needs to install its license file, and needs to install it BEFORE the nxserver (which will edit the node license file to Unlimited in the install process). So I updated the nxnode ebuild to install correctly its license file. I also fixed the nxsensor init script (some tests were incorrect if you had default values in node.cfg, which resulted in the NX_SENSOR_HOST error). I also fixed the ebuilds to provide amd64 support! With that I deployed the server on a few boxes in no time   :Very Happy: 

Now to add something about the fonts problem and it will be good-for-all (TM)

I'll attach the patch to the nx overlay in the bugreport, or if you are only interested in the free edition ebuilds, you can grab them in my overlay here

----------

## SDraconis

Thanks guys.  Using Voyageur's net-misc overlay and jake1981's font fix makes everything work perfectly.  This all works so much better than FreeNX was.  I wonder how long until we can have this into Portage?

----------

## Voyageur

I updated the server ebuild to create the fonts link (if it does not exist and if modular X is installed), should prevent those disturbing errors for NX newcomers!

For inclusion in portage, there are still many problems/annoyances: the rpath_security_checks() alerts, handling a nxnode re-emerge after the server (we must take care NOT to overwrite the node license file), handling of other existing files in /usr/NX (former freenx install?),  correct DEPENDs (and blockers, like freenx) and a few other things like that may be needed to make the ebuild "portage-quality". Any help is appreciated  :Wink: 

----------

## Voyageur

Some updates in my overlay: Bumped to latest Nomachine's releases

 No need for the fonts link anymore (finally fixed in nomachine's binaries!)

 Updated dependencies (mostly emul-* for amd64, and glib-1.2 for x86 nxsensor)

 License files are not overwritten anymore (should help updating)

 Nomachine's install scripts are ran only when no configuration is found 

   (else update scripts are ran)The ebuilds did not get a revision bump, so those already running an earlier server should re-emerge nxnode with nxserver-freeedition.

Also, if you encounter "not valid subscription" problems, first un-merge both nxnode and nxserver and then re-emerge them (removing the entire /usr/NX should not be necessary)

----------

## pelckyboy

Since I had troubles with the freenx installation, I decided to give nxserver-freeedition a try. I unmerged everything I could find of my old NX installation, cleaned my portage overlays, package.keywords and package.use and finally deleted the whole /usr/NX directory.

When I emerge the nxserver-freeedition, I get the following warning :

 *Quote:*   

> NX> 701 WARNING: Error when trying to connect to NX server, error is:
> 
> NX> 701 WARNING: NX> 203 NXSSH running with pid: 22085
> 
> ssh: connect to host 127.0.0.1 port 22: Connection refused^M.
> ...

 

What could be causing this ? My sshd is running on 22. Does nxserver include a ssh daemon of its own ? I do want to continue using sftp !

Kristof

----------

## Voyageur

Yes, NX server uses the system SSH server (that's one of its strengths), so it works with a default installation. Note that  the NX node needs to connect to the SSH server on its loopback adress (127.0.0.1), which you can see in this warning:

```
ssh: connect to host 127.0.0.1 port 22: Connection refused
```

I don't think it's a firewall problem (blocking traffic on loopback can be very dangerous for your health), so check /etc/hosts.allow (if there is a sshd: line, 127.0.0.1 must be in it) and /etc/ssh/sshd_config (if the ListenAddress parameter is set or not).

----------

## pelckyboy

Restarted my ssh server and connected using the machine's IP address where I had to accept the key, and now I get :

```
NX> 200 Connected to address: 127.0.0.1 on port: 22

Warning: Permanently added '127.0.0.1' (RSA) to the list of known hosts.

NX> 202 Authenticating user: nx

NX> 208 Using auth method: publickey

NX> 204 Authentication failed..

```

My sshd config :

```

Protocol 2

PubkeyAuthentication yes

AuthorizedKeysFile      .ssh/authorized_keys

PasswordAuthentication no

UsePAM yes

X11Forwarding yes

Subsystem       sftp    /usr/lib/misc/sftp-server

```

Any ideas ? Does the installation procedure adds its own key ?

Kristof

----------

## Voyageur

The NX client first logs in with its own key pair (as the user nx), the matching authorized keys file for this user is /usr/NX/home/nx/.ssh/authorized_keys2.

So you'll need to move/copy it to authorized_keys, or change your sshd_config to:

```
AuthorizedKeysFile      .ssh/authorized_keys2
```

 (which is the default if I recall correctly), and you should pass the nx authentification  :Wink: [/code]

----------

## pelckyboy

Thanks to your help, I am able to connect to the nx server !

At first I got following error from the client :

```
612 ERROR: No valid subscription found. 
```

Looking at http://www.nomachine.com/ar/view.php?ar_id=AR12D00432 I changed the permissions of the node.lic :

```
chown root:root /usr/NX/etc/node.lic
```

I configured my client to start XFCE4, by putting Desktop>Unix>Custom, command:

```
/usr/bin/startxfce4
```

If XFCE4 does not show the correct resolution, follow this tip:

 *Quote:*   

> Basically, go the the XFCE installation directory and rm/mv display_plugin.*

 

When I press the logout button on the xfcepanel, NX client does not terminate. FreeNX used to close properly. Today, I will do some remote performance testing to see if NX's Free edition is better than FreeNX !

----------

## neurovish

Why the hate for FreeNX?  I've been using it for awhile and haven't encountered any problems.

----------

## Voyageur

 *neurovish wrote:*   

> Why the hate for FreeNX?  I've been using it for awhile and haven't encountered any problems.

 

No hate, I used it for some time too! But it is almost impossible to get working on amd64 (official NX binaries work out-of-the-box with emul libraries), has compatibility problems with recent NX releases (not easy when you're at a friend's home, with only a windows nx client 2.1), and sadly does not look like to be actively developed (last SVN commit is 6 months ago, and the website...)

As soon as I find time for it, I'll take a look into GPL 2X terminal server (Stuart has already done a good part of the job making it work in linux), but for now freeedition works for me

----------

## Voyageur

Latest ebuilds can now be found directly in the NX overlay (recent fixes include ebuild cleanups, upgrades definitely fixed), along freenx 0.6  :Wink: 

----------

## mgp-gentoo

I installed, a few months ago from the nx overlay nxserver-freeedition-2.1.0 and nxnode-2.1.0. I tried to get it running but always got a licence error:

```

Info: received data in out channel from NX Node: 'NX> 612 ERROR: No valid subscription found. Please visit the

NX> 612 ERROR: NoMachine Web site at http://www.nomachine.com/

NX> 612 ERROR: to acquire a valid subscription.
```

Then I tried to follow the instructions on:

http://www.nomachine.com/ar/view.php?ar_id=AR12D00432

  i.e.

 *Quote:*   

> 4c. "chown nx:root /usr/NX/etc/server.lic"
> 
> 4d. "chown root:root /usr/NX/etc/node.lic"
> 
> 4e. "chmod 0400 /usr/NX/etc/server.lic"
> ...

 

but I didn't have a node.lic.

Today I updated the overlay and reemerged the packages to see if I could get the server going. When I reemerged nxnode I got the following message at the end of the successful emerge: 

```
NX> 701 Autodetected system 'gentoo'.

NX> 701 Update log is '/usr/NX/var/log/update'.

NX> 701 Updating node at: dg feb 11 16:53:48 2007.

NX> 701 Checking NX node configuration using the /usr/NX/etc/node.cfg file.

NX> 701 WARNING: Sorry, your upgrade period has expired. To be able to

NX> 701 WARNING: install a new version of the software, please visit the

NX> 701 WARNING: NoMachine Web site at http://www.nomachine.com/

NX> 701 WARNING: o acquire a valid subscription.
```

Trying to connect from the nxclient from the same machine results in:

```
Info: received data in out channel from NX Node: 'NX> 618 Your evaluation period has expired. Please visit

NX> 618 the NoMachine Web site at http://www.nomachine.com/

NX> 618 to acquire a valid subscription.

' (NXNodeExec)

Info: received data in out channel from NX Node: 'NX> 690 Bye.

' (NXNodeExec)

Info: NX Node out channel was closed (NXNodeExec)

Info: Removing not recognized buffer from stdout:[] (NXNodeExec)

Info: NX Node err channel was closed (NXNodeExec)

Info: closing nxssh's in, out, err FDs (flagfinished is: 0) (NXNodeExec)

Error: no 'CONNECTED' message from NX Node (NXNodeExec)

Killed by signal 15.
```

And trying to connect from a windows machine:

```
Info: received data in out channel from NX Node: 'NX> 618 Your evaluation period has expired. Please visit

NX> 618 the NoMachine Web site at http://www.nomachine.com/

NX> 618 to acquire a valid subscription.

' (NXNodeExec)

Info: received data in out channel from NX Node: 'NX> 690 Bye.

' (NXNodeExec)

Info: NX Node out channel was closed (NXNodeExec)

Info: Removing not recognized buffer from stdout:[] (NXNodeExec)

Info: NX Node err channel was closed (NXNodeExec)

Info: closing nxssh's in, out, err FDs (flagfinished is: 0) (NXNodeExec)

Error: no 'CONNECTED' message from NX Node (NXNodeExec)

NX> 280 Ignoring EOF on the monitored channel

NX> 280 Ignoring CLOSE on the monitored channel

NX> 595 ERROR: A fatal error occurred in NX Server.

NX> 595 ERROR: The exception id is: 99B335F9. To get detailed information about

NX> 595 ERROR: the error search for the string 99B335F9 in the system log

NX> 595 ERROR: file (usually '/var/log/messages').

NX> 500 ERROR: Last operation failed.

Killed by signal 15.
```

and 

#cat /var/log/messages |grep 99B335F9

Feb 11 16:58:34 mugammapi 2.1.0-18[26549]: ERROR: (exception id 99B335F9) Error: no 'CONNECTED' message from NX Node

Feb 11 16:58:34 mugammapi 2.1.0-18[26549]: ERROR: (exception id 99B335F9) NXNodeExec::exec('startsession', 'user=mgp&userip=192%2e168%2e1%2e1&uniqueid=16FAEC32C7F0B20D70C7C...', 'localhost', 22) called at handlers/nxserver.pl line 2868

Feb 11 16:58:34 mugammapi 2.1.0-18[26549]: ERROR: (exception id 99B335F9) NXShell::handler_session_start('--link="lan" --backingstore="1" --streaming="1" --nodelay="1" --...') called at NXShell.pm line 374

Feb 11 16:58:34 mugammapi 2.1.0-18[26549]: ERROR: (exception id 99B335F9) NXShell::handle_command('startsession', '--link="lan" --backingstore="1" --streaming="1" --nodelay="1" --...') called at NXShell.pm line 145

Feb 11 16:58:34 mugammapi 2.1.0-18[26549]: ERROR: (exception id 99B335F9) NXShell::run() called at nxserver.pl line 4519

Feb 11 16:58:34 mugammapi 2.1.0-18[26549]: ERROR: (exception id 99B335F9) eval {...} called at nxserver.pl line 4478

Why should I have licence problems if I use the freeedition? I'm only trying one connection at the time.

It obviousy could be something different. Has anybody an idea of how to proceed? If any extra information is needed please ask.

Thanks,

Michael

----------

## mgp-gentoo

Just found:

http://www.nomachine.com/ar/view.php?ar_id=AR11D00430

that advises to unmerge all nx products and emerge them again.

I've discovered:

```
# cat /usr/NX/etc/server.lic | grep 'Expiry'

Expiry:             Unlimited

#  cat /usr/NX/etc/node.lic | grep 'Expiry'

Expiry:             Sat Jan 27 20:36:41 CET 2007
```

where the last should also be Unlimited.

So I proceeded as mentioned and now everything works.

Thanks, 

Michael

----------

## Voyageur

The freeedition also uses a license file, you may have still lingering files from your first install.

Can you try first removing nxclient/nxnode/nxserver-freeedition, purge /usr/NX of any remaining files (node.* especially), and emerge with the overlay's ebuilds again? This should fix it

EDIT: looks like nomachine's knowledge base was faster than me  :Wink:  Anyway latest ebuilds should handle the *.lic files correctly, including over updates

----------

## zomps

hmm it requires dep xrdb, but still i get cannot open display error

----------

## Voyageur

Thanks, I'll add xrdb to nxnode rdeps (quite a hidden dep, even nomachine's deps list does not mention it!)

What's the error message you get? Which client? It sounds like an error message the client itself coud launch

----------

## zomps

I use 2.1.0 client.

The strange thing is client even shows black display and then dies

on server side i see

```

Feb 27 17:49:24 zomps 2.1.0-15[6999]: DEBUG: Option xpi enabled with value: 96. Pushing command: xrdb -merge 'main:nxnode:3653'

Feb 27 17:49:24 zomps 2.1.0-15[6999]: DEBUG: run command: saving env 'DISPLAY'=unset 'main:nxnode:3031'

Feb 27 17:49:24 zomps 2.1.0-15[6999]: DEBUG: run command: setting env 'DISPLAY'=unix:1013 'main:nxnode:3031'

Feb 27 17:49:24 zomps 2.1.0-15[6999]: DEBUG: run command: trying to run command '/bin/bash -c 'exec -a - /bin/bash -c '\''xrdb -merge'\'' 'main:nxnode:3031'

Feb 27 17:49:24 zomps 2.1.0-15[6999]: DEBUG: Signals are now blocked ... 'main:nxnode:2909'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: Signals unblocked 'main:nxnode:2931'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: command is running with pid: 7003 'main:nxnode:3031'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: written stdin parameter to STDIN of process 7003 '/bin/bash -c 'exec -a - /bin/bash -c '\''xrdb -merge'\'': 'Xft.dpi: 96\n' 'main:nxnode:3031'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: closed command STDIN 'main:nxnode:3031'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: added command STDOUT to list of selector set 'main:nxnode:3031'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: added command STDERR to selector set 'main:nxnode:3031'

Feb 27 17:49:25 zomps 2.1.0-15[7003]: DEBUG: Signals unblocked 'main:nxnode:2931'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: process '7003' stdout was closed. 'main:nxnode:3031'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: process '7003' stderr was closed. 'main:nxnode:3031'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: process '7003' finished with: 1 'main:nxnode:3031'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: process '7003' stdout was '' 'main:nxnode:3659'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: process '7003' stderr was 'xrdb: Can't open display 'unix:1013'\n' 'main:nxnode:3659'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: DEBUG: run command: env DISPLAY unset 'main:nxnode:3659'

Feb 27 17:49:25 zomps 2.1.0-15[6999]: ERROR: Failed to set xpi value in command xrdb: /bin/bash -c 'exec -a - /bin/bash -c '\''xrdb -merge'\'': output was: xrdb: Can't open display 'unix:1013'\n, exit value: 1 'main:nxnode:3664'

```

----------

## Voyageur

The only entry in nomachine's knowledge base is this one, but it should have been fixed some time ago in 2.0, and the reporter said it did not prevent the session from being started...

Have you tried with some other types of remote desktops? (simple xterm, some app, ..., kde/gnome/...) Also, if you had an older NX version at some time, can you remove it, clean /usr/NX, and re-emerge it?

----------

## zomps

Yeah I found that reference also.

when I enabled in kdm XDMCP requests and on client selected xdm I got the login manager running

and I am able login to my kde. strange  :Sad: 

but when I select KDE session on client it fails, least I can login now  :Very Happy: 

----------

## blackbumer

Is it possible to connect without password ussing ~/.ssh/id_dsa key file ?

i receive "enter password" when i choose key file in configuration(nxclient) save setting and press connect with clear password

----------

## qfpkh

I installed nxserver_freeedition,I am a newbie,Can someone provide some instructions on how to config the NX Server Free Edition?

emerge -v nxserver_freeedition

I don't use ssh,My sshd_config is default,and I don't know how to config,Can someone help me?

I searched Google,but only free-nxserver,not nxserver_freeedition.

I tried free-nxserver,but failed

----------

## qfpkh

anybody can help me?

----------

## devsk

anybody game for NX 3.0 ebuilds? NX 3 was announced today.

----------

## Voyageur

 *devsk wrote:*   

> anybody game for NX 3.0 ebuilds? NX 3 was announced today.

 

And someone already ended the game (a mere 10 hours after the release mail): see bug #182779.

The ebuilds are in the NX overlay for now for those who can't wait, as the bump to 3.0 introduces a few problems and a few needed updates to the ebuilds. After that, I'll move them in portage. Note that you should unmerge nxserver-freedition before the update (I'll add a blocker soon to force that).

----------

## devsk

 *Voyageur wrote:*   

>  *devsk wrote:*   anybody game for NX 3.0 ebuilds? NX 3 was announced today. 
> 
> And someone already ended the game (a mere 10 hours after the release mail): see bug #182779.
> 
> The ebuilds are in the NX overlay for now for those who can't wait, as the bump to 3.0 introduces a few problems and a few needed updates to the ebuilds. After that, I'll move them in portage. Note that you should unmerge nxserver-freedition before the update (I'll add a blocker soon to force that).

 Holy Jesus Voyageur, you scare me with your speed. you are FAST! I will check it out.

----------

## Voyageur

I had some help from the bug author too! Anyway, the ebuilds are fixed now, expect them in a few hours in portage

Highlights include:

- Desktop sharing

- Session shadowing

- Full support for amd64

- Windows Vista support for nxclient

- Screen scaling capabilities

- Dynamic reordering of the screen updates

- Greatly reduced session reconnection times 

- bugfixes, ...

----------

## devsk

 *Voyageur wrote:*   

> 
> 
> - Session shadowing

 do you know how to enable multiple users accessing the same desktop?

----------

## zomps

Tried today again the new vversion (3.0) and found solution to my previos error

Feb 27 17:49:25 zomps 2.1.0-15[6999]: ERROR: Failed to set xpi value in command xrdb: /bin/bash -c 'exec -a - /bin/bash -c '\''xrdb -merge'\'': output was: xrdb: Can't open display 'unix:1013'\n, exit value: 1 'main:nxnode:3664' 

added to /etc/hosts:

127.0.0.1 zomps unix

now it works like charm

----------

## t35t0r

I've followed the instructions here http://www.nomachine.com/documentation/admin-guide.php in section "4.4 Replacing the Default SSH Key-Pair with Keys Generated for Your Server"

In my server's /etc/sshd/sshd.conf I've set:

```

RSAAuthentication yes

PubkeyAuthentication yes

AuthorizedKeysFile  .ssh/authorized_keys2

```

and restarted nxserver, Still whenever I try to connect from a client I get:

```

NX> 202 Authenticating user: nx

NX> 208 Using auth method: publickey

NX> 204 Authentication failed.

```

On the server machine if I try 

```
 /usr/NX/bin/nxserver --status 
```

 I get:

```

NX> 900 Connecting to server ...

NX> 204 Authentication to NX server failed.

NX> 110 NX Server is stopped.

NX> 999 Bye.

```

anyone have any of this working?

----------

## t35t0r

 *Quote:*   

> and restarted nxserver

 

yes I did restart SSHD also.

----------

## mlaccetti

 *zomps wrote:*   

> Tried today again the new vversion (3.0) and found solution to my previos error
> 
> Feb 27 17:49:25 zomps 2.1.0-15[6999]: ERROR: Failed to set xpi value in command xrdb: /bin/bash -c 'exec -a - /bin/bash -c '\''xrdb -merge'\'': output was: xrdb: Can't open display 'unix:1013'\n, exit value: 1 'main:nxnode:3664' 
> 
> added to /etc/hosts:
> ...

 

Oh man.  That needs to be put in a very public place.  I just wasted most of my evening trying to figure that out!

----------

## Voyageur

 *Quote:*   

> added to /etc/hosts:
> 
> 127.0.0.1 zomps unix

 

Those who had to do this manipulation, can you confirm you have USE=xcb? (on libX11 mostly). Without xcb, this is not needed...

I'll probably add a warning in the ebuilds (as this breaks freenx, and probably 2x server too), until NoMachine or a Freenx user finds the problem

----------

## mlaccetti

mulk ~ # emerge -pv libX11

These are the packages that would be merged, in order:

Calculating dependencies... done!

[ebuild   R   ] x11-libs/libX11-1.1.1-r1  USE="xcb -debug -ipv6" 1,393 kB

----------

## jrenraw

Are there supposed to be new init scripts for 3.0.0?  It appears the 3.0.0 config files are different and the checks in the 2.1.0 nxsensor init script check for old variables such as ENABLE_SENSOR, NODE_SENSOR_HOST, and NODE_SENSOR_PORT.  Based on the default 3.0.0 node.cfg file they are now EnableSensor, StatisticsHost, and NodeSensorPort.

I started looking into this as I cannot start nxsensor or nxserver.  I get a "* nxsensor is disabled in /usr/NX/etc/node.cfg" error.  The node.cfg file has EnableSensor = "1".  Even after changing the init scripts, I still get this error.

Any ideas?

----------

## Rapatskiy Vladimir

paludis -pi libX11:

x11-libs/libX11-1.1.1-r1 {:0} [R] -debug ipv6 xcb

head /etc/hosts:

127.0.0.1       localhost.localdomain   localhost unix

Before addition into /etc/hosts got "can't open display" error only

Thank all very much for help!!!

----------

## Voyageur

NoMachine fixed the XCB issues in the latest releases, sync and get nxnode-3.0.0-r2 and its friends, and you should not need /etc/hosts manipulation anymore!  :Wink: 

Also the sensors script and instructions should be fixed now

----------

## Voyageur

I'll soon start to write some Gentoo documentation on NX/freenx and friends, if you think some subjects other than the following should be treated, please tell me. Current plan is: what is NX (technology, licensing, ...)

 the different servers and clients (pros/cons)

 specific configuration and commands by server (configuration files, where are logs, ...)

 some troubleshooting tips

 and of course a selection of links for further reading

----------

## animous

Hi,

Voyageur, I'm looking forward to reading those docs..

In the meantime, I'm having trouble..  I installed nxserver-freenx 0.7.0, but I need desktop sharing (connect to the local X server) so I uninstalled that and installed nxserver-freeedition instead.

I edited /usr/NX/etc/server.cfg: EnableDesktopSharing="1", EnableInteractiveDesktopSharing="1", EnableFullDesktopSharing="1", EnableDesktopSharingAuthorization="0" and so on.

/etc/init.d/nxserver restart

I then proceed to connect with the NX client on vista.  I get past connection and authentication.  I see the list of available sessions and there's only one: the "Local Display".  I select that and click "Attach".  Then it says "Requesting user's authorization" and then shortly after, "Connection timeout".

I set logs to 7 in server.cfg, but /var/log/nxserver.log is always empty.

What am I doing wrong?  How can I make this work?

Thanks!

----------

## imanassypov

-same issue here. No logs in /var/log/nxserver.log and even though I followed all the suggestions above, still authentication failed for user nx.

It is kinda hard to troubleshoot since it leaves no log trails.

----------

## jdkbx

i have been banging my head against this for about 10 days. the recent openssh update to 5.4_p1 breaks the login with the "public key authentication failed" message. downgrading to 5.3_p1-r1 and its working again.

----------

## gr0x0rd

I've been able to easily install and configure nxserver on many machines until recently. Before, it was just a matter of running 

```
sudo emerge -av nxserver-freenx

sudo nxsetup --install --setup-nomachine-key --clean --purge

sudo rc-update add nxserver default

sudo /etc/init.d/nxserver start
```

to get a working instance, given sshd was up and running. Now, 

```
gr0x0rd@moonbase2 ~ $ sudo nxserver --start 

NX> 100 NXSERVER - Version 3.2.0-74-TEAMBZR104 OS (GPL, using backend: 3.4.0)

mv: cannot stat `/var/lib/nxserver/home/.ssh/authorized_keys2.disabled': No such file or directory

NX> 122 Service started

NX> 999 Bye

gr0x0rd@moonbase2 ~ $ sudo nxserver --status

NX> 100 NXSERVER - Version 3.2.0-74-TEAMBZR104 OS (GPL, using backend: 3.4.0)

NX> 110 NX Server is stopped

NX> 999 Bye
```

Looked in node.conf but didn't see any setting for where the server should be looking for authorized keys. This directory exists on a working nxserver instance, so obviously something has changed or gone wrong with the default server settings and resource locations. 

Devs, any ideas here?

----------

## gr0x0rd

Update-

After re-emerging nxserver-freenx, and setting it up WITHOUT the --clean --purge options, the server ran successfully and I was able to connect from other boxes.   :Razz: 

----------

## tuber

I managed to get the everything installed, and working, more or less. The problem is that when I try to close the main NX client window, I get the following error box:

```
NX client could not create the directory /config. Please check your permissions in"
```

 I end up using killall from the command line. Any ideas what's going on?

----------

## imanassypov

the answer is in front of you:

```
mkdir -p /var/lib/nxserver/home/.ssh

touch /var/lib/nxserver/home/.ssh/authorized_keys2.disabled
```

----------

## rossbcan

I am posting here, not because of Gentoo, but because you folks appear to be NX competent.

I am using NX server on an Openwrt x86_64 system with xorg, fluxbox wm, attempting headless appliance control using NX binaries installed via tarballs (server-3.5.0-9, client, node-3.5.0-7), with all proper configuration to allow shadowing without session owner permission.

What works: using NX client, can spawn xterm session controlling Openwrt on client machine

What fails: shadow sessions, attempting to share root xorg / fluxbox display

How fails: authenticates OK, available sessions window pops up on client, but no sessions to select

NX (server) determines sessions available by /bin/netstat -ln '--protocol=unix', result:

Active UNIX domain sockets (only servers)

Proto RefCnt Flags       Type       State         I-Node Path

unix  2      [ ACC ]     STREAM     LISTENING     41637  @/tmp/.X11-unix/X0

unix  2      [ ACC ]     STREAM     LISTENING     41638  /tmp/.X11-unix/X0

debug logfile:

NXNODE: checkLocalSession: Found socket for display       [0] - [unix  2      [ ACC ]     STREAM     LISTENING     41637  @/tmp/.X11-unix/X0]

...

NXNODE: checkLocalSession: Display already checked - skipping

NXNODE: checkLocalSession: NO SESSIONS

full debug log: http://www.rossco.org/NX_ShadowFail.txt

I have run out of clues regarding how to debug this, so am seeking to "get a clue"

given that this is a custom distribution, I have already used strace to identify missing OS commands and libraries.

Thanks; Bill

edit:

nevermind. solved it.

neglecting what it took to get to this point, the particular problem was:

the busybox ps command does not support the format control required by NX server to identify sessions.

needed to replace with ps from procps

which led to new issues, all solved

----------

