Posted by: Anonymous
on August 23, 2008 04:29 AM
Probably the best way to launch a graphical app would be something like:
/home/linuxlala IN_CLOSE_WRITE su linuxlala -c "/home/linuxlala/bin/script $@ $#"
Where /home/linuxlala/bin/script does some sanity checks such as making sure the user linuxlala is actually using the GUI and then setting $DISPLAY appropriately and launching the desired app. Note that I passed $@ and $# as parameters for use by the script. Also, the script is being run by user linuxlala so I am not opening a security hole.
If you just need something quick-n-dirty, set $DISPLAY and su to the appropriate user and call the app.