[FreeNX-kNX] Little bit of recoding :)
s.maddox at functionoffice.org
s.maddox at functionoffice.org
Mon Mar 30 12:14:45 UTC 2009
Actually it seems more likely that
if [ "$user" == "guest" ]
Doesn't check properly... I tried your code in the place I usually put it
(the find function) and it didn't do anything when logging in as guest, but
forcing an echo of firefox still works fine and prevents a window manager.
I've tried $user $USER and $USERNAME... any other variables I might be
able to try?
-------- Original Message --------
Hi Shima,
Using this method allows someone to start a window manager like Gnome and
then do other things. If the user logging in is 'guest' I need them to be
able to run absolutely nothing no matter what they have chosen except for
the given command.
I'll try putting your code elsewhere to see if it can work better to get
around this.
Thanks!
Steven
On Sun, 29 Mar 2009 22:28:50 -0300, Marcelo Boveto Shima wrote: 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 margin: 0pt 0pt 0pt 0.8ex;
padding-left: 1ex;">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" ] &;
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
}
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
[1]
Don't forget to check the NX Knowledge Base:
http://www.nomachine.com/kb/ [2]
________________________________________________________________
FreeNX-kNX
mailing list --- FreeNX-kNX at kde.org [3]
https://mail.kde.org/mailman/listinfo/freenx-knx [4]
________________________________________________________________
Links:
------
[1]
http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ
[2] http://www.nomachine.com/kb/
[3] mailto:FreeNX-kNX at kde.org
[4] https://mail.kde.org/mailman/listinfo/freenx-knx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/freenx-knx/attachments/20090330/3d40fce6/attachment.html>
More information about the FreeNX-kNX
mailing list