[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs creates emacs.d/ as root when using sudo
From: |
Lars Ingebrigtsen |
Subject: |
Re: Emacs creates emacs.d/ as root when using sudo |
Date: |
Tue, 02 Jul 2019 17:27:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Andreas Schwab <address@hidden> writes:
>>> $ sudo emacs /etc/default/motd-news
>>
>> I'd consider the above as a pilot error.
>>
>> If you use sudo naively like above, the $HOME is still that of the
>> invoking user,
>
> It's really a misconfiguration of sudo if it doesn't reset HOME.
But, by default, sudo doesn't (on Ubuntuish systems).
Emacs is somewhat unusual among editors you might fire up as root in
that it might create or write files and directories in $HOME without the
user knowing, and that leads to frustration and makes "# emacs -nw" less
comfortable than it could be.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Re: Emacs creates emacs.d/ as root when using sudo, Teemu Likonen, 2019/07/02