[Tutor] Re: trouble with pygtk and different users

Lee Harr missive at hotmail.com
Sun Dec 21 08:24:16 EST 2003


> > On my system (FreeBSD) there is a USER env variable,
> > but no USERNAME
> > Make sure you do su - and not just su
> > Are you allowing other users to connect to your
> > x-server (xhost +)
> > Be very careful any time you run things as root
> > (especially running
> >   things automatically from a script)
>
>su and not just su?

Sorry, there was no punctuation on that line...

su -
and not
su

(From the su man page ...

     -l      Simulate a full login.  The environment is discarded except for
             HOME, SHELL, PATH, TERM, and USER.  HOME and SHELL are modified
             as above.  USER is set to the target login.

     -       (no letter) The same as -l.
)


>Since this program was created
>solely as a GUI (everything could be easily done from
>the command line), I use gksu (GNOME's GUI to su)
>instead, but when I tested it, su had the same
>problem. I found that the HOME environment variable
>did change with su/gksu, so I'll try to work something
>out with that, but there should be a better way.
>

It may be that (typical of linux/unix) the commandline version
of su has more features available than the gui version.

I also liked the suggestion to use
os.system('command &')
and see if that makes a difference...

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




More information about the Tutor mailing list