cannot customize terminal PATH anywhere
cl at isbd.net
Wed Aug 22 22:46:38 CEST 2018
On Wed, Aug 22, 2018 at 03:08:18PM -0400, Igor Zakharov wrote:
> > Running XFCE 4.12 on Ubuntu 16.04 in vncserver. The PATH variable in any
> > terminal is very short:
> > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
> > I've tried overriding it everywhere:
> > - the various *profile files in /etc, home and so on
> > - /etc/environment
> > - various *xinit* files in home and /etc
> > Nothing seems to work. XFCE seems super-strict in overriding that
> > variable. I can get it to work just fine in a text-mode ssh session to
> > that system, but in a terminal running within XFCE the PATH variable is
> > overriden every time.
> > I'm mystified as to why this is, and how can I fix it.
> Have you tried ~/.bashrc? I believe this is what Ubuntu normally uses for that purpose.
The 'right' place to add things to the PATH variable is generally
.profile, but for bash this may be overridden by .bash_profile and
If you add to the path in .bashrc then the addition may get added more
than once, not a serious problem but is a bit 'messy'.
So, if either .bash_profile or .bash_login exists then .profile will
be ignored by bash at login. Remember also that .profile (or the
others) are only sourced at login, whereas .bashrc is sourced every
time bash is started.
More information about the Xfce