[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to make emacs stop trying to load /home/sb/.emacs after su to ro
From: |
tomas |
Subject: |
Re: How to make emacs stop trying to load /home/sb/.emacs after su to root? |
Date: |
Tue, 9 Jul 2019 22:20:47 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Jul 09, 2019 at 10:04:20PM +0200, Tomas Nordin wrote:
> tomas@tuxteam.de writes:
>
> > On Tue, Jul 09, 2019 at 09:00:11PM +0200, Tomas Nordin wrote:
> >> Perry Smith <pedz@easesoftware.com> writes:
> >
> > [...]
> >
> >> >> How can I make emacs stop loading the original user's .emacs when
> >> >> logged in as root?
> >> >
> >> > Can you do “id” after you do the su? Usually “su - root” is the
> >> > suggested method.
> >> > The ‘-‘ causes the users environment to get loaded or something. Never
> >> > looked
> >> > too deep into it.
> >>
> >> After su;
> >>
> >> # id
> >> uid=0(root) gid=0(root) groups=0(root)
> >>
> >> After su - root;
> >>
> >> # id
> >> uid=0(root) gid=0(root) groups=0(root)
> >>
> >> but after this latter way of getting root emacs did not try to load
> >> /home/tomas/.emacs
> >>
> >> Just metooing
> >
> > Have you checked the environment? What does $HOME say? (although the
> > "su -" part lets one expect that the HOME var is set anew: checking
> > won't hurt :-)
>
> echo $HOME gave /root after both su methods
Hm. Was somewhat to be expected. Still... bizarre. You could try to
compare the result of "set" (displays the whole environment) after
both "su" variants: perhaps you find an environment variable which
could explain this behaviour. As a guide you can look up the env
variables relevant to Emacs in the manual; online here [1] [2].
But we don't know (yet) whether an env variable is the culprit
(although it seems compelling...)
Cheers
[1]
https://www.gnu.org/software/emacs/manual/html_node/emacs/General-Variables.html#General-Variables
[2]
https://www.gnu.org/software/emacs/manual/html_node/emacs/Misc-Variables.html#Misc-Variables
-- t
signature.asc
Description: Digital signature
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, (continued)
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Steinar Bang, 2019/07/12
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Stefan Monnier, 2019/07/12
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Steinar Bang, 2019/07/12
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Steinar Bang, 2019/07/13
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Perry Smith, 2019/07/13
- Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Steinar Bang, 2019/07/13
Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?, Perry Smith, 2019/07/08