[FreeNX-kNX] FreeNX nxnode problems
Craig Markwardt
craigm at milkyway.gsfc.nasa.gov
Sat Mar 5 22:43:07 UTC 2005
Greetings, I am using FreeNX as packaged for Fedora by Rick Stout
(nx-1.4.0-0.fdr.4.i386.rpm, freenx-0.2.8-0.fdr.0.noarch.rpm).
I installed the package as instructednd and copied the server SSH key
to my client. I was having no problem authenticating, but then the
following message would appear in the error transcript:
: Loop: PANIC! Can't identify NX port in string ':'.
: Error: Can't identify NX port in string ':'.
: Error: NX transport initialization failed.
As I investigated this more carefully, it seemed that the program
'nxnode' was not parsing the startsession arguments properly.
The getparam function,
: getparam(){
: stringinstring "&$1=" "$CMDLINE" || return 1
: result="${CMDLINE##*&$1=}"
: result="${result%%[&&&&&]*}"
: echo "$result"
: return 0
: }
uses some fancy bash shell syntax to extract the relevant parameter
values from the command line string. Unfortunately this does not seem
to work on the bash version packaged with RedHat FC2:
GNU bash, version 2.05b.0(1)-release (i386-redhat-linux-gnu)
The function would just terminate at the first result= command. I
could not reproduce this behavior when running the 'nxnode' script by
hand. The following small patch uses sed instead of the bash syntax,
and works. I am now able to log in with no problem, and I can (now)
say that FreeNX is really nice! Thanks.
To repeat, this has nothing to do with SSH or authentication. It has
something to do with unreliable bash substitution expressions.
Hope this helps. Yours,
Craig Markwardt
--- nxnode~ 2004-11-23 11:04:14.000000000 -0600
+++ nxnode 2005-03-05 16:28:52.459651222 -0600
@@ -44,8 +44,9 @@
# Reread boot command line; echo last parameter's argument or return false.
getparam(){
stringinstring "&$1=" "$CMDLINE" || return 1
-result="${CMDLINE##*&$1=}"
-result="${result%%[&&&&&]*}"
+result=`echo $CMDLINE | sed -e 's/^.*&'$1'=//' -e 's/&.*$//' `
+# result="${CMDLINE##*&$1=}"
+# result="${result%%[&&&&&]*}"
echo "$result"
return 0
}
More information about the FreeNX-kNX
mailing list