[FreeNX-kNX] Suggested Diff for Fedora 8 nxloadconfig

Alastair Johnson alastair at solutiontrax.com
Thu Mar 20 09:25:49 UTC 2008


On Wednesday 19 March 2008, Gregory Carter wrote:
> I found that, the freenx server config that ships with Fedora 8, has
> less than desirable default settings.  These settings, tend to
> malfunction depending on the package installation selected by the
> administrator.  I found, black screens on some servers, plain old
> disconnect errors and a variety of connection problems like connection
> loss with the default install.
>
> So, I have stripped all of the stuff that does not belong to Fedora 8
> out of the nxloadconfig script.   This will gurantee that the server has
> the correct defaults under Fedora 8.
>
> The entire configuration for nx, is very bizarre in my opinion, due to
> the fact configuration settings do not exist in a central file in a
> directory under /etc.

The central file for the settings is /etc/nxserver/node.conf and there is a 
commented example /etc/nxserver/node.conf.sample provided by the fedora RPMs. 
nxloadconfig provides the application defaults which are overridden by 
node.conf. If freenx were compiled binaries rather than shell scripts then 
the settings in nxloadconfig would be in the binary. It is arguable that the 
fedora packagers should include a fedora-optimised node.conf instead of 
patching nxloadconfig. They do aim to update node.conf.sample so the defaults 
mentioned match their modified nxloadconfig though it doesn't always happen. 
Rick corrected mismatches I've reported in the past, but that was some time 
ago.

> I almost feel like a Windows admin sometimes in dealing with this
> software because, like Windows .ini files are usually spread out all
> over the place with no rhyme or reason.   What is needed is a new
> packaging system for nx that makes the thing incredibly non windows
> like.  (i.e. organized under /etc )
>
> After exploring many of these difficulties in setting up a variety of
> Fedora 8 NX systems on my remote and local network.   I find that the
> below diff, if applied to the nxloadconfig file after a fresh
> installation of freenx, gurantees the nx server environment is properly
> setup and will run with the defaults.
>
> Any feedback would be most welcome.

Comments inline below. 

> -gc
>
> 157c157
> < COMMAND_FOOMATIC="/usr/lib/cups/driver/foomatic-ppdfile"
> ---
>
>  > COMMAND_FOOMATIC="/usr/bin/foomatic-ppdfile"

Looks fair for fedora 8.

> 269,270d268
> <       { ! mywhich "$PATH_BIN/nxdesktop"; } >/dev/null 2>&1 &&
> ENABLE_EXTERNAL_NXDESKTOP="1"
> <       { ! mywhich "$PATH_BIN/nxviewer"; } >/dev/null 2>&1 &&
> ENABLE_EXTERNAL_NXVIEWER="1"

Why remove this? what problem does it cause?

> 300c298
> < [ -z "$APPLICATION_LIBRARY_PRELOAD" ] &&
> APPLICATION_LIBRARY_PRELOAD="$APPLICATION_LIBRARY_PATH/libX11.so.6.2:$APPLI
>CATION_LIBRARY_PATH/libXext.so.6.4:$APPLICATION_LIBRARY_PATH/libXcomp.so:$AP
>PLICATION_LIBRARY_PATH/libXcompext.so:$APPLICATION_LIBRARY_PATH/libXrender.s
>o.1.2" ---
>
>  > [ -z "$APPLICATION_LIBRARY_PRELOAD" ] &&
>
> APPLICATION_LIBRARY_PRELOAD="$APPLICATION_LIBRARY_PATH/libX11.so.6.2"

Some of the version numbers don't match the files supplied by the fedora 8 
(well...f7 since f8 uses the f7 package) but isn't the answer to set the 
right version numbers rather than remove them?

 [ -z "$APPLICATION_LIBRARY_PRELOAD" ] &&
 APPLICATION_LIBRARY_PRELOAD="$APPLICATION_LIBRARY_PATH/libX11.so.6.2:
$APPLICATION_LIBRARY_PATH/libXext.so.6.4:
$APPLICATION_LIBRARY_PATH/libXcomp.so.2:
$APPLICATION_LIBRARY_PATH/libXcompext.so.2:
$APPLICATION_LIBRARY_PATH/libXrender.so.1.2" ---

> 332,351d329
> <       if [ "ENABLE_EXTERNAL_NXDESKTOP" = "1" ]
> <       then
> <               [ ! mywhich "$COMMAND_RDESKTOP" >/dev/null 2>&1 ] && \
> <                       WARNING="yes" && echo "Warning: Could not find
> COMMAND_RDESKTOP=$COMMAND_RDESKTOP. RDP sessions won't work."
> <       else
> <               [ ! -x "$PATH_BIN/nxdesktop" ] && \
> <                       WARNING="yes" && echo "Warning: Could not find
> nxdesktop in $PATH_BIN. RDP sessions won't work."
> <       fi
> <
> <       if [ "ENABLE_EXTERNAL_NXVIEWER" = "1" ]
> <       then
> <               [ ! mywhich "$COMMAND_VNCVIEWER" >/dev/null 2>&1 ] && \
> <                       WARNING="yes" && echo "Warning: Could not find
> COMMAND_VNCVIEWER=$COMMAND_VNCVIEWER. VNC sessions won't work."
> <               [ ! mywhich "$COMMAND_VNCPASSWD" >/dev/null 2>&1 ] && \
> <                       WARNING="yes" && echo "Warning: Could not find
> COMMAND_VNCPASSWD=$COMMAND_VNCPASSWD. VNC sessions won't work."
> <       else
> <               [ ! -x "$PATH_BIN/nxviewer" ] && \
> <                       WARNING="yes" && echo "Warning: Could not find
> nxviewer in $PATH_BIN. VNC sessions won't work."
> <       fi

This is just removing warnings about incorrectly set or unset options. Nothing 
is set here, and it's removing potentially useful debugging information. Why 
remove it? What problem does it cause?

> 499,504d476
> <       [ ! -x "$CUPS_IPP_BACKEND" ] && \
> <               WARNING="yes" && echo "Warning: \"$CUPS_IPP_BACKEND\" is
> not executable." \
> <                                         && echo "         Users will
> not be able to enable printing."
> <       [ ! -x "$CUPS_BACKEND/smb" ] && \
> <               WARNING="yes" && echo "Warning: \"$CUPS_BACKEND/smb\" is
> not executable." \
> <                                         && echo "         Users will
> not be able to enable printing."

More warnings removed - see above 

> 531,533c503
> <       ! mywhich "$COMMAND_START_CDE" >/dev/null 2>&1 && \
> <               WARNING="yes" && echo "Warning: Invalid value
> \"COMMAND_START_CDE=$COMMAND_START_CDE\"" \
> <                                         && echo "         Users will
> not be able to request a CDE session."
> ---

More warnings removed - see above

> 539,542d508
> <       ! mywhich "$COMMAND_SMBMOUNT" >/dev/null 2>&1 && \
> <               WARNING="yes" && echo "Warning: Invalid value
> \"COMMAND_SMBMOUNT=$COMMAND_SMBMOUNT\". You'll not be able to use SAMBA. "
> <       ! mywhich "$COMMAND_SMBUMOUNT" >/dev/null 2>&1 && \
> <               WARNING="yes" && echo "Warning: Invalid value
> \"COMMAND_SMBUMOUNT=$COMMAND_SMBUMOUNT\". You'll not be able to use SAMBA."

More warnings removed - see above 

> 581c547
> <       [ -z "$(strings $PATH_BIN/nxagent | egrep 'NXAGENT - Version
> 1.5.0|NXAGENT - Version 2.[01].0|NXAGENT - Version 3.0.0')" ] && \
> ---
>
>  >       [ -z "$(strings $PATH_BIN/nxagent | egrep 'NXAGENT - Version
>
> 1.5.0|NXAGENT - Version 2.[01].0|NXAGENT - Version 3.0.0|NXAGENT -
> Version 3.1.0')" ] && \

This one looks justifiable. I would have gone for Version 3.[01].0 to keep 
things consistent, but that's just me ;-)



More information about the FreeNX-kNX mailing list