[COLUG] Best place for modifying path
Rob Funk
rfunk at funknet.net
Wed Apr 18 15:23:05 EDT 2007
Tom Hanlon wrote:
> What is the place and where are the overview docs on that ?
For docs, the standard answers are "man bash" and "pinfo bash".
(pinfo is a friendly info browser, but there are others, including info,
emacs, and konqueror.)
> /etc/profile seems like the most likely candidate .
>
> Will /etc/profile be read when a new console is initiated in an
> already open xwindow ?
The bash man page on my Ubuntu machine says:
| 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....
| When an interactive shell that is not a login shell is started, bash
| reads and executes commands from /etc/bash.bashrc and ~/.bashrc, if
| these files exist.
So /etc/bash.bashrc is better than /etc/profile, since /etc/profile only
gets invoked on login shells.
Of course, this assumes everyone uses bash as their shell. If not, it's
probably best to move back a level to the login sequence, and set it
there. Trouble there is that there are multiple ways of logging in and
getting a shell (login program, various X display managers, remote shell
such as ssh, other PAM-using system). /etc/login.defs
and /etc/security/pam_env.conf are two places to look.
--
==============================| "A microscope locked in on one point
Rob Funk <rfunk at funknet.net> |Never sees what kind of room that it's in"
http://www.funknet.net/rfunk | -- Chris Mars, "Stuck in Rewind"
More information about the colug432
mailing list