1 |
On Monday 02 May 2011 11:26:27 you wrote: |
2 |
> on 05/02/2011 01:05 PM Mick wrote the following: |
3 |
> > Another thing I found, is some incongruity about the file in which the |
4 |
> > $EDITOR and $PAGER should be defined. |
5 |
> > |
6 |
> > The migration guide says: |
7 |
> > |
8 |
> > "The EDITOR variable is no longer found in /etc/rc.conf. Both EDITOR and |
9 |
> > PAGER are set by default in /etc/profile. You should change this as |
10 |
> > needed in your ~/.bashrc (or equivalent) file or create |
11 |
> > */etc/env.d/99editor* and set the system default there." |
12 |
> > |
13 |
> > On the other hand the /etc/profile file seems to recommend |
14 |
> > /etc/profile.d/ |
15 |
> > |
16 |
> > "# You should override these in your ~/.bashrc (or equivalent) for |
17 |
> > per-user # settings. For system defaults, you can add a new file in |
18 |
> > /etc/profile.d/. export EDITOR=${EDITOR:-/bin/nano} |
19 |
> > export PAGER=${PAGER:-/usr/bin/less}" |
20 |
> > |
21 |
> > Which one is the authoritative place to define a system wide editor? |
22 |
> |
23 |
> All above are consistent. The system default is set in a file like |
24 |
> /etc/env.d/99editor |
25 |
> I use eselect (app-admin/eselect) to set the system defaults. |
26 |
> eg I have: |
27 |
> # cat /etc/env.d/99editor |
28 |
> # Configuration file for eselect |
29 |
> # This file has been automatically generated. |
30 |
> EDITOR="/usr/bin/vi" |
31 |
> VISUAL="/usr/bin/vi" |
32 |
> |
33 |
> But on a per user basis, a user should define those environment |
34 |
> variables in his ~/.bashrc or ~/.bash_profile (or equivalent) shell |
35 |
> initialization files. |
36 |
|
37 |
Thanks. Not sure if there is a difference between an env.d variable and a |
38 |
profile.d variable. I've added mine to /etc/profile.d for now. I'll see what |
39 |
gives when I reboot. |
40 |
-- |
41 |
Regards, |
42 |
Mick |