[FreeNX-kNX] Little bit of recoding :)
Marcelo Boveto Shima
marceloshima at gmail.com
Mon Mar 30 01:28:50 UTC 2009
Probably you will want to hack on "node_start_applications()" function at
the
"Startup the application" session.
Something like:
if [ "$user" == "guest" ]
then
NODE_APPLICATION="firefox"
fi
just before the app invocation line:
DISPLAY=:$display $NODE_APPLICATION
>>"$USER_FAKE_HOME/.nx/C-$sess_id/session" 2>&1 &
Changing NODE_APPLICATION just before it will be called ensures you that the
session will
not be called with something like Xsession.
Regards.
Shima
On Thu, Mar 26, 2009 at 8:17 AM, Steven Maddox <s.maddox at cyorxamp.info>wrote:
> Hey, here is an extract out of file 'nxnode'...
>
> 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" ] &&
> application=$COMMAND_XTERM
> NODE_STARTX=$application
> ;;
> 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>&1 ;
> then
> NODE_STARTX="$DEFAULT_X_SESSION"
> else
> NODE_STARTX=$COMMAND_XTERM
> fi
> ;;
> esac
>
> # if [ "$HOME" != "guest" ] then
> # echo "$NODE_STARTX"
> # else
> echo "firefox"
> # fi
> }
>
> At the end you can see I've added some lines so it ignores whatever was
> picked
> and instead overrides it with my application... firefox.
>
> Basically you log in to my box with user/pass guest:guest.
> And you get a locked down... intranet only... remote firefox window.
>
> Only thing is I'd like to use this box for normal NX sessions too and this
> prevents that.
> My commented out attempt at checking if the user is 'guest' and -then- go
> force
> firefox isn't working for some reason and I'm not the greatest bash coder
> in
> the world.
>
> Any tips on if this is a secure way of doing what I want and/or how to make
> it work?
>
> Steve
>
> ________________________________________________________________
> 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
> ________________________________________________________________
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20090329/b1f1894f/attachment.html>
More information about the FreeNX-kNX
mailing list