Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Faster Remote Desktop alternative to vnc?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
RaceTM
Apprentice
Apprentice


Joined: 16 Feb 2004
Posts: 281

PostPosted: Fri Apr 13, 2007 1:53 am    Post subject: Faster Remote Desktop alternative to vnc? Reply with quote

Well I have been working at this issue for a while, and I seem to be getting nowhere. I am trying to find an alternative to vnc which is faster (good over slower connections), and preferably one which supports public key authentication so I dont need to type in a password every time I launch it. I have been using rdc on windows for years, which is great because my windows cedentials get transfered to tehr emote session and I get logged in automatically. I would love to find a linux to linux alternative. I have looked in to NX server, but I wasn't able to get it working at all. After some troubleshooting I discovered that one of the packages wasn't installed, and when I tried to emerge it, the server reported a 404. I wasnt able to find the package via google, either. Any suggestions would be appreciated!
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2676
Location: here, there or in transit

PostPosted: Fri Apr 13, 2007 2:33 am    Post subject: Reply with quote

Did you follow the FreeNX HOWTO on the Gentoo Wiki? What specifically went wrong?

A number of people here have successfully installed FreeNX--there is a lengthy HOWTO thread devoted to general setup problems (it dates to 2004 so you might want to start near the end) and a host of others on more specific issues. I took the plunge about a month ago and I must say, NX is crazy fast compared to VNC. Don't give up on it yet. :)
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
RaceTM
Apprentice
Apprentice


Joined: 16 Feb 2004
Posts: 281

PostPosted: Fri Apr 13, 2007 4:23 am    Post subject: Reply with quote

Hi, thanks for the reply (again :) )

well, lets see..after I emerged nxserver-freenx, I got some errors from the installer:

emerge -avt nxserver-freenx
source /etc/profile
cp /usr/lib/NX/bin/nx* /usr/bin/
nxsetup --override --install

----> Testing your nxserver configuration ...
Warning: Could not find nxdesktop in /usr/bin. RDP sessions won't work.
Warning: Could not find nxviewer in /usr/bin. VNC sessions won't work.
Warning: Invalid value "DEFAULT_X_SESSION=/etc/X11/xdm/Xsession"
Users might not be able to request a default X session.
Warning: Invalid value "COMMAND_START_KDE=startkde"
Users will not be able to request a KDE session.
Warning: Invalid value "COMMAND_START_GNOME=/etc/X11/Sessions/Gnome"
Users will not be able to request a Gnome session.
Warning: Invalid value "COMMAND_START_CDE=cdwm"
Users will not be able to request a CDE session.

Warnings occured during config check.
To enable these features please correct the configuration file.

<---- done


----> Testing your nxserver connection ...
The authenticity of host '[127.0.0.1]:5000 ([127.0.0.1]:5000)' can't be established.
RSA key fingerprint is 75:b2:66:3b:15:a4:3c:a6:e8:0a:7a:d2:ad:a8:20:00.
Are you sure you want to continue connecting (yes/no)? Fatal error: Could not connect to NX Server.


Despite these errors (none of them seemed fatal), I tried to start the nxserver service, and was told it was already running. So, I fired up the client, and tried to connect. That was where the fun started.

I got an error message, and wasnt able to complete the session connection. I googled around for quite a while, adn eventually found out that the issue was related to the fact that the later NX clients dont support FeeeNX any more. I wasnt abel to find an old enough client anywhere, so, I tried to use the FreeNX client, and it just crashed upon connecting. I found some troubleshooting documents, but they all referred to files which I didnt have on my system. I think they fell under the /usr/NX directory which, on my system, didn't exist.


After reading your above post, I re-installed NX quickly so I could reproduce the issue. Thanks to murphy's law, the software seemed to do a better job of installing itself this time, however im still unable to connect. The FreeNX client crashes, and the normal NX client isnt able to start the session after authenticating, it just seems to hang. I tried to reconnect, and it hung on the "Session resume failed" message before returning this error log:

Code:
Display Type             Session ID                       Options  Depth Screen         Status      Session Name
------- ---------------- -------------------------------- -------- ----- -------------- ----------- ------------------------------
1001    unix-kde         BF0428529D8324683141CE6020EE2421 -RD--PSA    32 1680x1022      Running     Server2k


NX> 148 Server capacity: not reached for user: fox2k
NX> 105 restoresession --id="BF0428529D8324683141CE6020EE2421"  --resize="1" --session="Server2k" --type="unix-kde" --cache="8M" --images="32M" --link="adsl" --kbtype="pc102/en_US" --nodelay="1" --backingstore="never" --geometry="1680x1022" --media="0" --agent_server="" --agent_user="" agent_password="******""

NX> 1000 NXNODE - Version 1.5.0-50 OS (GPL)
NX> 700 Session id: server2k-1001-BF0428529D8324683141CE6020EE2421
NX> 705 Session display: 1001
NX> 703 Session type: unix-kde
NX> 701 Proxy cookie: fa572ff1fd7e88f63a88a330f991ccc3
NX> 702 Proxy IP: 192.168.1.1
NX> 706 Agent cookie: fa572ff1fd7e88f63a88a330f991ccc3
NX> 704 Session cache: unix-kde
NX> 707 SSL tunneling: 0
NX> 1004 Error: Session did not start.
NX> 596 Session resume failed.
NX> 999 Bye
Killed by signal 15.


So I guess this has turned in to an NX help thread, unless somebody can recommend another alternative. I am open to anything at this point :)
Back to top
View user's profile Send private message
RaceTM
Apprentice
Apprentice


Joined: 16 Feb 2004
Posts: 281

PostPosted: Fri Apr 13, 2007 4:27 am    Post subject: Reply with quote

alrighty now we are back in to familiar territory. I restarted the service and tried to connect. This is the error log I was getting before as well:

Code:

NX> 148 Server capacity: not reached for user: fox2k
NX> 105 startsession --session="Server2k" --type="unix-kde" --cache="8M" --images="32M" --link="adsl" --kbtype="pc102/en_US" --nodelay="1" --backingstore="never" --geometry="1680x1022" --media="0" --agent_server="" --agent_user="" agent_password="******""  --screeninfo="1680x1022x32+render"

NX> 1000 NXNODE - Version 1.5.0-50 OS (GPL)
NX> 596 Session startup failed.
NX> 1004 Error: NX Agent exited with exit status 1.
NX> 105 /usr/bin/nxserver: line 1077:   681 Terminated              sleep $AGENT_STARTUP_TIMEOUT
NX> 1006 Session status: closed
Can't open /var/lib/nxserver/db/running/sessionId{332033BFE482C0A7459EF24A54504350}: No such file or directory.
mv: cannot stat `/var/lib/nxserver/db/running/sessionId{332033BFE482C0A7459EF24A54504350}': No such file or directory
NX> 700 Session id: server2k-1000-332033BFE482C0A7459EF24A54504350
NX> 705 Session display: 1000
NX> 703 Session type: unix-kde
NX> 701 Proxy cookie: 50b421d945735c96e612981b09178d82
NX> 702 Proxy IP: 192.168.1.1
NX> 706 Agent cookie: 50b421d945735c96e612981b09178d82
NX> 704 Session cache: unix-kde
NX> 707 SSL tunneling: 0
Killed by signal 15.


Googling that I discovered that it was an issue with freeNX not being supported by the windows client anymore. I am trying to use the 2X client now, and I simply get "error unknown" when I try to connect.
Back to top
View user's profile Send private message
RaceTM
Apprentice
Apprentice


Joined: 16 Feb 2004
Posts: 281

PostPosted: Sat Apr 14, 2007 7:01 pm    Post subject: Reply with quote

bump!
Back to top
View user's profile Send private message
Voyageur
Developer
Developer


Joined: 06 Mar 2005
Posts: 342
Location: Paris, France

PostPosted: Wed Apr 18, 2007 8:56 am    Post subject: Reply with quote

RaceTM wrote:
Code:
NX> 1000 NXNODE - Version 1.5.0-50 OS (GPL)
Googling that I discovered that it was an issue with freeNX not being supported by the windows client anymore. I am trying to use the 2X client now, and I simply get "error unknown" when I try to connect.


From your log, I'd say you have installed freenx 0.5, please update to net-misc/nx-2.1.0 and net-misc/nxserver-freenx-0.6.0 (marked ~ARCH).

These new versions are compatible with the 2.x NX clients (and include lots of bugfixes too ;) )
_________________
Routinely breaking NX, GNUstep, net-ftp, miscellaneous (llvm, filezilla, rdesktop, chromium, ...) packages
Back to top
View user's profile Send private message
RaceTM
Apprentice
Apprentice


Joined: 16 Feb 2004
Posts: 281

PostPosted: Sat Apr 21, 2007 1:05 am    Post subject: Reply with quote

Alright guys,

I have been trying to work with this for the past few days. I swear to God every time I reinstall the packages, something different happens. I have tried the 2x version, the freeedition, and freenx. I have tried with and without overlays.

So finally, I decided to start from scratch, and take note of everything I did in the exact order I did it. I would greatly appreciate the time anyone could take to help me get this set up I would even be willing to talk on msn or something..because this has taken me way too much time and I am getting nowhere fast. I have been looking through the help thread mentioned above, but all of the posts are out of date and things keep changing every time a new version is released.

So, here is my (lack of) progress report:

Code:
ACCEPT_KEYWORDS="~x86" emerge -N  nxserver-freenx
cp /usr/lib/NX/bin/nx* /usr/bin/
nxsetup --clean --purge --install (answered no to creating custom keypair, as I already have a key in my authorized_keys and the matching key on my windows machine)


Here was the output:

_______________________________________
Quote:
------> It is recommended that you use the NoMachine key for
easier setup. If you answer "y", FreeNX creates a custom
KeyPair and expects you to setup your clients manually.
"N" is default and uses the NoMachine key for installation.

Do you want to use your own custom KeyPair? [y/N] nRemoving special user "nx" ...done
Removing session database ...done
Removing logfile ...done
Removing home directory of special user "nx" ...done
Removing configuration files ...done
Setting up /etc/nxserver ...done
Generating public/private dsa key pair.
Your identification has been saved in /etc/nxserver/users.id_dsa.
Your public key has been saved in /etc/nxserver/users.id_dsa.pub.
The key fingerprint is:
60:c0:1f:a3:eb:3e:70:c3:37:d5:cd:14:3a:dd:eb:78 root@server2k
Setting up /var/lib/nxserver/db ...done
Setting up /var/log/nxserver.log ...done
Setting up special user "nx" ...Creating mailbox: File exists
done
Setting up known_hosts and authorized_keys2 ...done
Setting up permissions ...done

----> Testing your nxserver configuration ...
Warning: Could not find nxdesktop in /usr/bin. RDP sessions won't work.
Warning: Could not find nxviewer in /usr/bin. VNC sessions won't work.
Warning: Invalid value "COMMAND_START_KDE=startkde"
Users will not be able to request a KDE session.
Warning: Invalid value "COMMAND_START_GNOME=gnome-session"
Users will not be able to request a Gnome session.
Warning: Invalid value "COMMAND_START_CDE=cdwm"
Users will not be able to request a CDE session.

Warnings occured during config check.
To enable these features please correct the configuration file.

<---- done

----> Testing your nxserver connection ...
expect: spawn id exp4 not open
while executing
"expect -nobrace {Are you sure you want to continue connecting (yes/no)?} { send "yes\r" } {Permission denied *} { exit 1 } {HELLO NXSERVER - Version*} ..."
invoked from within
"expect {
"Are you sure you want to continue connecting (yes/no)?" { send "yes\r" }
"Permission denied*" { exit 1 }
"HELLO NXSERVER - Version*..."
invoked from within
"if { "$auth_method"=="test-nx" } {
set stty_init "raw icrnl -echo"

set publickey ""
catch {set publickey $env(NODE_PUBLICKEY)}

set pid [spawn -..."
(file "/usr/bin/nxnode-login" line 30)
ssh: connect to host 127.0.0.1 port 22: Connection refused
Fatal error: Could not connect to NX Server.

Please check your ssh setup:

The following are _examples_ of what you might need to check.

- Make sure "nx" is one of the AllowUsers in sshd_config.
(or that the line is outcommented/not there)
- Make sure your sshd allows public key authentication.
- Make sure your sshd is really running on port 22.
- Make sure your sshd_config AuthorizedKeysFile in sshd_config is set to authorized_keys2.
(this should be a filename not a pathname+filename)


_________________________________________________________________

Now there is nothing in init.d So, I tried to run nxserver manually to see what it does.
Quote:
server2k NX # nxserver start
NX> 100 NXSERVER - Version 1.5.0-60 OS (GPL)
NX> 500 Error: Function start not implemented yet.
NX> 999 Bye


Weird. Anyways, I havent reconfigured node.conf so I do that.
-change the port to my sshd's port
- enable ssh authentication
- enable userdb authentication

Quote:
server2k NX # nxserver --useradd fox2k
NX> 100 NXSERVER - Version 1.5.0-60 OS (GPL)
NX> 1000 NXNODE - Version 1.5.0-60 OS (GPL)
NX> 716 Public key added to: /home/fox2k/.ssh/authorized_keys2
NX> 1001 Bye.
NX> 999 Bye
server2k NX # nxserver --passwd fox2k
NX> 100 NXSERVER - Version 1.5.0-60 OS (GPL)
New password:
Password changed.
NX> 999 Bye

I have no clue what to do now, there is no nxserver entry in /etc/init.d, so I will try to run nxserver directly again

Make sure nothing is running without my knowledge

Quote:

server2k nxserver # ps -Al | grep nx
server2k nxserver #

server2k nxserver # /usr/bin/nxserver --start
NX> 100 NXSERVER - Version 1.5.0-60 OS (GPL)
NX> 500 ERROR: Service already running
NX> 999 Bye
server2k nxserver #

O RLY?
Quote:
server2k nxserver # ps -Al | grep nx
server2k nxserver # ps -Al | grep NX
server2k nxserver #


well, apparantly the server is running, so I will try connecting from the client (windows, version 2.1.0-17)

Quote:
Error: Server not installed or NX access disabled.


Log:
Code:

NX> 203 NXSSH running with pid: 2920
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.1.111 on port: 5000
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
NX> 204 Authentication failed.



Alright, well I will assume nx is running somehow, and just make sure everything is configured right for ssh.

Looks like its using authorized_keys2, which I forgot to change to authorized_keys. So, I edit the config file appropriately
Quote:

server2k NX # nano -w /usr/bin/nxloadconfig

SSH_AUTHORIZED_KEYS="authorized_keys"


At this point I'm lost. I would restart the service, but apparently its already running even though it apparantly isn't.

Also, if somebody could perhaps quickly explain to me how the ssh authentication with freenx works, I would appreciate it, just to make sure I am understanding it correctly. I have public key encryption set up with my main user account. When I log in via ssh, I use my private key to log in, which is checked against the hash in my ~/.ssh/authorized_keys. Now, when nx connects, does it use the nx user's key, or does it use my user's key? I am assuming that it uses my user's key. However, if thats the case, why is there a .ssh directory and a authroized_keys file in the NX user's directory? :?:

Once this is figured out (if), I will put up a nice tutorial to help out people who are trying to get this started. Seems like a lot of frustration that shouldn't be repeated by anyone else. :oops:

Thanks again for everyone who has helped so far..please don't give up on me now :D


Code:

server2k NX # equery list -i | grep nx
net-misc/nx-2.1.0-r1
net-misc/nxclient-2.1.0-r1
net-misc/nxserver-freenx-0.6.0
server2k NX #
Back to top
View user's profile Send private message
Voyageur
Developer
Developer


Joined: 06 Mar 2005
Posts: 342
Location: Paris, France

PostPosted: Sat Apr 21, 2007 8:10 am    Post subject: Reply with quote

OK, let's see if we can solve most of these:
Code:
cp /usr/lib/NX/bin/nx* /usr/bin/
nxsetup --clean --purge --install (answered no to creating custom keypair, as I already have a key in my authorized_keys and the matching key on my windows machine)
What's that cp for? The only command to run after emerge is
Code:
nxsetup --install --setup-nomachine-key --clean --purge
as emerge tells you at the end of freenx merging
Code:
ssh: connect to host 127.0.0.1 port 22: Connection refused
Quote:
-change the port to my sshd's port
- enable ssh authentication
- enable userdb authentication
Is your server running on a different port than 22? Then you do have to change nxnode.conf, but then you can rerun the install command. SSH authentification is the default, what do you mean by userdb? Usermode auth or Passdb auth?

Some NX internals now: when you connect to a NX server, the client uses key authentification for the nx user (and connects as nx user). This is why it is recommended to use the default key, so you don't have to reconfigure every nxclient (and fail sometimes ;) ) to have the correct key. Once authentified as nx, a nxserver process starts. This is not a daemon so you will not see it running when no one is using NX. If the install process did not report a successful setup, you will often meet the Error: Server not installed or NX access disabled.. The nxserver then connects you as your normal user, usually by ssh to localhost (default method)

Quote:
Looks like its using authorized_keys2, which I forgot to change to authorized_keys. So, I edit the config file appropriately
The nx user does have a authorized_keys2 file (which is the one used for nx auth), you should set it back in nxloadconfig

Code:
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
NX> 204 Authentication failed.
The real problem is here: did you set a different key in your nxclient? When using the default NoMachine key, you just use the default key provided in nxclient and you're up and running ;)

So for your current problem, please try the following:
* get back to standard configuration, change the SSH port if you do not run it on 22
* before running nxsetup, ssh on localhost to see if it works
* re-run the install line (if it does not say success at the end, no need to get further and try with clients, it won't work)

After getting the "successful setup" line, try again with nxclient, resetting the SSH key to the default one, and with your standard password (with SSH auth).

Hope that helps!
_________________
Routinely breaking NX, GNUstep, net-ftp, miscellaneous (llvm, filezilla, rdesktop, chromium, ...) packages
Back to top
View user's profile Send private message
RaceTM
Apprentice
Apprentice


Joined: 16 Feb 2004
Posts: 281

PostPosted: Sat Apr 21, 2007 4:23 pm    Post subject: Reply with quote

Thanks voyageur, that was very informative. At least now I understand how the authentication procedure works a little better.

Quote:
What's that cp for? The only command to run after emerge is


I was following the wiki for this step. Actually, I thought that it might be out of date, so I was going to try without this (seems weird to me to need to manually move files after an installation). HOWEVER..when I tried to run nxsetup, the command wasn't found. I found the file in /usr/lib/NX/bin/ so I did the copy line so I would have everything in a path directory so I wouldn't have to type the full path every time I wanted to run an nx script. Did this potentially mess something up? should I delete the files I copied?

Quote:
Is your server running on a different port than 22? Then you do have to change nxnode.conf, but then you can rerun the install command. SSH authentification is the default, what do you mean by userdb? Usermode auth or Passdb auth?

I didn't properly understand nx authentication, so this is irrelevant now. I was attempting to get passdb authentication working as anotehr torubleshooting step, in case the ssh credentials were an issue. But since youre now saying that the nx client can use the nx user's key, then log me in using my password, thats fine too! Don't need to worrry about this anymore (I dont think)

Quote:
The nx user does have a authorized_keys2 file (which is the one used for nx auth), you should set it back in nxloadconfig

Again this was due to my misunderstanding how the authentication works, however now it seems to be configured properly for looking in this file (the nx user can log in), so I will leave it like this I think, unless you suggest otherwise

Quote:
The real problem is here: did you set a different key in your nxclient? When using the default NoMachine key, you just use the default key provided in nxclient and you're up and running

I have reset the key in the nx client.


Quote:
So for your current problem, please try the following:
* get back to standard configuration, change the SSH port if you do not run it on 22
* before running nxsetup, ssh on localhost to see if it works
* re-run the install line (if it does not say success at the end, no need to get further and try with clients, it won't work)


the ssh port is already changed, but I'm not sure what you mean by trying ssh on localhost. Do you mean try ssh using the nx user? I already have ssh working properly, there is ans ftp server running on this machine with no issues.

I re-ran the install line, and things look more promising:

Quote:
server2k fox2k # nxsetup --install --setup-nomachine-key --clean --purge
Removing special user "nx" ...done
Removing session database ...done
Removing logfile ...done
Removing home directory of special user "nx" ...done
Removing configuration files ...done
Setting up /etc/nxserver ...done
Generating public/private dsa key pair.
Your identification has been saved in /etc/nxserver/users.id_dsa.
Your public key has been saved in /etc/nxserver/users.id_dsa.pub.
The key fingerprint is:
f3:b9:2b:3b:71:f2:c3:29:8f:ce:96:19:e0:12:4d:eb root@server2k
Setting up /var/lib/nxserver/db ...done
Setting up /var/log/nxserver.log ...done
Setting up special user "nx" ...Creating mailbox: File exists
done
Setting up known_hosts and authorized_keys ...done
Setting up permissions ...done

----> Testing your nxserver configuration ...
Warning: Could not find nxdesktop in /usr/bin. RDP sessions won't work.
Warning: Could not find nxviewer in /usr/bin. VNC sessions won't work.
Warning: Invalid value "COMMAND_START_KDE=startkde"
Users will not be able to request a KDE session.
Warning: Invalid value "COMMAND_START_GNOME=gnome-session"
Users will not be able to request a Gnome session.
Warning: Invalid value "COMMAND_START_CDE=cdwm"
Users will not be able to request a CDE session.

Warnings occured during config check.
To enable these features please correct the configuration file.

<---- done

----> Testing your nxserver connection ...
HELLO NXSERVER - Version 1.5.0-60 OS (GPL)
NX> 105 quit
Quit
NX> 999 Bye
<--- done

Ok, nxserver is ready.

PAM authentication enabled:
All users will be able to login with their normal passwords.

PAM authentication will be done through SSH.
Please ensure that SSHD on localhost accepts password authentication.

You can change this behaviour in the /etc/nxserver/node.conf file.
Have Fun!


So, I tried logging in:
Quote:
NX> 203 NXSSH running with pid: 2836
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.1.111 on port: 5000
NX> 202 Authenticating user: nx
NX> 208 Using auth method: publickey
/usr/bin/xauth: creating new authority file /var/lib/nxserver/home/.Xauthority
HELLO NXSERVER - Version 1.5.0-60 OS (GPL)
NX> 105 hello NXCLIENT - Version 1.5.0
NX> 134 Accepted protocol: 1.5.0
NX> 105 SET SHELL_MODE SHELL
NX> 105 SET AUTH_MODE PASSWORD
NX> 105 login
NX> 101 User: fox2k
NX> 102 Password:
NX> 103 Welcome to: server2k user: fox2k
NX> 105 listsession --user="fox2k" --status="suspended,running" --geometry="1680x1050x32+render" --type="unix-kde"
NX> 127 Sessions list of user 'fox2k' for reconnect:

Display Type Session ID Options Depth Screen Status Session Name
------- ---------------- -------------------------------- -------- ----- -------------- ----------- ------------------------------


NX> 148 Server capacity: not reached for user: fox2k
NX> 105 startsession --link="adsl" --backingstore="1" --nodelay="1" --encryption="1" --cache="8M" --images="32M" --media="0" --session="Server2k" --type="unix-kde" --geometry="1680x1022" --kbtype="pc102/en_US" --screeninfo="1680x1022x32+render"

NX> 1000 NXNODE - Version 1.5.0-60 OS (GPL)
NX> 700 Session id: server2k-1000-06BE1C1B659D52904B1C6B42597FC635
NX> 705 Session display: 1000
NX> 703 Session type: unix-kde
NX> 701 Proxy cookie: 97eaf8672c596caa5b0b1cbafbb09539
NX> 702 Proxy IP: 127.0.0.1
NX> 706 Agent cookie: 97eaf8672c596caa5b0b1cbafbb09539
NX> 704 Session cache: unix-kde
NX> 707 SSL tunneling: 1
NX> 1009 Session status: starting
NX> 105 /usr/bin/nxserver: line 1190: 11752 Terminated sleep $AGENT_STARTUP_TIMEOUT
NX> 596 Session startup failed.
NX> 1004 Error: NX Agent exited with exit status 1.
NX> 1006 Session status: closed
Can't open /var/lib/nxserver/db/running/sessionId{06BE1C1B659D52904B1C6B42597FC635}: No such file or directory.
mv: cannot stat `/var/lib/nxserver/db/running/sessionId{06BE1C1B659D52904B1C6B42597FC635}': No such file or directory
Killed by signal 15.


Now I think we are back to where I was in the first place, but this time I understand what is going on quite a bit better!
Back to top
View user's profile Send private message
Voyageur
Developer
Developer


Joined: 06 Mar 2005
Posts: 342
Location: Paris, France

PostPosted: Tue Apr 24, 2007 11:53 am    Post subject: Reply with quote

Glad I could help, let's see if we can get a little further ;)

First step, what rights/owner do you have on /var/lib/nxserver/db/*? This should be OK if nxsetup succeeded

Next, this kind of messages can be caused by a faulty remote session. Which one do you try to run? (KDE, Gnome, ...). You can try with a simpler session: custom desktop, running /usr/bin/xterm or any simple program you have installed on the server

Aside from the logs, you can get some infos from ~/.nx/F-{something}/, in files session and erros (the F- is for failed session).
_________________
Routinely breaking NX, GNUstep, net-ftp, miscellaneous (llvm, filezilla, rdesktop, chromium, ...) packages
Back to top
View user's profile Send private message
RaceTM
Apprentice
Apprentice


Joined: 16 Feb 2004
Posts: 281

PostPosted: Wed Apr 25, 2007 12:23 am    Post subject: Reply with quote

Well, these are the permissions on the files in the db directory:

Code:

server2k fox2k # ls -lt /var/lib/nxserver/db/
total 12
drwx------ 2 nx root 4096 Apr 21 23:25 failed
drwx------ 2 nx root 4096 Apr 21 23:25 running
drwx------ 2 nx root 4096 Apr 21 12:09 closed


I tried all of the default commands, and I also tried initializing /usr/bin/xterm, none of which resulted in any difference. Also, there were no log or failure files present in /my ~/.nx directory:

Code:
fox2k@server2k ~ $ ls -Alt ~/.nx/
total 8
drwx------ 2 fox2k fox2k 4096 Apr 21 21:06 config
drwx------ 3 fox2k fox2k 4096 Apr 21 21:06 temp


I am wondering if this might be an issue outside of nx, as I tried to ssh to the machine using putty and opening an X window, but I got an error because the DISPLAY environment variable wasnt set.


Code:

fox2k@server2k ~ $ xterm
xterm Xt error: Can't open display:
xterm:  DISPLAY is not set


I checked locally, and DISPLAY was set to

:1.0

If I remember correctly, ssh requires $DISPLAY to be set to localhost:some port for ssh X forwarding to work, however I am almost certain my sshd_config is set correctly.

Code:
fox2k@server2k ~ $ sudo cat /etc/ssh/sshd_config | grep X
X11Forwarding yes
X11UseLocalHost yes
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#       X11Forwarding no


Just for fun I tried doing an ssh -X localhost on the machine itself, and it worked fine. I dont know if that means anything but I still find it strange that it works locally but not remotely :/
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2676
Location: here, there or in transit

PostPosted: Wed Apr 25, 2007 12:11 pm    Post subject: Reply with quote

RaceTM wrote:
I am wondering if this might be an issue outside of nx, as I tried to ssh to the machine using putty and opening an X window, but I got an error because the DISPLAY environment variable wasnt set. ... If I remember correctly, ssh requires $DISPLAY to be set to localhost:some port for ssh X forwarding to work.... I tried doing an ssh -X localhost on the machine itself, and it worked fine.

There is a PuTTY option to enable X11 forwarding, similar to ssh -X. It's on the Tunnels page of the settings dialog. Setting DISPLAY doesn't enable X11 forwarding, enabling the option sets the DISPLAY variable. :wink:

You're very close with NX: you appear to be logging in successfully but NX can't start a session for you. Did you check the .nx directories on both the client and server for session logs? If you find none, there is an option in the client to clean old sessions from the .nx directory--make sure it's not checked. Also, did you try a console session (it's an option for Custom sessions)?
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
RaceTM
Apprentice
Apprentice


Joined: 16 Feb 2004
Posts: 281

PostPosted: Wed Apr 25, 2007 2:12 pm    Post subject: Reply with quote

timeBandit wrote:
RaceTM wrote:
I am wondering if this might be an issue outside of nx, as I tried to ssh to the machine using putty and opening an X window, but I got an error because the DISPLAY environment variable wasnt set. ... If I remember correctly, ssh requires $DISPLAY to be set to localhost:some port for ssh X forwarding to work.... I tried doing an ssh -X localhost on the machine itself, and it worked fine.

There is a PuTTY option to enable X11 forwarding, similar to ssh -X. It's on the Tunnels page of the settings dialog. Setting DISPLAY doesn't enable X11 forwarding, enabling the option sets the DISPLAY variable. :wink:

You're very close with NX: you appear to be logging in successfully but NX can't start a session for you. Did you check the .nx directories on both the client and server for session logs? If you find none, there is an option in the client to clean old sessions from the .nx directory--make sure it's not checked. Also, did you try a console session (it's an option for Custom sessions)?


I made sure that X11 forwarding was enabled in putty. I tried both with and without specifying the display parameter, since the X11 forwarding option has a checkbox and a place to specify that.

When I get home tonight I will try what you suggested about doing a console session and ensureing the files arent getting cleared. I dont recall seeing an option for a console login but I will check again!
Back to top
View user's profile Send private message
RaceTM
Apprentice
Apprentice


Joined: 16 Feb 2004
Posts: 281

PostPosted: Wed Apr 25, 2007 9:13 pm    Post subject: Reply with quote

Initiating a console session does not work either. I found this log in the nx directory of the windows box:

Code:
nxwinOpenLogFile: Redirected the standard error to the log file.
nxwinOpenLogFile: NX_TEMP is set to [C:\Documents and Settings\Fox2k\.nx/D-system2k-45C8405848B102595B17BF4885C5C362].
nxwinOpenLogFile: Using log file [C:\Documents and Settings\Fox2k\.nx/D-system2k-45C8405848B102595B17BF4885C5C362/winlog].
ddxProcessArgument - Initializing default screens
winInitializeDefaultScreens - w 1680 h 1050
winInitializeDefaultScreens - Returning
ddxProcessArgument - screen - Found ``WxD'' arg
_XSERVTransmkdir: Owner of C:\Documents and Settings\Fox2k\.nx/D-system2k-45C8405848B102595B17BF4885C5C362/.X11-unix should be set to root
(EE) Unable to locate/open config file
InitOutput - Error reading config file
winDetectSupportedEngines - Windows NT/2000/XP
winDetectSupportedEngines - DirectDraw installed
winDetectSupportedEngines - Allowing PrimaryDD
winDetectSupportedEngines - DirectDraw4 installed
winDetectSupportedEngines - Returning, supported engines 0000001f
InitOutput - g_iNumScreens: 1 iMaxConsecutiveScreen: 1
winSetEngine - Multi Window => ShadowGDI
winAdjustVideoModeShadowGDI - Using Windows display depth of 32 bits per pixel
winCreateBoundingWindowWindowed - User w: 640 h: 480
winCreateBoundingWindowWindowed - Current w: 640 h: 480
winAdjustForAutoHide - Original WorkArea: 0 0 1022 1680
winAdjustForAutoHide - Found BOTTOM auto-hide taskbar
winAdjustForAutoHide - Adjusted WorkArea: 0 0 1021 1680
winCreateBoundingWindowWindowed - WindowClient w 1680 h 1021 r 1680 l 0 b 1021 t 0
winCreateBoundingWindowWindowed -  Returning
Info: Display running with pid '3292' and handler '0x2f0394'.
winAllocateFBShadowGDI - Creating DIB with width: 1680 height: 1021 depth: 32
winAllocateFBShadowGDI - Dibsection width: 1680 height: 1021 depth: 32 size image: 6861120
winAllocateFBShadowGDI - Created shadow stride: 1680
winFinishScreenInitFB - Masks: 00ff0000 0000ff00 000000ff
winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
winCreateDefColormap - Deferring to fbCreateDefColormap ()
null screen fn ReparentWindow
null screen fn RestackWindow
winFinishScreenInitFB - Calling winInitWM.
winFinishScreenInitFB starting winInitWM
winInitWM starting InitQueue
InitQueue: - Calling pthread_mutex_init
InitQueue: pthread_mutex_init returned
InitQueue: calling pthread_cond_init
InitQueue: pthread_cond_init returned
winInitWM spawning winMultiWindowWMProc
winInitMultiWindowWM:
winInitMultiWindowWM - Calling pthread_mutex_lock ()
winInitWM - Returning.
winFinishScreenInitFB After winInitWM
color offset: 10 8 0
winFinishScreenInitFB - returning
winScreenInit - returning
InitOutput - Returning.
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
(EE) No primary keyboard configured
(==) Using compiletime defaults for keyboard
names.keymap=(null)Rules = "xfree86" Model = "pc101" Layout = "us" Variant = "(null)" Options = "(null)"
Couldn't load XKB keymap, falling back to pre-XKB keymap
winBlockHandler - Releasing pmServerStarted
winBlockHandler - pthread_mutex_unlock () returned
winInitMultiWindowWM - pthread_mutex_lock () returned.
winInitMultiWindowWM - pthread_mutex_unlock () returned.
winInitMultiWindowWM - DISPLAY=127.0.0.1:0.0
winInitMultiWindowWM - MUTEX successfully initialized.
winInitMultiWindowWM: creating Atom WM_PROTOCOLS
winInitMultiWindowWM: creating Atom WM_DELETE_WINDOW
Dispatch: Exiting from the dispatcher with exception [2].
Back to top
View user's profile Send private message
timeBandit
Bodhisattva
Bodhisattva


Joined: 31 Dec 2004
Posts: 2676
Location: here, there or in transit

PostPosted: Thu Apr 26, 2007 12:52 pm    Post subject: Reply with quote

Did you find any logs in /var/lib/nxserver/db/failed on the server? Based on the files in the other db subdirectories, I suspect not, but I have no failed sessions recorded on my machine (anymore :wink:) so I can't be certain.

I'm writing this post from an NX session--I compared my winlog file with yours and didn't see any radical differences. Mine reports most of the same errors as yours (regarding the config file and keyboard) so clearly they're not show-stoppers. My log does not show this error from yours:
Code:
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
...but then I don't have that file on my system, either, so that also seems not to be the problem.

Maybe it's a separate issue, or maybe not, but I'm a bit concerned that you can't tunnel an X session over PuTTY. I don't know whether NX needs that to work or operates completely outside the X protocol from a tunneling standpoint. I'd try to sort that out first.
_________________
Plants are pithy, brooks tend to babble--I'm content to lie between them.
Super-short f.g.o checklist: Search first, strip comments, mark solved, help others.
Back to top
View user's profile Send private message
RaceTM
Apprentice
Apprentice


Joined: 16 Feb 2004
Posts: 281

PostPosted: Fri Apr 27, 2007 8:29 pm    Post subject: Reply with quote

thanks timeBandit,

I did figure out the putty issue, I simply needed to install the x server emulator thingy for windows. I can now open an xterm window, konqueror window, etc (form within putty)

I looked in /var/lib/nxserver/db/failed, adn I do see log files there. This is the most recent one:

server2k failed # cat sessionId\{30C1C6FAC396285457882CA00C69A493\}
sessionName=Server2k
display=1000
status=Failed
startTime=1177690863
foreignAddress=192.168.1.110
sessionRootlessMode=1
type=unix-console
sessionId=30C1C6FAC396285457882CA00C69A493
creationTime=1177690863
userName=fox2k
serverPid=
screeninfo=1680x1022x32+render
geometry=
host=127.0.0.1
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum