What can cause my .profile file to not be loaded when a new terminal shell is initialized?

There are no errors in xsession and I don't have a .bash_login or .bash_profile file, so I'm 100% certain neither of those is loaded and thus cancels .profile loading.

When I rename the .profile to .bash_profile and open a new terminal window, it still doesn't load. Everything in the file works (aliases and PATH exports) when I load it manually via ". ~/.profile", but it won't load automatically.


Solution 1:

Looks like this was answered before. You have to be aware of the loading priorities of the files.

[EDIT]

You Have two options:

  1. (Not Recommended) Get your terminal to start as a login shell:
    • open a terminal
    • Go to Edit -> Profile Preferences -> Title and Command
    • activate the "Run Command as a login shell" checkbox This way your .profile is read. But it also messes up the default loading behavior so I would recommend:
  2. Edit or create ~/.bashrc!

Look here for a good explanation about the difference between .bashrc and .bash_profile