# nx session won't connect

## faceman

This is what I get when I try to connect:

```
NX> 1000 NXNODE - Version 1.5.0-50-SVN OS (GPL)

NX> 105 /usr/NX/bin/nxserver: line 1077: 26954 Terminated              sleep $AGENT_STARTUP_TIMEOUT

NX> 596 Session startup failed.

NX> 1004 Error: NX Agent exited with exit status 1.

Can't open /usr/NX/var/db/running/sessionId{A627D731703B4A3D97CC2DA18FC16F50}: No such file or directory.

mv: cannot stat `/usr/NX/var/db/running/sessionId{A627D731703B4A3D97CC2DA18FC16F50}': No such file or directory

NX> 1006 Session status: closed

NX> 700 Session id: antonius-1000-A627D731703B4A3D97CC2DA18FC16F50

NX> 705 Session display: 1000

NX> 703 Session type: unix-console

NX> 701 Proxy cookie: 4b9e144966ea4d52c6c9cb6802c36388

NX> 702 Proxy IP: 192.168.0.10

NX> 706 Agent cookie: 4b9e144966ea4d52c6c9cb6802c36388

NX> 704 Session cache: unix-console

NX> 707 SSL tunneling: 0

NX> 1001 Bye.

Killed by signal 15.
```

I get this trying to connect from 2 different machines to each other.  The directories /usr/NX/var/db/running are there on each machine, with correct permissions.

Anybody help?

----------

## 2lt.chronic

I am getting same problem, any luck yet?

----------

## sinterklaas

also have the same problem since I updated to freenx-0.5.0.20060311.

Tried rolling back but even that didn't help,

I'm using a 1.4 nxclient.

Jeroen

----------

## genus

Same error. Any luck?

----------

## nahpets

I had the same error.  If you look at the output carefully, you'll see that 'nxagent' is failing:

```

NX> 1004 Error: NX Agent exited with exit status 1. 

```

When I tried executing 'nxagent' from the command line, I was getting this:

```

# ./nxagent :1

./nxagent: error while loading shared libraries: libXcompext.so.1: cannot open shared object file: No such file or directory

```

but using LD_LIBRARY_PATH worked:

```

 LD_LIBRARY_PATH=/usr/NX/lib nxagent :1

NXAGENT - Version 1.5.0

Copyright (C) 2001, 2005 NoMachine.

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

Info: Agent running with pid '18900'.

nxagentProcessOptionsFile: Option file is [(null)].

Fatal server error:

NXAGENT: Unable to open display "".

```

So like I saw in this post, I moved 'nxagent' to 'nxagent.bin' and replaced it with the following script:

```

#!/bin/bash

LD_LIBRARY_PATH=/usr/NX/lib /usr/NX/bin/nxagent.bin "$@"

```

Once I did this, I was able to log in properly.

----------

## Robzy

[edit]: I have a similar problem, except it apears to be a different library that nxagent is looking for:

```
gentoo usr # nxagent

nxagent: error while loading shared libraries: libXcomp.so.1: cannot open shared object file: No such file or directory

gentoo usr #

```

Could this be because i dont have "nxssh" installed? (I didnt have the 'nxclient' use flag set so i didnt need it)

I would have "nxssh", though, but trying to emerge it results in error:

```
gcc -g -O3 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.  -DSSHDIR=\"/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/lib/misc/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/lib/misc/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/lib/misc/ssh-keysign\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DSSH_RAND_HELPER=\"/usr/lib/misc/ssh-rand-helper\" -DHAVE_CONFIG_H -I/usr/NX/include -c readpass.c

packet.c:94:16: NX.h: No such file or directory

gcc -g -O3 -Wall -Wpointer-arith -Wno-uninitialized -I. -I.  -DSSHDIR=\"/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/lib/misc/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/lib/misc/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/lib/misc/ssh-keysign\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DSSH_RAND_HELPER=\"/usr/lib/misc/ssh-rand-helper\" -DHAVE_CONFIG_H -I/usr/NX/include -c rsa.c

make: *** [packet.o] Error 1

make: *** Waiting for unfinished jobs....

!!! ERROR: net-misc/nxssh-1.5.0-r2 failed.

!!! Function src_compile, Line 51, Exitcode 2

!!! emake nxssh failed

!!! If you need support, post the topmost build error, NOT this status message.

gentoo usr #

```

Any help is more than welcome, and very much so apreciated  :Smile: 

[edit]: What do you know? All because i didnt have "nxcomp" installed! All working now.... beautifully too.

Thanks,

Rob.

----------

## RyoHazuki

Hi Mates,

I am also trying to set up my FreeNX and I encounter similar problems.

However, when I was about to try to execute the nxagent manually, I notice

it simple do not exist on my system.

I also tried to search for it using the equery utility and could not locate it at all.

```
[ebuild   R   ] net-misc/nx-x11-1.5.0-r8  USE="-rdesktop -vnc" 0 kB 

[ebuild   R   ] net-misc/nxserver-freenx-0.5.0.20060311-r1  USE="cups nxclient -arts -esd" 0 kB 

[ebuild   R   ] net-misc/nxclient-1.5.0-r4  USE="-xft" 0 kB 

[ebuild   R   ] net-misc/nxssh-1.5.0-r2  USE="pam tcpd -ipv6" 0 kB 

[ebuild   R   ] net-misc/nxcomp-1.5.0-r2  0 kB 
```

This is what I have currently installed on my system.

I am using AMD64 arch just in case.

Any one have any clues?

Cheers,

Ryo.

PS. Sorry for my english.

----------

## nahpets

I don't think that NX is in your path by default.  Try checking '/usr/NX/bin'.

----------

## RyoHazuki

 *nahpets wrote:*   

> I don't think that NX is in your path by default.  Try checking '/usr/NX/bin'.

 

I have double checked that.

NX is indeed not in my path, yet, the nxagent binary do not exist on my system.

```
total 5749

drwxr-xr-x 2 root root     352 Jun 15 11:33 .

drwxr-xr-x 9 root root     240 Jun 15 11:34 ..

-rwxr-xr-x 1 root root   33696 Jun 13 17:51 nxauth

-rwxr-xr-x 1 root root 5341748 Jun 13 17:36 nxclient

-rwxr-xr-x 1 root root   67856 Jun 13 17:30 nxesd

-rwxr-xr-x 1 root root    2093 Jun 13 17:30 nxesddsp

-rwxr-xr-x 1 nx   root    1784 Jun 13 17:51 nxkeygen

-rwxr-xr-x 1 nx   root   21663 Jun 13 17:51 nxloadconfig

-rwxr-xr-x 1 nx   root   26768 Jun 13 17:51 nxnode

-rwxr-xr-x 1 nx   root    1705 Jun 13 17:51 nxnode-login

-rwxr-xr-x 1 root root    6916 Jun 13 17:36 nxprint

-rwxr-xr-x 1 nx   root   40285 Jun 13 17:51 nxserver

-rwxr-xr-x 1 nx   root   17511 Jun 13 17:51 nxsetup

-rwxr-xr-x 1 root root  291104 Jun 15 11:33 nxssh

```

----------

## Tlaloc

 *nahpets wrote:*   

> I had the same error.  If you look at the output carefully, you'll see that 'nxagent' is failing:
> 
> ```
> 
> NX> 1004 Error: NX Agent exited with exit status 1. 
> ...

 

I installed nx-x11-bin instead of nx-x11 and the problem was gone for me.

```
 net-misc/nx-x11

    selected: 1.5.0-r8

   protected: none

     omitted: none

>>> 'Selected' packages are slated for removal.

>>> 'Protected' and 'omitted' packages will not be removed.

>>> Waiting 5 seconds before starting...

>>> (Control-C to abort)...

>>> Unmerging in: 5 4 3 2 1

>>> Unmerging net-misc/nx-x11-1.5.0-r8...

No package files given... Grabbing a set.

<<<        obj /usr/NX/lib/libXrender.so.1.2

<<<        obj /usr/NX/lib/libXext.so.6.4

<<<        obj /usr/NX/lib/libXcompext.so.1.5.0

<<<        obj /usr/NX/lib/libX11.so.6.2

<<<        obj /usr/NX/bin/nxauth

<<<        obj /usr/NX/bin/nxagent

--- !empty dir /usr/NX/lib

--- !empty dir /usr/NX/bin

--- !empty dir /usr/NX

--- !empty dir /usr

>>> Regenerating /etc/ld.so.cache...

 * GNU info directory index is up-to-date.

```

```
>>> Merging net-misc/nx-x11-bin-1.5.0 to /

--- /usr/

--- /usr/NX/

--- /usr/NX/bin/

>>> /usr/NX/bin/nxauth

>>> /usr/NX/bin/nxagent

--- /usr/NX/lib/

>>> /usr/NX/lib/libXext.so.6.4

>>> /usr/NX/lib/libXcompext.so.1.5.0

>>> /usr/NX/lib/libX11.so.6.2

>>> /usr/NX/lib/libXrender.so.1.2

>>> /usr/NX/lib/libXcompext.so -> libXcompext.so.1.5.0

>>> /usr/NX/lib/libX11.so -> libX11.so.6.2

>>> /usr/NX/lib/libXcompext.so.1 -> libXcompext.so.1.5.0

>>> /usr/NX/lib/libXrender.so.1 -> libXrender.so.1.2

>>> /usr/NX/lib/libXext.so.6 -> libXext.so.6.4

>>> /usr/NX/lib/libXext.so -> libXext.so.6.4

>>> /usr/NX/lib/libXrender.so -> libXrender.so.1.2

>>> /usr/NX/lib/libX11.so.6 -> libX11.so.6.2

>>> Safely unmerging already-installed instance...

No package files given... Grabbing a set.

>>> Original instance of package unmerged safely.

>>> Regenerating /etc/ld.so.cache...

>>> net-misc/nx-x11-bin-1.5.0 merged.

>>> Recording net-misc/nx-x11-bin in "world" favorites file...

```

Bye, Val.

----------

## kjelle

I'v been searching the net (forums.gentoo.org and google generally) without any luck.

I'm connected to my box through SSH. Im running KDE 3.5.

Lets give some info about my system.

 *Quote:*   

> hunter ~ # emerge --info
> 
> Portage 2.1-r1 (default-linux/amd64/2006.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.16-gentoo-r9 x86_64)
> 
> =================================================================
> ...

 

 *Quote:*   

> hunter ~ # nxserver --status
> 
> NX> 100 NXSERVER - Version 1.5.0-50-SVN OS (GPL)
> 
> NX> 110 NX Server is running
> ...

 

 *Quote:*   

> *  net-misc/nx-x11
> 
>       Latest version available: 1.5.0-r8
> 
>       Latest version installed: [ Not Installed ]
> ...

 

 *Quote:*   

> hunter ~ # cat /usr/NX/etc/node.conf | grep -v ^#
> 
> ENABLE_PASSDB_AUTHENTICATION="1"
> 
> ENABLE_SSH_AUTHENTICATION="1"
> ...

 

 *Quote:*   

> hunter ~ # nxagent :1000
> 
> Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'
> 
> NXAGENT - Version 1.5.0
> ...

 

Client log

 *Quote:*   

> NX> 203 NXSSH running with pid: 3404
> 
> NX> 285 Enabling check on switch command
> 
> NX> 285 Enabling skip of SSH config files
> ...

 

 *Quote:*   

> hunter ~ # cat /usr/NX/var/db/failed/sessionId\{86A3D9335E74C53208FC1A125932EEE1\}
> 
> sessionName=LianLi
> 
> display=1000
> ...

 

So.. Any clues as to why my 'nxagent' is failing?

 *Quote:*   

> NX> 105 /usr/NX/bin/nxserver: line 1077:  9573 Terminated              sleep $AGENT_STARTUP_TIMEOUT

 

Edited:

I also added some more to node.conf:

AGENT_STARTUP_TIMEOUT="60"

Then running "nxloadconfig" and "nxserver --restart"

It didnt take any longer for the client to fail.

Thanks for any advice!

----------

## gami

 *kjelle wrote:*   

> 
> 
>  *Quote:*   hunter ~ # nxagent :1000
> 
> Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'
> ...

 

A lot of people (myself included) have been / will be bitten by this after an upgrade to Xorg 7. Fonts under Xorg 7 are no longer stored in /usr/X11R6/lib/X11/fonts. Unfortunately some of the NX software has a hardcoded path to the old locations in it.

I needed to manually set a symlink to the old font directory and also to the location of the keyboard layouts and the RGB database.

```
ln -s /usr/share/fonts /usr/X11R6/lib/X11/fonts

ln -s /usr/share/X11/xkb /usr/X11R6/lib/X11/xkb

ln -s /usr/share/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt
```

----------

## kjelle

 *gami wrote:*   

> 
> 
> I needed to manually set a symlink to the old font directory and also to the location of the keyboard layouts and the RGB database.
> 
> ```
> ...

 

Thanks. That really worked!!

----------

