From: Petr K. <ke...@ce...> - 2002-07-18 07:24:31
|
Bill Paxton wrote: >Hi. What did you work out re: this? > >If login shell is bash, stick the irexec launch into >/etc/profile. This allows each user to use their own >.lircrc file and of course can run under the context >of that user. (and you don't have to pass $HOME on the >irexec command line) And you only have to enter it in >one place. It's dumb, so do something like: > >--- >ps_output=$(/bin/ps -C irexec) >if [ -z $ ps_output ] >then ># not running, launch it >/usr/local/bin/irexec -d >else ># already running, show who and pid >/bin/ps -C irexec -o pid,user,command >fi >--- > > Hi, it doesn't work with ps because ps returns always non-empty string. But I think write sth. like that in /etc/profiles is the only way how to solve the problem. I think it is impossible to start one instance of irexec for every user but every user must have his own irexec running. So in /etc/profiles should be something like this: is irexec running in context of current user? ---- yes ... do nothing ---- no ... start it I don't exactly know how to do it at this moment. I'll work on it. Regards Petr >You could also be more elaborate here; if you are god >you could use pidof and then kill the running one(s) >to run yours, and you could check on logout if it's >nohup'd and terminate forcefully, etc. > >While something like: su -c "/usr/local/bin/irexec -d >/home/lircapps/global.lircrc" lircapps > >in rc.local would run it as user lircapps without >prompting for a password... it has limited usefulness >if the datafiles each prog opens are owned by >different users. > >I'm sure there are other ways that will work. Please >let me know what you end up trying and what works best >for you. (same problem) > >--- >--- ke...@ce... wrote: > > >>It works, but only root can start programs using >>this irexec. I'd like all users to be able to start >>programs using this irexec. >>Every user can start irexec from terminal and it >>works good but they can't use irexec started from >>rc.local. >> >>Does anybody know the solution? >> >> > > > -- Ing. Petr Kopecky E-mail: ke...@ce... |