unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: 2QdxY4RzWzUUiLuE@potatochowder.com
To: help-gnu-emacs@gnu.org
Subject: Re: emacsclient and sudo
Date: Wed, 24 Feb 2021 12:01:21 -0600	[thread overview]
Message-ID: <YDaUcVgtd3K1m49P@scrozzle> (raw)
In-Reply-To: <CAKoxK+7MVmqgmGGRSh1g=GFggY66SGvw+uZ0Xr5kXTzG6XY-6A@mail.gmail.com>

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.



  reply	other threads:[~2021-02-24 18:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 17:48 emacsclient and sudo Luca Ferrari
2021-02-24 18:01 ` 2QdxY4RzWzUUiLuE [this message]
2021-03-08 15:32 ` Luca Ferrari
2021-03-09  6:04   ` Jean Louis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YDaUcVgtd3K1m49P@scrozzle \
    --to=2qdxy4rzwzuuilue@potatochowder.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).