- Which setup files (.bashrc, .profile, ...) should be used to have the same PATH variable no matter how I start the software with bash?
Traditionally, the place to define per-user environment variables on unix systems is
Bash is a Bourne-compatible shell. When it is invoked as a login shell reads
As a rule of thumb, if you type your password in text mode (e.g., on a text console, or remotely with ssh), then the shell you get is a login shell.
However, if you type your password in a graphical program and get logged into a graphical environment, this bypasses the normal login shell. Whether
To give an example of the variability, as far as I can tell from a quick glance at the scripts involved, on Ubuntu 10.04: if you log in with kdm or lxdm,
All the systems I know provide some way of setting per-user environment variables. Unfortunately there is no general answer.
Note that sometimes you'll see recommendations to either set environment variables in
Setting your PATH in your ~/.profile should just work. That file is read upon login by every POSIX-compliant or Bourne-like shell I know of including bash. If you make changes to that file, you will have to log out and log back in for the changes to take effect. Since PATH is part of your login process's environment, it should be exported to every shell you start subsequently.
The definitive answer is in the bash man page section on Bash Startup Files. "When an interactive shell that is not a login shell is started, Bash reads and executes commands from ~/.bashrc, if that file exists. "
Answers your other questions point out that eshell doesn't actually run
I see two options:
You might also be interested in the discussion on adding a directory to a path without duplicates.