On 2016-03-22 at 14:20, Russell Gadd wrote: > On 22/03/16 02:40, David Christensen wrote:
>> Did you remember the 'export' in .profile? >> >> export PATH=$PATH:$HOME/bin >> >> >> It might help to add echo's in the various scripts to check the >> order in which they run -- e.g. verify that .bash_profile runs >> before your bash login script, so that PATH includes $HOME/bin. > > Thanks for the export point which I have now used. However it > doesn't solve the problem. > > I experimented by adding the following line into ~/.bash_profile, > ~/.profile and ~/.bashrc: > echo "This is <scriptname>" &>>/tmp/out.txt > > Neither of the profile files triggered the output, nor did .bashrc > until I manually opened a Mate terminal from the desktop. So it > appears that the profile files do not get invoked at any time. How did you test? By launching a new terminal (with bash set as your default shell), by running the command 'bash' in an existing terminal, by logging all of the way out (to the main login prompt, if not to a full reboot) and then logging back in, or by running the command 'bash --login' in an existing terminal? In my testing just now, only the latter two of these four will pick up the new ~/.profile file; the other two seem to run the commands which were present in the file which their parent bash session used. (Strictly speaking I didn't test the full logout or reboot, but I fully expect that that would pick up the changes.) Also, at least on my system, ~/.bashrc is invoked only by being sourced from ~/.profile or ~/.bash_profile. Unless your system is configured fairly differently, if ~/.bashrc is getting run, that means that - per bash(1) - one of ~/.bash_profile, ~/.bash_login, or ~/.profile must be invoking it. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature