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

Re: Strange Problem with 'alias'



On Tue, Nov 08, 2016 at 02:16:21PM -0500, S. P. Molnar wrote:
> >When I boot the system none of the definitions of alias in .bashrc are 
> >active.  That is until I open a terminal and input source .bashrc.

> An addendum to the above.  It would appear to be xfce5-terminal at 
> fault.  If I use UXTerm or XTermthe alias definitions are active.

It sounds like xfce5-terminal is running a login shell, and your
~/.bash_profile (or whichever file your login shell is reading) is
not configured to source ~/.bashrc as it should be.

1) Confirm that xfce5-terminal is running a login shell by typing
   this command in an xfce5-terminal window:  ps -fp $$

   If it's a login shell, you should see "-bash" as the CMD.
   If it's a regular shell, you should see "bash" as the CMD.

2) Figure out which dot file your login shell is reading.  It could be
   ~/.bash_profile or ~/.bash_login or ~/.profile; bash will look for
   the files in that order and use the first one it finds.

3) Edit the login shell profile to source ~/.bashrc if it exists.  Make
   sure the profile contains code similar to this:

   if [ -r ~/.bashrc ]; then
     . ~/.bashrc
   fi

   There are some variants that will also work.

As an alternative, you could also configure xfce5-terminal to stop running
a login shell, but you still want to fix your login shell profile anyway,
because it'll be used when you run a login shell for any other reason
(e.g. ssh, or console login).


Reply to: