I sometimes use su under the fvwm window manager to switch to a different
user who then wants to run mozilla. On an old setup (SuSE 6.3) this worked
fine after I relaxed an X authorization resource. I'm trying to install a
new setup which is Debian based (Mepis 2004.04, 2.6.7 kernel) and I found
that when I su and then run mozilla or firefox it uses the configuration
files from the home directory of the user who logged in, not the UID I
switched to.
I can do 'su - someuser' and then I get the customizations associated
with someuser, but all the window system information such
as my WINDOWID variable and DISPLAY are gone. The user environment
is like someuser logged onto the console rather than under the windowing
system. What has changed? Is su doing something different than it used
to? Is it possible to restore the old behavior? Or is su the same and
the applications are doing something different?
|
|
0
|
|
|
|
Reply
|
adrian6445 (15)
|
12/2/2004 5:54:46 PM |
|
On 2004-12-02, Adrian Mariano <adrian@cam.cornell.edu> wrote:
> I sometimes use su under the fvwm window manager to switch to a different
> user who then wants to run mozilla. On an old setup (SuSE 6.3) this worked
> fine after I relaxed an X authorization resource. I'm trying to install a
> new setup which is Debian based (Mepis 2004.04, 2.6.7 kernel) and I found
> that when I su and then run mozilla or firefox it uses the configuration
> files from the home directory of the user who logged in, not the UID I
> switched to.
>
> I can do 'su - someuser' and then I get the customizations associated
> with someuser, but all the window system information such
> as my WINDOWID variable and DISPLAY are gone. The user environment
> is like someuser logged onto the console rather than under the windowing
> system. What has changed? Is su doing something different than it used
> to? Is it possible to restore the old behavior? Or is su the same and
> the applications are doing something different?
According to my 'man su' (on Mandrake 10.0), any of '-',
'-l', or '--login' (without the quotation marks) makes the
shell a login shell. I have always understood that one of
the things a login shell implies is a cleansing of the
environment variables, including WINDOWID and DISPLAY.
Good luck.
Robert Riches
spamtrap42@verizon.net
(Yes, that is one of my email addresses.)
|
|
0
|
|
|
|
Reply
|
spamtrap42 (1175)
|
12/2/2004 9:03:27 PM
|
|
"Robert M. Riches Jr." <spamtrap42@verizon.net> wrote in message news:<slrncqv0ou.v81.rob@one.localnet>...
> On 2004-12-02, Adrian Mariano <adrian@cam.cornell.edu> wrote:
> > I sometimes use su under the fvwm window manager to switch to a different
> > user who then wants to run mozilla. On an old setup (SuSE 6.3) this worked
> > fine after I relaxed an X authorization resource. I'm trying to install a
> > new setup which is Debian based (Mepis 2004.04, 2.6.7 kernel) and I found
> > that when I su and then run mozilla or firefox it uses the configuration
> > files from the home directory of the user who logged in, not the UID I
> > switched to.
> >
> > I can do 'su - someuser' and then I get the customizations associated
> > with someuser, but all the window system information such
> > as my WINDOWID variable and DISPLAY are gone. The user environment
> > is like someuser logged onto the console rather than under the windowing
> > system. What has changed? Is su doing something different than it used
> > to? Is it possible to restore the old behavior? Or is su the same and
> > the applications are doing something different?
>
> According to my 'man su' (on Mandrake 10.0), any of '-',
> '-l', or '--login' (without the quotation marks) makes the
> shell a login shell. I have always understood that one of
> the things a login shell implies is a cleansing of the
> environment variables, including WINDOWID and DISPLAY.
Exactly. So short of some kludge in the .login files to
set the necessary variables, what can I do? And more
specifically, why do programs not use the initialization
information corresponding to the current uid? How do
they even know which user's init info to use? I checked
that emacs also runs the .emacs file of the original user,
not the current uid, so it doesn't appear to be a strange
quirk of mozilla/firefox.
|
|
0
|
|
|
|
Reply
|
adrian6445 (15)
|
12/3/2004 3:38:55 AM
|
|
In article <f960afad.0412021938.2cf557@posting.google.com>,
Adrian Mariano wrote:
>> According to my 'man su' (on Mandrake 10.0), any of '-',
>> '-l', or '--login' (without the quotation marks) makes the
>> shell a login shell. I have always understood that one of
>> the things a login shell implies is a cleansing of the
>> environment variables, including WINDOWID and DISPLAY.
>
> Exactly. So short of some kludge in the .login files to
> set the necessary variables, what can I do? And more
> specifically, why do programs not use the initialization
> information corresponding to the current uid? How do
> they even know which user's init info to use? I checked
> that emacs also runs the .emacs file of the original user,
> not the current uid, so it doesn't appear to be a strange
> quirk of mozilla/firefox.
Changing the user under X is a bit different from just logging in and
out in a plain textconsole, since the X-system was set up for the first
user and this user remains logged in while you 'su' to a different
account.
As far as the default behaviour is concerned, changing the user
with 'su' under X does not include a reading of the appropriate
initialization scripts (of the new user) under XFree86. You can achieve
that using 'su -l' instead, as already posted above. Still, as a matter
of fact, you have trouble starting an X-program because the variable
'DISPLAY' is not set. You have to type 'export DISPLAY=localhost:0' to
change that. If you do not want to do that each time you 'su' to a
different account, maybe you could figure out which scripts are really
read (for bash: .profile? .bash-profile? .bashrc?...) when you login
with 'su -l' and add the line to the appropriate script.
Greetings,
Natalie
|
|
0
|
|
|
|
Reply
|
natalie (1)
|
12/17/2004 8:49:20 AM
|
|
|
3 Replies
38 Views
(page loaded in 0.069 seconds)
Similiar Articles:7/24/2012 4:24:45 AM
|