* .emacs file in root?
@ 2008-04-18 11:11 saneman
2008-04-18 11:59 ` Thierry Volpiatto
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: saneman @ 2008-04-18 11:11 UTC (permalink / raw)
To: help-gnu-emacs
When I open a root file with emacs it does not use my settings specified
in my ~/.emacs.
How do I make emacs use the config file ~/.emacs also when used in root
mode?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs file in root?
2008-04-18 11:11 .emacs file in root? saneman
@ 2008-04-18 11:59 ` Thierry Volpiatto
[not found] ` <mailman.10534.1208519948.18990.help-gnu-emacs@gnu.org>
` (2 subsequent siblings)
3 siblings, 0 replies; 9+ messages in thread
From: Thierry Volpiatto @ 2008-04-18 11:59 UTC (permalink / raw)
To: saneman; +Cc: help-gnu-emacs
saneman <ddd@sdf.com> writes:
> When I open a root file with emacs it does not use my settings
> specified in my ~/.emacs.
root is just like another user on your system and thats normal it don't
use your settings!
> How do I make emacs use the config file ~/.emacs also when used in
> root mode?
you can use another .emacs special for root.
It's may be not a good idea to try to use the same config you use as
simple user for root.(gnus, w3m ...etc...)
--
A + Thierry
Pub key: http://pgp.mit.edu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs file in root?
[not found] ` <mailman.10534.1208519948.18990.help-gnu-emacs@gnu.org>
@ 2008-04-18 12:04 ` saneman
2008-04-18 12:40 ` Adam Funk
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: saneman @ 2008-04-18 12:04 UTC (permalink / raw)
To: help-gnu-emacs
> you can use another .emacs special for root.
How?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs file in root?
2008-04-18 11:11 .emacs file in root? saneman
2008-04-18 11:59 ` Thierry Volpiatto
[not found] ` <mailman.10534.1208519948.18990.help-gnu-emacs@gnu.org>
@ 2008-04-18 12:29 ` Jonathan Groll
2008-04-18 13:59 ` Rebecca Breu
3 siblings, 0 replies; 9+ messages in thread
From: Jonathan Groll @ 2008-04-18 12:29 UTC (permalink / raw)
To: saneman; +Cc: help-gnu-emacs
On Fri, Apr 18, 2008 at 01:11:31PM +0200, saneman wrote:
> When I open a root file with emacs it does not use my settings specified
> in my ~/.emacs.
If you use "sudo emacs" you should get what you want.
Cheers,
Jonathan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs file in root?
2008-04-18 12:04 ` saneman
@ 2008-04-18 12:40 ` Adam Funk
2008-04-18 12:47 ` Thierry Volpiatto
2008-04-19 3:59 ` Tim X
2 siblings, 0 replies; 9+ messages in thread
From: Adam Funk @ 2008-04-18 12:40 UTC (permalink / raw)
To: help-gnu-emacs
On 2008-04-18, saneman wrote:
>> you can use another .emacs special for root.
>
> How?
Assuming root's home directory is "/root", put the customizations that
you need as root in "/root/.emacs".
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs file in root?
2008-04-18 12:04 ` saneman
2008-04-18 12:40 ` Adam Funk
@ 2008-04-18 12:47 ` Thierry Volpiatto
2008-04-18 13:46 ` Joel J. Adamson
2008-04-19 3:59 ` Tim X
2 siblings, 1 reply; 9+ messages in thread
From: Thierry Volpiatto @ 2008-04-18 12:47 UTC (permalink / raw)
To: saneman; +Cc: help-gnu-emacs
saneman <ddd@sdf.com> writes:
>> you can use another .emacs special for root.
>
> How?
Just put it in /root.
--
A + Thierry
Pub key: http://pgp.mit.edu
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs file in root?
2008-04-18 12:47 ` Thierry Volpiatto
@ 2008-04-18 13:46 ` Joel J. Adamson
0 siblings, 0 replies; 9+ messages in thread
From: Joel J. Adamson @ 2008-04-18 13:46 UTC (permalink / raw)
To: saneman, help-gnu-emacs
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> saneman <ddd@sdf.com> writes:
>
>>> you can use another .emacs special for root.
>>
>> How?
>
> Just put it in /root.
Or use tramp: "C-xC-f /su::<filename> RET password RET"
Don't login as root.
Joel
--
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA 02114
(617) 643-1432
(303) 880-3109
Public key: http://pgp.mit.edu
The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs file in root?
2008-04-18 11:11 .emacs file in root? saneman
` (2 preceding siblings ...)
2008-04-18 12:29 ` Jonathan Groll
@ 2008-04-18 13:59 ` Rebecca Breu
3 siblings, 0 replies; 9+ messages in thread
From: Rebecca Breu @ 2008-04-18 13:59 UTC (permalink / raw)
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 190 bytes --]
saneman <ddd@sdf.com> wrote:
> How do I make emacs use the config file ~/.emacs also when used in root
> mode?
emacs -u <username>
starts emacs with the .emacs of another user.
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: .emacs file in root?
2008-04-18 12:04 ` saneman
2008-04-18 12:40 ` Adam Funk
2008-04-18 12:47 ` Thierry Volpiatto
@ 2008-04-19 3:59 ` Tim X
2 siblings, 0 replies; 9+ messages in thread
From: Tim X @ 2008-04-19 3:59 UTC (permalink / raw)
To: help-gnu-emacs
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
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-04-19 3:59 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-18 11:11 .emacs file in root? saneman
2008-04-18 11:59 ` Thierry Volpiatto
[not found] ` <mailman.10534.1208519948.18990.help-gnu-emacs@gnu.org>
2008-04-18 12:04 ` saneman
2008-04-18 12:40 ` Adam Funk
2008-04-18 12:47 ` Thierry Volpiatto
2008-04-18 13:46 ` Joel J. Adamson
2008-04-19 3:59 ` Tim X
2008-04-18 12:29 ` Jonathan Groll
2008-04-18 13:59 ` Rebecca Breu
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).