[FreeNX-kNX] X forwarding to FreeNX server?

Florian Schmidt fschmidt at gmx.at
Tue Jan 20 10:09:30 UTC 2009


Hi,

we use in the background of our server farm platform LSF to submit jobs (similar to SunGrid). A Colleague of mine wrote a patch for NX to handle this X11 forwarding:

 $COMMAND_XAUTH >/dev/null 2>&1 <<EOF
 add localhost:$display MIT-MAGIC-COOKIE-1 $cookie
 add unix:$display MIT-MAGIC-COOKIE-1 $cookie
+add $(hostname --fqdn):$display MIT-MAGIC-COOKIE-1 $cookie
 exit
 EOF
 
 $COMMAND_XAUTH -f "$USER_FAKE_HOME/.nx/C-$sess_id/authority" >/dev/null 2>&1 <<EOF
 add localhost:$display MIT-MAGIC-COOKIE-1 $cookie
 add unix:$display MIT-MAGIC-COOKIE-1 $cookie
+add $(hostname --fqdn):$display MIT-MAGIC-COOKIE-1 $cookie
 exit
 EOF

 mkdir -m700 $USER_FAKE_HOME/.nx/C-$sess_id/scripts/ 2>/dev/null || chmod 700 $USER_FAKE_HOME/.nx/C-$sess_id/scripts/

 cat << EOF >$USER_FAKE_HOME/.nx/C-$sess_id/scripts/authority
 remove localhost:$display
 remove unix:$display
+remove $(hostname --fqdn):$display
 exit
 EOF

After patching NX with this it is possible to dispatch jobs using the NX server as display. This should work also with SunGrid. At least in our testenv it worked.

Kind Regards,
Florian

-----Original Message-----
From: Mario Becroft [mailto:mb at gem.win.co.nz] 
Sent: Sunday, January 18, 2009 11:38 PM
To: User Support for FreeNX Server and kNX Client
Subject: Re: [FreeNX-kNX] X forwarding to FreeNX server?

Chris Jewell <chris.jewell at warwick.ac.uk> writes:

> Mario,
>
> Many thanks for the help.  This worked very well with a command such as:
>
> $ qrsh -display $HOSTNAME$DISPLAY xclock
>
> However, do you know if it is possible to configure FreeNX to 
> explicitly set the hostname in $DISPLAY, so qrsh can just forward it 
> to the execution node without having to use the -display argument?

Well this is slightly tricky. Normally rsh may not even pass the DISPLAY variable to the remote host at all unless you explicitly set it. I am not familiar with qrsh. As for the hostname, you could probably tweak one of the nx scripts to do this. Of course, this would mean that locally invoked clients would then use tcp instead of unix sockets to connect to the X server, which could be slower.

Either way will involve a bit of hacking. On my system I have a special script used for invoking applications. It looks up a database to find out what host the command should be run on, mangles the DISPLAY variable as required and then runs the command with rsh.

--
Mario Becroft <mb at gem.win.co.nz>
________________________________________________________________
     Were you helped on this list with your FreeNX problem?
    Then please write up the solution in the FreeNX Wiki/FAQ:

http://openfacts2.berlios.de/wikien/index.php/BerliosProject: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
________________________________________________________________

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger



More information about the FreeNX-kNX mailing list