<p>Hi Shima,</p>
<p>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.</p>
<p>I'll try putting your code elsewhere to see if it can work better to get around this.</p>
<p>Thanks!</p>
<p>Steven</p>
<p> </p>
<p>On Sun, 29 Mar 2009 22:28:50 -0300, Marcelo Boveto Shima <marceloshima@gmail.com> wrote:</p>
<blockquote style="border-left: 2px solid #1010ff; padding-left: 5px; margin-left: 5px; width: 100%;">Probably you will want to hack on "node_start_applications()" function at the <br />"Startup the application" session.<br /><br />Something like:<br />       if [ "$user" == "guest" ]<br />       then<br />                NODE_APPLICATION="firefox"<br />        fi<br /><br />just before the app invocation line:<br />DISPLAY=:$display $NODE_APPLICATION >>"$USER_FAKE_HOME/.nx/C-$sess_id/session" 2>&1 &<br /><br />Changing NODE_APPLICATION just before it will be called ensures you that the session will<br /> not be called with something like Xsession.<br /><br />Regards.<br />Shima<br /><br />
<div class="gmail_quote">On Thu, Mar 26, 2009 at 8:17 AM, Steven Maddox <span><<a href="mailto:s.maddox@cyorxamp.info">s.maddox@cyorxamp.info</a>></span> wrote:<br />
<blockquote class="gmail_quote" style="border-left: 1px solid #cccccc; margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hey, here is an extract out of file 'nxnode'...<br /> <br /> node_find_application()<br /> {<br />        NODE_STARTX=""<br />        case $1 in<br />                shadow|windows|vnc)<br />                        :<br />                ;;<br />                unix-kde)<br />                        NODE_STARTX=$COMMAND_START_KDE<br />                ;;<br />                unix-gnome)<br />                        NODE_STARTX=$COMMAND_START_GNOME<br />                ;;<br />                unix-cde)<br />                        NODE_STARTX=$COMMAND_START_CDE<br />                ;;<br />                unix-application|windows-helper|vnc-helper)<br />                        [ "$application" = "xterm" ] && application=$COMMAND_XTERM<br />                        NODE_STARTX=$application<br />                ;;<br />                unix-console)<br />                        NODE_STARTX=$COMMAND_XTERM<br />                ;;<br />                unix-default|*)<br />                        if [ -x "$HOME/$USER_X_STARTUP_SCRIPT" ]; then<br />                                NODE_STARTX="$HOME/$USER_X_STARTUP_SCRIPT"<br />                        elif which "$DEFAULT_X_SESSION" >/dev/null 2>&1 ; then<br />                                NODE_STARTX="$DEFAULT_X_SESSION"<br />                        else<br />                                NODE_STARTX=$COMMAND_XTERM<br />                        fi<br />                ;;<br />        esac<br /> <br /> #       if [ "$HOME" != "guest" ] then<br /> #               echo "$NODE_STARTX"<br /> #       else<br />                echo "firefox"<br /> #       fi<br /> }<br /> <br /> At the end you can see I've added some lines so it ignores whatever was picked<br /> and instead overrides it with my application... firefox.<br /> <br /> Basically you log in to my box with user/pass guest:guest.<br /> And you get a locked down... intranet only... remote firefox window.<br /> <br /> Only thing is I'd like to use this box for normal NX sessions too and this<br /> prevents that.<br /> My commented out attempt at checking if the user is 'guest' and -then- go force<br /> firefox isn't working for some reason and I'm not the greatest bash coder in<br /> the world.<br /> <br /> Any tips on if this is a secure way of doing what I want and/or how to make<br /> it work?<br /> <br /> Steve<br /> <br /> ________________________________________________________________<br />     Were you helped on this list with your FreeNX problem?<br />    Then please write up the solution in the FreeNX Wiki/FAQ:<br /> <br /> <a href="http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ" target="_blank">http://openfacts2.berlios.de/wikien/index.php/BerliosProject:FreeNX_-_FAQ</a><br /> <br />         Don't forget to check the NX Knowledge Base:<br />                 <a href="http://www.nomachine.com/kb/" target="_blank">http://www.nomachine.com/kb/</a><br /> <br /> ________________________________________________________________<br />       FreeNX-kNX mailing list --- <a href="mailto:FreeNX-kNX@kde.org">FreeNX-kNX@kde.org</a><br />      <a href="https://mail.kde.org/mailman/listinfo/freenx-knx" target="_blank">https://mail.kde.org/mailman/listinfo/freenx-knx</a><br /> ________________________________________________________________<br /></blockquote>
</div>
<br /></blockquote>
<p> </p>