help-gnu-emacs
[Top][All Lists]
Advanced

[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 Nordin
Subject: Re: How to make emacs stop trying to load /home/sb/.emacs after su to root?
Date: Tue, 09 Jul 2019 21:00:11 +0200

Perry Smith <pedz@easesoftware.com> writes:

>> On Jul 8, 2019, at 5:16 PM, Steinar Bang <sb@dod.no> wrote:
>> 
>> debian 10.0 "buster", amd64
>> emacs 26.1

Same here but emacs 27.

>> 
>> I do /bin/su to change the user to root. HOME is set to /root
>> 
>> However emacs still tries to load /home/sb/.emacs

I had the same happen here.

>> 
>> 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

Best regards
--
Tomas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]