[FreeNX-kNX] Running a particular application in freenx server

chris at ccburton.com chris at ccburton.com
Wed Oct 28 13:37:02 UTC 2009


Peter McGregor <freenx at pdadevelopments.co.nz> wrote on 28/10/2009 
07:01:13:

> Hello
> 
> I would like to force a user to run an application in freenx.  I have 
> set this up in the client ok, but I would like to enforce it in the 
server



Do you mean like a "rootless" application set on the client in :-

        Configure,General,Desktop,Custom  ????

Ah yes, firefox rootless . . . 

To run nxacl you just : -

                cp /usr/bin/nxacl.sample /usr/bin/nxacl

and make sure it is executable by normal users !!

                 -rwxr-xr-x 1 root root 1437 2009-10-28 12:32 
/usr/bin/nxacl

If it exists as an excutable, then nxserver runs it.

Then you need to customize it so that the relevent $USER can only run 
whatever.

Try

                if [ "$USER" = "doris-on-windows" ]
                then
                changeparam type unix-application
          changeparam rootless 1
                changeparam virtualdesktop 0
          changeparam application /usr/bin/ooffice
                fi

allow_all



You may well need to patch changeparam if you want to change a 
type=unix-kde to type=unix-application rootless=1 
application=/where/ever/whatever.


changeparam()
{
        if [ "$(echo "$CMDLINE" | tr "&" "\n" | egrep -c "^$1=" )" -lt 1 ] 
 
        then
                CMDLINE="$CMDLINE""&$1=$2" # Not all parameters are given 
all the time !!
        else
                CMDLINE=$(echo "$CMDLINE" | tr "&" "\n" | sed 
"s&^$1=.*&$1=$2&g" | tr "\n" "&")
        fi
}


This is because you can't "changeparam" a "param" if "the param" is absent 
and the server is using defaults . . .
. . . and application= isn't normally there.


Be carefull, this has no param validator so you can add all&any garbage 
you (don't)want to . . .

and

you can end up with zombie sessions which aren't displaying anything if 
the app doesn't
get fired off.


Also it seems to take longer to terminate the session, which can get 
people who terminate
by mistake and try to re-connect immediately !!


> 
> I have been looking at modifying nxacl, but it does not seem to be 
> called from my nxserver.
> 
> I have copied the nxacl sample file to /etc/nxserver
> 
> I would appreciate if someone could tell me how to run nxacl, or 
> alternatively, how I could modify node.conf
> 
> thank you
> 
> Peter McGregor
> 

> ________________________________________________________________
>      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/20091028/5af03789/attachment.html>


More information about the FreeNX-kNX mailing list