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

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

Re: Customising .init.el for root user


From: Johnny
Subject: Re: Customising .init.el for root user
Date: Sat, 22 Jun 2013 15:03:59 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1 (gnu/linux)

Harry Putnam <reader@newsguy.com> writes:

> Johnny <yggdrasil@gmx.co.uk> writes:
>
>> I want emacs to start with some specific parameters
>>
>> I found one way is to default to a root init file by defining an alias
>> in the root .bashrc as
>> ,----
>> | alias emacs="emacs -u root"
>> `----
>> however it would be nice to have only one init file to keep track of as
>> many tweaks are nice to have in all sessions.

>
> The old hands here will probably have much better ways, but I've found
> its just easier to put the code for the desired changes in a small
> *.el file in your path like for-root.el containing code to effect the
> changes you want for the root session.
>
> You do have to remember to load it manually unless you want the
> slicker ways.  But I've found over time its just easier to keep up
> with the way I described above.
>
> Then when you start emacs as root just load that file with
> M-x load-library <RET> for-root <RET>
>
> Or perhaps create an aliase  for emacs that loads the file like:
> alias emrt="emacs -l /path/to/for-root.el"
>
> And start emacs with `emrt' when running as root.
>

Thanks Harry, this is indeed an option for some specific (most?) use
cases. I find myself switching to root quite frequently, and multiple
init files would require me to update them all with the tweaks I
want. Which I am too lazy (or forgetful) to do...

-- 
Johnny



reply via email to

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