Re: Perl Prog as Root
Michael van Nieuwenhuize <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <6.1.2.0.2.20041216112146.044fb960@qcmail1> |
Tom, You can also use xauth. Be careful with xhost as you can open you machine up to outsiders if you don't know what you are doing. I had a similar problem many moons ago when I was trying to bring up a tk app as root. Don't remember full solution but I used xauth. I basically googled for xlib warning generated by firing up tk app. This gave me many things to try. So you might want to do the same. Regards, Mike At 10:45 AM 12/16/2004, Bob McClure Jr wrote: >On Thu, Dec 16, 2004 at 09:33:53AM -0600, Browder, Tom wrote: > > I have written a small script that works when run as as a normal user on > > Linux system. > > > > It starts up and is put into the background during the login process and > > is killed when the user logs out. It monitors mounting external devices > > and pops a modal window as a mount/unmount event happens. I requires > > the user to dismiss the window with a push button after it appears. The > > program works fine this way. I execute it for a user by putting this > > line as the last line in the /etc/csh.cshrc file: > > > > /etc/mybackgroundscript.pl & > > > > I would like to run the process as a single one root by putting the > > following as the last line in the /etc/rc.d/rc.local file: > > > > /etc/mybackgroundscript.pl & > > > > I doesn't work apparently because the prog cannot get access to the X > > server when it needs to pop up a window with another user logged in. > > > > Does anyone have an idea? Is the root/background/window method > > workable? > > > > Thanks. > > > > Tom Browder > >I think the user needs to run "xhost localhost" to give root >permission to access his X server. > >Cheers, >-- >Bob McClure, Jr. Bobcat Open Systems, Inc. >[email protected] http://www.bobcatos.com >Grace happens. >-++**==--++**==--++**==--++**==--++**==--++**==--++**== >This message was posted through the Stanford campus mailing list >server. If you wish to unsubscribe from this mailing list, send the >message body of "unsubscribe ptk" to [email protected] -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to [email protected]