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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .emacs file in root?


From: Tim X
Subject: Re: .emacs file in root?
Date: Sat, 19 Apr 2008 13:59:01 +1000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

saneman <ddd@sdf.com> writes:

>> you can use another .emacs special for root.
>
> How?
>

The answer depends on how your are editing files as root. If your using
something like tramp to do this, I'm not sure you can.

Emacs does have a command line option that tells it to use a different
users init file. Of course, you must have read permission as the user
you are logged in as to read this other users .emacs file. 

If you are switching to a root login using su, then you just need to do
su -, which will setup the subshell as a proper root subshell and
therefore will automatically source root's .emacs file rather than using
your own .emacs file. 

A better solution might be to tell us what it is you are trying to do
and why sourcing root's emacs init file is required. It is likely
someone can come up with a better and more secure solution to the
problem once we know what it is.

Tim



-- 
tcross (at) rapttech dot com dot au


reply via email to

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