changing editor in m-c

Suvayu Ali fatkasuvayu+linux at gmail.com
Thu May 15 15:36:06 UTC 2014


On Thu, May 15, 2014 at 04:54:35PM +0200, Michael Schwendt wrote:
> On Thu, 15 May 2014 09:26:12 -0400, Frank McCormick wrote:
> 
> >    It used to work when the desktop file ran a script consisting of 
> > (xterm -e mc) but stopped working when it ran xterm -e mc. Another
> > user suggested exporting EDITOR in ~/.profile, which works. Of course 
> > EDITOR is now exported in ~/.bash_profile, ~/.bashrc and ~/.profile. So
> > I guess ~/.profile is the place it belongs in this case.
> 
> From man bash:
> 
>        When  bash is invoked as an interactive login shell, or as a non-inter‐
>        active shell with the --login option, it first reads and executes  com‐
>        mands  from  the file /etc/profile, if that file exists.  After reading
>        that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
>        in  that order, and reads and executes commands from the first one that
>        exists and is readable.  The --noprofile option may be  used  when  the
>        shell is started to inhibit this behavior.

The key is to realise it inherits the environment from the parent login
shell (bash --login).

-- 
Suvayu

Open source is the future. It sets us free.


More information about the users mailing list