[FreeNX-kNX] FreeNX-kNX Digest, Vol 115, Issue 6

Jonathan Brooks Jon.Brooks at bristol.ac.uk
Wed May 14 13:17:05 UTC 2014


Hi Chris,

Sorry - I can’t resist the temptation to delete that log file - even though I know
I shouldn’t!

So the suggestion I read somewhere was to modify the freenx-server startup script that
gets installed along with the package (or possibly when you run nxsetup initially),
from:

> case "$1" in
>         start)
>                 if [ ! -e "/var/run/freenx-server" ]; then
>                         [ ! -d "/tmp/.X11-unix" ] && mkdir -m1755 /tmp/.X11-unix/

to

> case "$1" in
>         start)
>                 if [ ! -e "/var/run/freenx-server" ]; then
>                         [ ! -d "/tmp/.X11-unix" ] && mkdir -m1777 /tmp/.X11-unix/

this worries me slightly as it probably means that anyone on the machine could
kill a running session by getting in there and deleting a lock file (err - I can’t
imagine why anyone would do that …… [embarrassed coughing] ).

So at the moment, following a reboot where the .X0-lock file was regenerated, 
nxnode —agent fails as either a normal user or root with:

> sudo ./nxnode --agent
> [sudo] password for XXX: 
> NX> 1000 NXNODE - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
> NX> 716 Starting NX Agent ...
> Error: Aborting session with 'Server is already active for display 0
> 	If this server is no longer running, remove /tmp/.X0-lock
> 	and start again'.
> Session: Aborting session at 'Wed May 14 13:48:36 2014'.
> Session: Session aborted at 'Wed May 14 13:48:36 2014'.
> NX> 716 NX Agent exited with status: 1
> NX> 1001 Bye.

contents of /tmp:

> drwxr-xr-x 23 root   root    4096 May 13 22:15 ..
> drwxrwxrwt  2 root   root    4096 May 14 13:45 .ICE-unix
> drwx------  2 root   root    4096 May 14 13:45 pulse-PKdhtXMmr18n
> drwxrwxrwt  2 root   root    4096 May 14 13:45 .X11-unix
> -r--r--r--  1 root   root      11 May 14 13:45 .X0-lock
> drwx------  4 kdm    nogroup 4096 May 14 13:45 0199787055
> drwx------  2 kdm    nogroup 4096 May 14 13:45 ksocket-kdm
> drwx------  2 kdm    nogroup 4096 May 14 13:45 kde-kdm
> -rw-------  1 XXX psyc    1824 May 14 13:47 krb5cc_43313_hGpSRI
> drwxrwxrwt  8 root   root    4096 May 14 13:48 .


I didn’t need to chmod /tmp/.X11-unix as it’s already super permissive, and
seems to now be created this way on a boot.

I’m guessing that my NoMachine session now won’t work (even for MATE), let’s
see:

I was wrong! I can still start new sessions, even thought the nxnode —agent test fails.

If I now end that session and try to start lubuntu:

I get a blank screen, and an eventual timeout with the message: 
(client side)
> Ooops! The connection with the server was lost. Error is 60: Operation timed out.


Setting the log level to debug (6), and emptying and recreating /var/log/nxserver.log, then trying
to start a lubuntu session again puts this in the log:
(client side)
> Ooops! The connection with the server was lost. Error is 22: Invalid argument


(nxserver.log)
> -- NX SERVER START: -c /usr/lib/nx/nxserver - ORIG_COMMAND=
> HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
> NX> 105 hello NXCLIENT - Version 3.2.0
> NX> 134 Accepted protocol: 3.2.0
> NX> 105 SET SHELL_MODE SHELL
> NX> 105 SET AUTH_MODE PASSWORD
> NX> 105 login
> NX> 101 User: XXX
> NX> 102 Password: 
> Info: Auth method: ssh 
> NX> 103 Welcome to: YYY user: XXX
> NX> 105 listsession --status="suspended,running" --type="shadow"
> NX> 127 Sessions list of user 'XXX' for reconnect:
> 
> Display Type           Session ID                       Services Dept Screensize     Status        Session Name      
>                                            Username
> ------- -------------- -------------------------------- -------- ---- -------------- ------------- ------------------
> ------------------------------------------ --------------------------------
> 0       Local            EF65429207BA50A0471935DFE754F9D1 --------                      Running     X0 (Local)
> 0       Local            EFF3BA624CC68B92F60A29CBC2718F82 --------                      Running     X0 (Local)
> 
> 
> NX> 148 Server capacity: not reached for user: XXX
> NX> 105 startsession --link="adsl" --backingstore="1" --encryption="1" --cache="16M" --images="64M" --shmem="1" --shp
> ix="1" --strict="0" --composite="1" --media="0" --render="1" --session="YYY.cric.bris.ac.uk" --type="unix-cde" --g
> eometry="1024x600" --keyboard="pc105/gb" --client="macosx" --screeninfo="1024x600x24+render" 
> Info: Using /etc/nxserver/nxacl to change session parameters or deny session.
> &link=adsl&backingstore=1&encryption=1&cache=16M&images=64M&shmem=1&shpix=1&strict=0&composite=1&media=0&render=1&ses
> sion=YYY.cric.bris.ac.uk&type=unix-cde&geometry=1024x600&keyboard=pc105/gb&client=macosx&screeninfo=1024x600x24+re
> nder&clientproto=3.2.0&login_method=SSH&user=XXX&userip=137.222.248.246&uniqueid=148C8435897469280F32FB12ED74B15A&
> display=2000&host=127.0.0.1 
> XXX at 127.0.0.1's password: 
> NX> 1000 NXNODE - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
> server_nxnode_echo: NX> 1000 NXNODE - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
> server_nxnode_echo: NX> 700 Session id: YYY-2000-148C8435897469280F32FB12ED74B15A
> NX> 700 Session id: YYY-2000-148C8435897469280F32FB12ED74B15A
> NX> 705 Session display: 2000
> NX> 703 Session type: unix-cde
> NX> 701 Proxy cookie: 3741e3d7bed363839515e90f4e201742
> NX> 702 Proxy IP: 137.222.202.133
> NX> 706 Agent cookie: 3741e3d7bed363839515e90f4e201742
> NX> 704 Session cache: unix-cde
> NX> 707 SSL tunneling: 1
> server_nxnode_echo: NX> 705 Session display: 2000
> server_nxnode_echo: NX> 703 Session type: unix-cde
> server_nxnode_echo: NX> 701 Proxy cookie: 3741e3d7bed363839515e90f4e201742
> server_nxnode_echo: NX> 702 Proxy IP: 137.222.202.133
> server_nxnode_echo: NX> 706 Agent cookie: 3741e3d7bed363839515e90f4e201742
> server_nxnode_echo: NX> 704 Session cache: unix-cde
> server_nxnode_echo: NX> 707 SSL tunneling: 1
> NX> 1009 Session status: starting
> server_nxnode_echo: NX> 1009 Session status: starting
> NX> 710 Session status: running
> NX> 1002 Commit
> NX> 1006 Session status: running
> server_nxnode_echo: NX> 710 Session status: running
> server_nxnode_echo: NX> 1002 Commit
> session_status 148C8435897469280F32FB12ED74B15A Running
> NX> 105 server_nxnode_echo: NX> 1006 Session status: running
> bye
> Bye
> NX> 999 Bye
> NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate "/var/tmp/XXX/.nx/F-C-YYY-2000-148C8435897469280F32FB12ED74B15A/session". You might also want to try: ssh -X myserver; /usr/lib/nx/nxnode --agent to test the basic functionality. Session log follows:
> 
> NXAGENT - Version 3.5.0
> 
> Copyright (C) 2001, 2011 NoMachine.
> See http://www.nomachine.com/ for more information.
> 
> Info: Agent running with pid '7633'.
> Session: Starting session at 'Wed May 14 14:00:18 2014'.
> Info: Proxy running in server mode with pid '7633'.
> Info: Waiting for connection from '127.0.0.1' on port '6000'.
> Info: Accepted connection from '127.0.0.1'.
> Warning: Connected to remote version 4.2.22 with local version 3.5.0.
> Warning: Consider checking http://www.nomachine.com/ for updates.
> Error: The remote NX proxy closed the connection.
> Error: Failure negotiating the session in stage '10'.
> Error: Aborting session with 'Unable to open display 'nx/nx,options=/var/tmp/XXX/.nx/C-YYY-2000-148C8435897469280F32FB12ED74B15A/options:2000''.
> Session: Aborting session at 'Wed May 14 14:00:18 2014'.
> Session: Session aborted at 'Wed May 14 14:00:18 2014'.
> NX> 1006 Session status: closed
> server_nxnode_echo: NX> 596 Session startup failed.
> NX> 596 Session startup failed.
> server_nxnode_echo: NX> 1004 Error: NX Agent exited with exit status 1. To troubleshoot set SESSION_LOG_CLEAN=0 in node.conf and investigate "/var/tmp/XXX/.nx/F-C-YYY-2000-148C8435897469280F32FB12ED74B15A/session". You might also want to try: ssh -X myserver; /usr/lib/nx/nxnode --agent to test the basic functionality. Session log follows:
> session_close 148C8435897469280F32FB12ED74B15A
> server_nxnode_echo: NX> 1006 Session status: closed 

This seems to be the natural order of things, since when I connect the 2nd time I always get the blank screen and timeout:

(client side)
the usual error is 60 timeout.

(nxserver.log)
> -- NX SERVER START: -c /usr/lib/nx/nxserver - ORIG_COMMAND=
> HELLO NXSERVER - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
> NX> 105 hello NXCLIENT - Version 3.2.0
> NX> 134 Accepted protocol: 3.2.0
> NX> 105 SET SHELL_MODE SHELL
> NX> 105 SET AUTH_MODE PASSWORD
> NX> 105 login
> NX> 101 User: XXX
> NX> 102 Password: 
> Info: Auth method: ssh 
> NX> 103 Welcome to: YYY user: XXX
> NX> 105 listsession --status="suspended,running" --type="shadow"
> NX> 127 Sessions list of user 'XXX' for reconnect:
> 
> Display Type           Session ID                       Services Dept Screensize     Status        Session Name                                                 Username
> ------- -------------- -------------------------------- -------- ---- -------------- ------------- ------------------------------------------------------------ --------------------------------
> 0       Local            55A78A927497E8C28D581BD82AADEDB1 --------                      Running     X0 (Local)
> 0       Local            878A102D6E178983AAA3C95A64263219 --------                      Running     X0 (Local)
> 
> 
> NX> 148 Server capacity: not reached for user: XXX
> NX> 105 startsession --link="adsl" --backingstore="1" --encryption="1" --cache="16M" --images="64M" --shmem="1" --shpix="1" --strict="0" --composite="1" --media="0" --render="1" --session="YYY.cric.bris.ac.uk" --type="unix-cde" --geometry="1024x600" --keyboard="pc105/gb" --client="macosx" --screeninfo="1024x600x24+render" 
> 
> Info: Using /etc/nxserver/nxacl to change session parameters or deny session.
> &link=adsl&backingstore=1&encryption=1&cache=16M&images=64M&shmem=1&shpix=1&strict=0&composite=1&media=0&render=1&session=YYY.cric.bris.ac.uk&type=unix-cde&geometry=1024x600&keyboard=pc105/gb&client=macosx&screeninfo=1024x600x24+render&clientproto=3.2.0&login_method=SSH&user=XXX&userip=137.222.248.246&uniqueid=20790ADA0F8694A5376C4CEF290A4401&display=2000&host=127.0.0.1 
> XXX at 127.0.0.1's password: 
> NX> 1000 NXNODE - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
> server_nxnode_echo: NX> 1000 NXNODE - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
> server_nxnode_echo: NX> 700 Session id: YYY-2000-20790ADA0F8694A5376C4CEF290A4401
> NX> 700 Session id: YYY-2000-20790ADA0F8694A5376C4CEF290A4401
> NX> 705 Session display: 2000
> NX> 703 Session type: unix-cde
> NX> 701 Proxy cookie: a552990100d19a05edc1465dfa7388ba
> NX> 702 Proxy IP: 137.222.202.133
> NX> 706 Agent cookie: a552990100d19a05edc1465dfa7388ba
> NX> 704 Session cache: unix-cde
> NX> 707 SSL tunneling: 1
> server_nxnode_echo: NX> 705 Session display: 2000
> server_nxnode_echo: NX> 703 Session type: unix-cde
> server_nxnode_echo: NX> 701 Proxy cookie: a552990100d19a05edc1465dfa7388ba
> server_nxnode_echo: NX> 702 Proxy IP: 137.222.202.133
> server_nxnode_echo: NX> 706 Agent cookie: a552990100d19a05edc1465dfa7388ba
> server_nxnode_echo: NX> 704 Session cache: unix-cde
> server_nxnode_echo: NX> 707 SSL tunneling: 1
> NX> 1009 Session status: starting
> server_nxnode_echo: NX> 1009 Session status: starting
> NX> 710 Session status: running
> NX> 1002 Commit
> NX> 1006 Session status: running
> server_nxnode_echo: NX> 710 Session status: running
> server_nxnode_echo: NX> 1002 Commit
> session_status 20790ADA0F8694A5376C4CEF290A4401 Running
> NX> 105 server_nxnode_echo: NX> 1006 Session status: running
> bye
> Bye
> NX> 999 Bye
> NX> 1009 Session status: terminating
> session_status 20790ADA0F8694A5376C4CEF290A4401 Terminating
> server_nxnode_echo: NX> 1009 Session status: terminating
> NX> 1006 Session status: closed
> session_close 20790ADA0F8694A5376C4CEF290A4401
> server_nxnode_echo: NX> 1006 Session status: closed
> NX> 1001 Bye.
> server_nxnode_echo: NX> 1001 Bye.
 
FYI I can run Lubuntu on the console, so I don’t *think* it’s a problem with the installation
on this machine…..

And of course, starting a FreeNX Lubuntu session works absolutely fine on my other Ubuntu box. Grrrr.

Both run 13.10. Nothing immediately obvious as to what’s different.

Hmmmm

Jon


On 14 May 2014, at 13:00, freenx-knx-request at kde.org wrote:

> Send FreeNX-kNX mailing list submissions to
> 	freenx-knx at kde.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://mail.kde.org/mailman/listinfo/freenx-knx
> or, via email, send a message with subject or body 'help' to
> 	freenx-knx-request at kde.org
> 
> You can reach the person managing the list at
> 	freenx-knx-owner at kde.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of FreeNX-kNX digest..."
> 
> 
> ________________________________________________________________
>         Don't forget to check the NX Knowledge Base:
>                 http://www.nomachine.com/kb/
>       Please also check the FreeNX Wiki+FAQ for hints.
>  http://openfacts.berlios.de/index-en.phtml?title=FreeNX_FAQ
> ________________________________________________________________
> 
> 
> 
> Today's Topics:
> 
>   1. Re: server not starting (chris at ccburton.com)
>   2. okay this is really getting weird (Jonathan Brooks)
>   3. Re: okay this is really getting weird (chris at ccburton.com)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Tue, 13 May 2014 16:51:39 +0100
> From: chris at ccburton.com
> To: User Support for FreeNX Server and kNX Client <freenx-knx at kde.org>
> Subject: Re: [FreeNX-kNX] server not starting
> Message-ID:
> 	<OF1C0D10BA.A67E2264-ON80257CD7.0056634F-80257CD7.0057058E at ccburton.com>
> 	
> Content-Type: text/plain; charset="utf-8"
> 
> freenx-knx-bounces at kde.org wrote on 13/05/2014 12:45:35:
> 
> [SNIP]
> 
>> If I run ssh -Y XXXXX at YYYYYY (username at host)
>> I get in and then run
>> /var/lib/nxserver/nxnode ?agent
>> I get the following:
>> 
>>> ./nxnode --agent
>>> NX> 1000 NXNODE - Version 3.2.0-74-SVN OS (GPL, using backend: 3.5.0)
>>> NX> 716 Starting NX Agent ...
>>> Error: Aborting session with 'Server is already active for display 0
> 
> So we're back to the begining again . . .
> 
> display :0 is usually the console . . .
> 
> . . . ssh usually starts at :10 . . .
> 
> [SNIP]
> 
>> If I remove /tmp/.X0-lock and re-run I get the following:
> 
> stop doing that
> 
> [SNIP]
> 
>> If I look in /tmp on the good machine after the user has logged in there 
> are:
> 
> [SNIP]
> 
>> 
>>> -rw-------  1 nx        nx           0 May 13 12:35 .nX1000-lock
>>> -r--r--r--  1 jonnytest jonnytest   11 May 13 12:35 .X1000-lock
> 
> 
> and the default for FreeNX is :1000
> 
> so
> 
> forget your ssh with run nxnode --agent
> 
> 
> Set logging to 6 in /etc/node.conf
> 
> Create the nxserver log file according to the pathin node.conf
> 
> Set the netserver log file to   chmod 777
> 
> Try connecting
> 
> Lets see what yourlog says . . .
> 
> 
> 
> 
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20140513/c6caa9c9/attachment-0001.html>
> 
> ------------------------------
> 
> Message: 2
> Date: Wed, 14 May 2014 00:36:56 +0100
> From: Jonathan Brooks <Jon.Brooks at bristol.ac.uk>
> To: freenx-knx at kde.org
> Subject: [FreeNX-kNX] okay this is really getting weird
> Message-ID: <5538A564-C970-413A-94F6-F8E987404329 at bristol.ac.uk>
> Content-Type: text/plain; charset=windows-1252
> 
> Hi,
> 
> So bizarrely I can now start a gnome2 (i.e. MATE) session on this troublesome machine, but not lubuntu!?!?!
> 
> I am still convinced this is either something related to the user account, or potentially a permissions problem on /tmp/.X11-unix
> 
> I have read that the freenx-script needs to be hacked to replace the line which creates /tmp/.X11-unix with 1755 permissions to a more
> permissive 1777
> 
> However I?ve not seen anything that suggests this folder should be owned by nx?..let me explain.
> 
> If I change the ownership of /tmp/.X11-unix to be user=nx, group=root I can then run:
> /usr/lib/nx/nxnode ?agent
> 
> and bingo, a blank screen appears on the client.
> 
> If I change the ownership back to root, were back to nxnode ?agent just saying that it: Cannot establish any listening sockets etc
> and nothing appears on the client.
> 
> This is reproducible across both of my ubuntu 13.10 machines, perhaps arguing against it being a user account problem.
> 
> So is there anything that I am missing that might account for why Gnome(ish) works, but lubuntu doesn?t?
> 
> Cheers, Jon
> 
> 
> 
> 
> 
> --
> Jonathan Brooks (PhD) - Senior Research Fellow
> CRiCBristol, University of Bristol, St Michael's Hill, Bristol, UK
> T: +44(0)117-342-1512 W: http://www.cricbristol.ac.uk
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Wed, 14 May 2014 07:45:59 +0100
> From: chris at ccburton.com
> To: User Support for FreeNX Server and kNX Client <freenx-knx at kde.org>
> Subject: Re: [FreeNX-kNX] okay this is really getting weird
> Message-ID:
> 	<OFF441670C.2809A031-ON80257CD8.00243FAC-80257CD8.00250FEC at ccburton.com>
> 	
> Content-Type: text/plain; charset="utf-8"
> 
> freenx-knx-bounces at kde.org wrote on 14/05/2014 00:36:56:
> 
>> Hi,
>> 
>> So bizarrely I can now start a gnome2 (i.e. MATE) session on this 
>> troublesome machine, but not lubuntu!?!?!
>> 
>> I am still convinced this is either something related to the user 
>> account, or potentially a permissions problem on /tmp/.X11-unix
> 
> maybe
> 
> 
>> I have read that the freenx-script needs to be hacked to replace the
>> line which creates /tmp/.X11-unix with 1755 permissions to a more
>> permissive 1777
> 
> Did you try chmod-ing it ???
> 
> /tmp/.X11-unix is usually there anyway,
>         created as part of X or kde etc
> 
> It's rare that FreeNX needs to create it
> BUT
> if your distro now uses somewhere else for local X sessions,
> or
> it gets removed for some reason
> then
> you will run into that bug.
> 
> nxagent isa modded  XFree86 . . . 
> . . . everyone else uses Xorg, which is moving on . . .
> 
>> However I?ve not seen anything that suggests this folder should be 
>> owned by nx?..let me explain.
> 
> It shouldn't be, but that directory should be searchable by everyone . . 
> i.e. the x bits should be set
> 
>> If I change the ownership of /tmp/.X11-unix to be user=nx, 
>> group=root I can then run:
>> /usr/lib/nx/nxnode ?agent
> 
> Don't do that
> 
>> and bingo, a blank screen appears on the client.
>> 
>> If I change the ownership back to root, were back to nxnode ?agent 
>> just saying that it: Cannot establish any listening sockets etc
>> and nothing appears on the client.
>> 
>> This is reproducible across both of my ubuntu 13.10 machines, 
>> perhaps arguing against it being a user account problem.
>> 
>> So is there anything that I am missing that might account for why 
>> Gnome(ish) works, but lubuntu doesn?t?
> 
> Does lubuntu work locally i.e without NX ( that will be Xorg )
> 
>> 
>> Cheers, Jon
> 
> Try chmod-ing
>         /tmp/.X11-unix
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20140514/70af7582/attachment-0001.html>
> 
> ------------------------------
> 
> ________________________________________________________________
>     Were you helped on this list with your FreeNX problem?
>    Then please write up the solution in the FreeNX Wiki/FAQ:
>  http://openfacts.berlios.de/index-en.phtml?title=FreeNX_FAQ
> ________________________________________________________________
>       FreeNX-kNX mailing list --- FreeNX-kNX at kde.org
>      https://mail.kde.org/mailman/listinfo/freenx-knx
> ________________________________________________________________
> 
> End of FreeNX-kNX Digest, Vol 115, Issue 6
> ******************************************

--
Jonathan Brooks (PhD) - Senior Research Fellow
CRiCBristol, University of Bristol, St Michael's Hill, Bristol, UK
T: +44(0)117-342-1512 W: http://www.cricbristol.ac.uk



More information about the FreeNX-kNX mailing list