[FreeNX-kNX] 2 Questions about FreeNX (VNC and weird usernames)

Michael Gorbovitski freenx.mickg at mickg.net
Sun Aug 6 23:55:01 UTC 2006


I have had 3 issues with FreeNX, 2 which I think are bugs (and possible solutions):

1st:  (A small bug, IMO, but annoying to track down)
file: nxnode

Had the issue that the windows nx client 2.0 would not work with a vnc session.
Tracked it down to the windows nxclient sending the address in an url-encoded form:
     server.com%3Adisplaynumber
instead of
     server.com:displaynumber
displaynumber is a number.

The freenx nxagent does not recognize this, and wants server.com:displaynumber.

This is, IMO, a bug (not a configuration issue), and can be fixed by replacing
   agent_server=$(getparam agent_server)
with
   agent_server=$(getparam agent_server | sed 's/%3A/:/g')
in nxnode.

This, at least, fixed it for me. I think this is a relatively sane solution, and, IMO, 
should not cause problems with anything else. Maybe only do this if the client is of 
version 2.0, though IMO, again, servernames with %3A in the hostname should be illegal 
anyways.

This assumes that you can successfully do nxviewer server.com:displaynumber, and have it 
display. If not, fix that 1st :)

*******************************************************************

2nd: users with usernames domain\user do not work.
2 issues:
1:	Cannot log in as domain\user, even though ssh "domain\user"@server works.

My guess, freeNX is somewhere doing something where bash interprets the backslash, instead 
of using it literally. Short gap solution: login using domain\\user, which works, mostly.


2:	Cannot resume sessions that are started as above, even though nxserver --list shows 
them to be there.

What happens is that due to shell mangling of \, and egrep handling \ specially, we get 
weird results. To fix, all things that are passed to egrep should have \ characters
replaced with \\\. So, something like:

if egrep -q "^userName=$1$" $i

would become

NEWNAME=$(echo $1|sed 's/\\/\\\\\\/g')
if egrep -q "^userName=$NEWNAME$" $i

When replace everywhere I see egrep in nxserver, this fixes the inability to connect to a 
suspended session.

Unfortunately, this solution affects a significant number of functions in nxserver, and it 
is non-obvious to me that there are no other problems that are based on usernames with \ 
in them, or that the above fix does everything perfectly.



3: The reconnect, though, is weird. If the reconnect is from a session that timed out, it 
works. If it is not, (i.e., suspended by calling nxserver --suspend :screen), it resumes, 
and yet, the nxClient windows is stuck on "Negotiating link parameters". The session is 
fine, responsive, etc..., but when nxClient times out (1 minute or so), it closes the 
session, and we get the following:

NX> 596 Error: Session  failed. Reason was: Session: Display failure detected at 'Sun Aug 
  6 19:14:26 2006'.
NX> 1009 Session status: suspending

I can, of course, resume the session again, but, I think that this is an issue. As that 
rears its ugly head even with a user called test, I assume this has nothing to do with the 
fix above (and as a matter of fact, applying it w/out the fix above shows that). I am not 
sure that this is a bug, and in fact, it may be a configuration issue on my end, though.







mickg







More information about the FreeNX-kNX mailing list