[FreeNX-kNX] Invalid Magic Cookie? (was Re: NX 2.0.0)
Tyler Ellis
tyler at inhousesupport.com
Sat Jul 8 21:50:13 UTC 2006
David, on your desktop i would wipe the "C:\program files\NX client
.......\" directory and reinstall the nxclient 1.5
2nd on your desktop do a search for cyg*.dll you should only have one it
belongs in c:\cygwin\bin if you have cygwin feel free to zip up the
other one and delete the cygwin.dll and keep the cygwin.dll.zip file
just incase im telling you to screw up your system :P
[Sorry if this doesn't make much sense]
If you can read my long email from earlier you may see where im
going with this.. Basically i think that the nxclient (programmed in
python or vb something that is not compiled against cygwin1.dll) is
misshandling the location of .xauthority file and that it is assuming it
should write it to some location... nxclient writes it to say
C:\documents and settings\administrator\.xauthority (who know's
where it is really), where as NXWin/NXauth looks for it in the cygwin
enviroment of /home/administrator/.xauthority as it was compiled
against the cygwin1.dll
The other thing it may be is the way the new client encodes spaces as
indicted earlier on the list and also included in this email..
I never could got 2.0 working, and my first attempt using 1.5 it worked
(I felt dumb cosdiering it took me 3 days to try that), so I don't think
its a library conflict comming from your old client... I think that you
have cygwin on that machine and the .xauthority file is being wrote to
the wrong place, and the nomachine devs should be made aware of this if
it is the case.
You should also know that the MIT magic cookie problem keeps popping up
so I *know* a fix will come soon as many ppl are turmoiling with it.
Where did you see the xauth warnings again I would like to peek :P
[My earlier post]
Correction NX Client 2.0 on windows
degrading to 1.5 client made it work,
NX Client 2.0 debian also does not work
Not sure about linux 1.5 client working or not..
Tyler Ellis wrote:
>>HOW CAN I FIX XAUTHORITY mismatch.. :P ?
>>
>>
>>I have been working at this forever and im stumped/annoyed. I have found
>>out alot about nx /free nx in the process (OMG THE PUN!).
>>
>>The nxclient runs using whatever windows compiler, however the backend
>>stuff is all cygwin. The backend scares me as I use cygwin and the /home
>>directory is set differntly depending on whether or not you have cygwin
>>or not. Cygwin looks fine, but it could be largely the reason im having
>>an issue. Having more then one cygwin.dll on one system in the past has
>>caused crashes, otherwise the system runs fine. Having installed cygwin,
>>registries entries are placed that effect $home, xauthority lives in
>>$home if the nxclient is windows based as it infers to be as it is not
>>is ps -a in cygwin like the other nx apps are, well then, it could be
>>dropping an xauthority file somewhere else. Although the good news is
>>have tools to work with in troubleshooting. I can say that NXAuth is
>>pickup up my Xauthority (files as noted in my debug).
>>
>>Summarly to this debug proccess below, i believe my Xauthority system is
>>f*ed cause isaw that message a few times while playing with the bash in
>>nxserver. The error message was xauthority size mismatch... But im not
>>sure what i did to the bash script to show it in the nxclient and i lost
>>that change i think those errors are going to /dev/null or something..
>>
>>My following debug only shows that kde is working with nxagent as seen
>>in a session file on the linux box. My netstat/network config on my
>>windows box implies tunnels are setup.. I think the problem is
>>Xauthority, i don't know how to fix it.
>>
>>I have actually manually launche NXwin :0 through putty, then doing
>>nxagent :1000 ,exporting the new display, starting kde on the linux box
>>and got X using NXwin so i know that all my bimaries are good. I have
>>debian etch. Cygwin, windows Xp.
>>
>>
>>
>>
>>Windows:
>>*######################################################################
>>**
>>[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>#My script (A script I wrote to cross ref cygwin to netstat: )
>>$ cat ipproc
>>for i in `ps -a|awk {'print $1'}|grep -v PID`; do ps -a| grep $i |grep
>>-v PID && netstat -ano |grep $i; done
>>*[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]
>>
>>**
>>[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**
>>../ipproc.sh
>> 4044 1 4044 4044 con 500 08:52:11 /usr/bin/bash
>> 552 4044 552 2624 con 500 15:55:26 /usr/bin/sh
>> (Meaning no connections)
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]
>>**
>>
>>
>>[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*
>>$ "/cygdrive/c/Program Files/NX Client for Windows/bin/NXAuth" list
>>localhost:1000 MIT-MAGIC-COOKIE-1 63a9f0ea7bb98050796b649e85481845
>>mythXen/unix:1000 MIT-MAGIC-COOKIE-1 63a9f0ea7bb98050796b649e85481845
>>
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>***************************************************
>>
>>**Linux*
>>*######################################################################
>>
>>
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*mythXen:~# nxserver --list
>>NX> 100 NXSERVER - Version 1.4.0-45-SVN OS (GPL)
>>NX> 127 Sessions list:
>>
>>Display Username Remote IP Session ID
>>------- --------------- --------------- --------------------------------
>>NX> 999 Bye
>>
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*mythXen:~# ps -ax -f|grep nx
>>Warning: bad ps syntax, perhaps a bogus '-'? See
>>http://procps.sf.net/faq.html
>>23160 pts/2 S+ 0:00 | \_ grep nx
>>
>>[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*
>>
>>Okay nothing is running on the Linux or Windows box
>>
>>I press start the client and hit login. , my login screen dissapears and
>>this is what my ps tree looks like.
>>
>>
>>Linux
>>########################################################################
>>
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*26186 pts/7 S+ 0:00 | \_ grep nx
>>24864 ? Ss 0:00 \_ sshd: nx [priv]
>>24866 ? S 0:00 | \_ sshd: nx at notty
>>25014 ? S 0:00 | \_ /bin/bash
>>/usr/lib/nx/nxserver -c /usr/lib/nx/nxserver
>>25015 ? S 0:00 | \_ /bin/bash
>>/usr/lib/nx/nxserver -c /usr/lib/nx/nxserver
>>25032 ? Sl 0:00 | | \_ /usr/bin/expect
>>/usr/lib/nx/nxnode-login -- ssh xenshu 22 /usr/lib/nx/nxnode --startsession
>>25035 pts/3 Ss+ 0:00 | | | \_ ssh -2 -x -l
>>xenshu 127.0.0.1 -o NumberOfPasswordPrompts 1 -p 22 /usr/lib/nx/nxnode
>>--startsession
>>25034 ? S 0:00 | | \_ tee -a
>>/var/log/nxserver.log
>>25017 ? S 0:00 | \_ /bin/bash
>>/usr/lib/nx/nxserver -c /usr/lib/nx/nxserver
>>25043 ? Ss 0:00 \_ /bin/bash /usr/lib/nx/nxnode
>>--startsession
>>25168 ? S 0:00 \_ /bin/bash /usr/lib/nx/nxnode
>>--startsession
>>25169 ? S 0:00 | \_ tail -n1 -f
>>/home/xenshu/.nx/C-mythXen-1002-436C42C37961888500E81B791A32BF3C/session
>>25170 ? S 0:00 | \_ /bin/bash
>>/usr/lib/nx/nxnode --startsession
>>25172 ? S 0:00 \_ /bin/bash /usr/lib/nx/nxnode
>>--startsession
>>25173 ? S 0:00 | \_ /usr/lib/nx/nxagent
>>-persistent -name NX - xenshu at mythXen:1002 - local22 (GPL Edition)
>>-option
>>/home/xenshu/.nx/C-mythXen-1002-436C42C37961888500E81B791A32BF3C/options
>>-kbtype pc102/en_US -geometry fullscreen -bs when_requested :1002
>>25175 ? S 0:00 \_ /bin/bash /usr/lib/nx/nxnode
>>--startsession
>>25692 ? Ss 0:00 /bin/bash /usr/lib/nx/nxserver -c
>>/usr/lib/nx/nxserver
>>26097 ? S 0:00 /bin/bash /usr/lib/nx/nxnode --resumesession
>>
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]
>>
>>
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*NX> 100 NXSERVER - Version 1.4.0-45-SVN OS (GPL)
>>NX> 127 Sessions list:
>>
>>Display Username Remote IP Session ID
>>------- --------------- --------------- --------------------------------
>>1002 xenshu 172.16.11.7 436C42C37961888500E81B791A32BF3C
>>NX> 999 Bye
>>
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*
>>**
>>
>>
>>[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*mythXen:~# cat
>>/home/xenshu/.nx/C-mythXen-1002-436C42C37961888500E81B791A32BF3C/session
>>
>>Couldn't open RGB_DB '/usr/X11R6/lib/X11/rgb'
>>
>>NXAGENT - Version 1.5.0
>>
>>Copyright (C) 2001, 2005 NoMachine.
>>See http://www.nomachine.com/ for more information.
>>
>>Info: Agent running with pid '25173'.
>>nxagentProcessOptionsFile: Option file is
>>[/home/xenshu/.nx/C-mythXen-1002-436C42C37961888500E81B791A32BF3C/options].
>>nxagentProcessOptionsFile: Option file is 213 bytes long.
>>nxagentParseOptionString: Warning ignored option 'cache' = '8M'.
>>nxagentParseOptionString: Warning ignored option 'images' = '32M'.
>>nxagentParseOptionString: Warning ignored option 'link' = 'adsl'.
>>nxagentParseOptionString: Warning ignored option 'type' = 'unix-kde'.
>>nxagentParseOptionString: Warning ignored option 'cleanup' = '0'.
>>nxagentParseOptionString: Warning ignored option 'accept' = '127.0.0.1'.
>>nxagentParseOptionString: Warning ignored option 'cookie' =
>>'4610939038e315a34ad232f3edd44fe8'.
>>nxagentParseOptionString: Warning ignored option 'samba' = '0'.
>>nxagentParseOptionString: Warning ignored option 'media' = '1'.
>>Info: Proxy running in server mode with pid '25173'.
>>Info: Waiting for connection from '127.0.0.1' on port '5002'.
>>Info: Accepted connection from '127.0.0.1' on port '39475'.
>>Info: Connection with remote proxy established.
>>Info: Synchronizing local and remote caches.
>>Info: Handshaking with remote proxy completed.
>>Info: Using cache parameters 4/262144/8192KB/8192KB.
>>Info: Using image cache parameters 1/1/32768KB.
>>Info: Using split parameters 100/16384/6144/1024KB.
>>Info: Using adsl link parameters 8192/8/10/50.
>>Info: Using agent parameters 49152/0/0.
>>Info: Using pack method '16m-jpeg-7' with session 'unix-kde'.
>>Info: Using ZLIB data compression level 3.
>>Info: Using ZLIB data threshold set to 32.
>>Info: Using ZLIB stream compression level 6.
>>Info: Using remote ZLIB data compression level 3.
>>Info: Using remote ZLIB stream compression level 6.
>>Info: Not using processor load limit.
>>Info: No suitable cache file found.
>>Info: Listening for multimedia connections on port '8002'.
>>Info: Starting X protocol compression.
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*
>>
>>****[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*mythXen:~# cat -s /etc/ssh/sshd_config |grep -v \#|sed '/^$/d;'
>>AllowTCPForwarding yes
>>Port 22
>>Protocol 2
>>HostKey /etc/ssh/ssh_host_rsa_key
>>HostKey /etc/ssh/ssh_host_dsa_key
>>UsePrivilegeSeparation yes
>>KeyRegenerationInterval 3600
>>ServerKeyBits 768
>>SyslogFacility AUTH
>>LogLevel INFO
>>LoginGraceTime 120
>>PermitRootLogin yes
>>StrictModes yes
>>RSAAuthentication yes
>>PubkeyAuthentication yes
>>AuthorizedKeysFile %h/.ssh/authorized_keys2
>>IgnoreRhosts yes
>>RhostsRSAAuthentication no
>>HostbasedAuthentication no
>>PermitEmptyPasswords no
>>ChallengeResponseAuthentication no
>>X11Forwarding yes
>>#I tried no for X11 but it still didn't work.
>>X11DisplayOffset 10
>>PrintMotd no
>>PrintLastLog yes
>>TCPKeepAlive yes
>>AcceptEnv LANG LC_*
>>Subsystem sftp /usr/lib/openssh/sftp-server
>>UsePAM yes
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]
>>
>>**
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*mythXen:~# xauth list
>>mythXen/unix:10 MIT-MAGIC-COOKIE-1 6eb602ca3c88b5f10304e31b597138b5
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]*
>>*
>>
>>
>>
>>
>>
>>
>>
>>**Windows
>>########################################################################
>>*
>>*[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]
>>
>>$ ./ipproc.sh
>> 4044 1 4044 4044 con 500 08:52:11 /usr/bin/bash
>> 456 4044 456 3224 con 500 16:08:20 /usr/bin/sh
>> 3820 1 3820 3820 ? 500 16:05:31
>>/cygdrive/c/Program Files/NX Client for Windows/bin/cygserver
>> 3940 1 4000 2388 ? 500 16:05:32
>>/cygdrive/c/Program Files/NX Client for Windows/bin/NXWin
>> 3080 1 3080 3080 ? 500 16:05:33
>>/cygdrive/c/Program Files/NX Client for Windows/bin/nxssh
>> TCP 127.0.0.1:4132 127.0.0.1:4133 ESTABLISHED 3080
>> TCP 127.0.0.1:4133 127.0.0.1:4132 ESTABLISHED 3080
>> TCP 127.0.0.1:4135 127.0.0.1:4128 ESTABLISHED 3080
>> TCP 172.16.11.7:4130 172.16.11.187:22 ESTABLISHED 3080
>> UDP 127.0.0.1:4131 *:* 3080
>> 2884 1 2464 4072 ? 500 16:05:42
>>/cygdrive/c/Program Files/NX Client for Windows/bin/nxesd
>>
>>**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]**[][][][][][][][][][][]
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>icq: 128863882
>>aim: dragophoenixfire
>>yahoo: kerpal2343
>>
>>Tyler Ellis
>>
>>
>>
>>
>>*
>>________________________________________________________________
>> 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
>> Don't forget to check the NX Knowledge Base:
>> http://www.nomachine.com/kb/
>>
>>________________________________________________________________
>> FreeNX-kNX mailing list --- FreeNX-kNX at kde.org
>> https://mail.kde.org/mailman/listinfo/freenx-knx
>>________________________________________________________________
>>
>>
>
>
________________________________________________________________
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
Don't forget to check the NX Knowledge Base:
http://www.nomachine.com/kb/
________________________________________________________________
FreeNX-kNX mailing list --- FreeNX-kNX at kde.org
https://mail.kde.org/mailman/listinfo/freenx-knx
________________________________________________________________
[Interesting email 2]
Hi. I've just installed nxclient version 2 to connect to an existing freenx server version 0.4.4+0.4.5-2sarge1 from backports.org and discoverd that when 'Desktop settings' 'Run the following command' the new nxclient url encodes certain charecters such as 'space', causeing them to fail to launch. So I'm posting my patch that fixes this for me, but will need to be adjusted to work with other freenx versions.
# this file is a patch for /usr/bin/nxserver which is linked from
# /usr/lib/nx/nxserver
# it allows the use of command with parameters in the 'run the following
# command' box with nxclient version 2 and freenx version 0.4.4+0.4.5-2sarge1
# ie: 'xlogo' works wereas 'xlogo -shape' fails due to nxclient version 2, url
# encodeing the space characters into '%20', so that 'xlogo -shape' becomes
# 'xlogo%20-shape', which fails to start
--- /usr/bin/nxserver.orig 2006-07-07 18:33:05.000000000 -0400
+++ /usr/bin/nxserver 2006-07-07 23:41:22.515464632 -0400
@@ -899,6 +899,10 @@
unset CMD
read CMD 2>/dev/null
# FIXME?
+# added by admin because the new version 2 of the nxclient sends url encoded
+# space characters in the command string, causeing commands with trailling
+# parameters to fail. ie: 'xlogo' succeeds and 'xlogo -shape' fails
+CMD="`echo "$CMD"|sed 's/%20/ /g'`"
[ "$CMD" = "" ] && CMD="quit"
# Logging
David Guntner wrote:
>David Guntner grabbed a keyboard and wrote:
>
>
>>Ok, I've discovered a new hitch. My laptop, which never had the NoMachine
>>NX Windows client installed on it, was able to connect to my Linux server
>>with the 2.0 client just fine. My desktop, on the other hand, which had
>>been running the 1.5 client and I uninstalled it and installed 2.0, cannot.
>> When I check the log for the session on the client, I see following
>>message:
>>
>>Warning: X connection failed with error 'Invalid MIT-MAGIC-COOKIE-1 key'
>>
>>Any idea what's causing that and how to clear it?
>>
>>
>
>I have found what may be a clue. I looked again at the session log for the
>Windows client on both the laptop computer (where 1.5 was never installed)
>and the desktop machine (where 1.5 was installed, and had been uninstalled to
>allow for what I had hoped would be a clean install of 2.0). On the desktop
>machine, where I'm getting the invalid key message that's killing my ability
>to connect, I noticed towards the beginning of the log was the following
>messages:
>
>Warning: Failed to read data from the X auth command.
>Warning: Generating a fake cookie for X authentication.
>
>That's *got* to be an indication. Question is, how does one correct things so
>that it will get what it needs to use a real cookie? The laptop doesn't have
>the message showing in its session log, and it connects just fine.
>
>Any ideas?
>
> --Dave
>________________________________________________________________
> 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
> Don't forget to check the NX Knowledge Base:
> http://www.nomachine.com/kb/
>
>________________________________________________________________
> FreeNX-kNX mailing list --- FreeNX-kNX at kde.org
> https://mail.kde.org/mailman/listinfo/freenx-knx
>________________________________________________________________
>
>
More information about the FreeNX-kNX
mailing list