[FreeNX-kNX] Recoding 'nxnode' a little

s.maddox at functionoffice.org s.maddox at functionoffice.org
Fri Mar 27 13:33:42 UTC 2009



Hi Folks,

Here is a bit of code from the 'nxnode' file...

node_find_application()
{
 NODE_STARTX=""
 case $1 in
 shadow|windows|vnc)
 :
 ;;
 unix-kde)
 NODE_STARTX=$COMMAND_START_KDE
 ;;
 unix-gnome)
 NODE_STARTX=$COMMAND_START_GNOME
 ;;
 unix-cde)
 NODE_STARTX=$COMMAND_START_CDE
 ;;
 unix-application|windows-helper|vnc-helper)
 [ "$application" = "xterm" ] &;
 unix-console)
 NODE_STARTX=$COMMAND_XTERM
 ;;
 unix-default|*)
 if [ -x "$HOME/$USER_X_STARTUP_SCRIPT" ]; then
 NODE_STARTX="$HOME/$USER_X_STARTUP_SCRIPT"
 elif which "$DEFAULT_X_SESSION" >/dev/null 2> then
 NODE_STARTX="$DEFAULT_X_SESSION"
 else
 NODE_STARTX=$COMMAND_XTERM
 fi
 ;;
 esac

# if [ "$HOME" != "guest" ] then
# echo "$NODE_STARTX"
# else
 echo "firefox"
# fi
}

As you can see I've modified the bottom bit so it doesn't echo what was
chosen but instead echoes 'firefox'. This way anyone who connects to my box
will be forced to have a remote copy of firefox to access my intranet
(naturally I've compensated in
firefox for multiple instances and also
locked it down alot).

What I'd like is to fix my 'if' statement so that it'll only do this for
someone logging in as 'guest'. Does anyone know how to do this (I'm not the
greatest at bash) and also can you think of any security problems that I
may have accomplishing what I want this way around?

Steven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20090327/9f6723d7/attachment.html>


More information about the FreeNX-kNX mailing list