Skip to content

Comment on Show HN: A fix for the .bash_profile .bashrc .profile madness

Comments

The other thing not being mentioned is that sometimes logging into GNOME will source .profile or .bash_profile (I forget which). This can be used to make sure that environment variables are set at the top-level (to be inherited by all sub-processes of the GNOME environment). Mostly this is useful for things like $PATH (which programs like gmrun make use of).

Yes, this is standard and useful behaviour. When I started using OS X, it really confused me that 1) it didn't source .profile on login 2) it sourced .profile (instead of .bashrc) whenever I opened a new terminal.

Yeah, many terminal emulators (like Terminal.app) are configured to run login shells.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.