[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacsclient and sudo
From: |
2QdxY4RzWzUUiLuE |
Subject: |
Re: emacsclient and sudo |
Date: |
Wed, 24 Feb 2021 12:01:21 -0600 |
On 2021-02-24 at 18:48:54 +0100,
Regarding "emacsclient and sudo,"
Luca Ferrari <fluca1978@gmail.com> wrote:
> Hi all,
> when I start my emacsclient I can see all the colors I've setup for
> fonts and faces. However, when I start it thru sudo (e..g, to quickly
> edit a file with privileges instead of using tramp) all my settings
> seem to be gone.
> So far, I'm starting it normally (without sudo) and use tramp to edit
> a file with sudo, but sometimes my fingers are faster than my brain
> and I type "sudo emacs ...".
> I suspect sudo is doing something to prevent emacs to start with my
> settings, even if my home environment is kept.
>
> Anyone else dealing with this?
No, but that's because I don't use sudo with emacsclient. ;-)
Sudo has a whole bunch of configuration (command line arguments,
environment variables, policies) regarding the HOME environment variable
and the effiective user id, and I'd bet that one of those is actually
being set to root's and then emacs doesn't find your settings. Check
sudo's the man page and your local sudo policies.
In the long run, please retrain your fingers. Unnecessarily running
programs as root is an accident waiting to happen.