From freenx-knx Mon Apr 23 23:15:35 2007 From: "torrr com" Date: Mon, 23 Apr 2007 23:15:35 +0000 To: freenx-knx Subject: Re: [FreeNX-kNX] Bug: negotiating link parameters -> timeout ON Message-Id: <15e78e5b0704231615p226c6f66qbc13f5937b1352ad () mail ! gmail ! com> X-MARC-Message: https://marc.info/?l=freenx-knx&m=117737017518827 Hi, I am glad that you liked that hack, thanks :) I did the suggested modification (and commented out my own line), and it partially works: It does kill the stubborn sshd; On the first resume it times out; On the second, and third resumes it succeeds. I thought that maybe the nxserver script need to do more stuff after the "exit 0", and it is prevented from doing so by that exit. Then on the first resume, it does what it have to do, but at that time it is to late for this resume to succeed. But for the next resumes it is all set and ready to go, and so they succeed. So I have commented out the "exit 0" and then it worked fine. One thing though, I get this message from my windows nxclient after the first suspend (_only_): "The connection with the remote server was shut down. Please check the state of your network connection". Which suggest that killing the sshd is not what the client expects to happen, and there might be a "cleaner" solution to look after in the future, but this one works too, and this message is a small price to pay for being able to resume. On 4/23/07, Fabian Franz wrote: > > I did something a little silly but it works. I feel like I should > > apologize... sorry: > > :-) > > Why apologize? > > > I added this line to the top of the nxserver script: > > > > pstree -p nx| perl -e '@lines=; foreach $line (@lines){if > > ($line=~/^sshd\((\d+)\)$/) { kill 9, $1;}}' > > Haha, that is a nice hack ;-). > > > > > This line does the pstree, pipe it to perl, which in turn find the > > lines that have this and only this on it 'sshd(number)', and kills the > > processes with that number. The stubborn process gets to live after > > the first suspend, which is not so good, but it gets killed before the > > next resume is done, so it is good enough for that resume to succeed. > > That gives me an idea. Try the following - if you want to: > > -exec $COMMAND_NETCAT [...] > +$COMMAND_NETCAT [...] > +kill $PPID # Lets kill our parent sshd process > + # or kill -9 > +exit 0 > > (Of course the above is just for SSL encrypted sessions). > > cu > > Fabian > ________________________________________________________________ > 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@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@kde.org https://mail.kde.org/mailman/listinfo/freenx-knx ________________________________________________________________