Skip to main content
added 175 characters in body
Source Link
Lesmana
  • 27.6k
  • 20
  • 82
  • 86

.bash_profile is the startup configuration script of bash. There exists no standard mandating X to source .bash_profile.

What you are thinking of is rather .profile. Originally it was the startup configuration file of shthe bourne shell (sh). Today many distributions have their desktop environment set up to source .profile. Note that this is also not a standard, but it seems to be a convention.

Debian used to source .profile at graphical login (linkwiki page as of 2013 to wiki page as of 2013) now it doesn't (linkwiki page as of 2016 to wiki page as of 2016). 

Arch sources .xprofile at graphical login (linkwiki page as of 2013). 

Ubuntu used to discourage using .profile (linkwiki page as of 2013 to old version in the wiki) now it doesn't discourage anymore (wiki page as of 2016).

 

Regarding your other question: Why doesn't my ~/.bash_profile work? That is the expected behaviour.

The behaviour, in short, is as follows:

  • bash started as an interactive login shell: reads ~/.profile
  • bash started as an interactive non-login shell: reads ~/.bashrc

For more details see my answer to a similar question in askubuntu: https://askubuntu.com/questions/132276/configure-gnome-terminal-to-start-bash-as-a-login-shell-doesnt-read-bashrc/132319#132319

.bash_profile is the startup configuration script of bash. There exists no standard mandating X to source .bash_profile.

What you are thinking of is rather .profile. Originally it was the startup configuration file of sh. Today many distributions have their desktop environment set up to source .profile. Note that this is also not a standard, but it seems to be a convention.

Debian used to source .profile at graphical login (link to wiki page as of 2013) now it doesn't (link to wiki page as of 2016). Arch sources .xprofile at graphical login (link). Ubuntu used to discourage using .profile (link to old version in the wiki)

Regarding your other question: Why doesn't my ~/.bash_profile work? That is the expected behaviour.

The behaviour, in short, is as follows:

  • bash started as an interactive login shell: reads ~/.profile
  • bash started as an interactive non-login shell: reads ~/.bashrc

For more details see my answer to a similar question in askubuntu: https://askubuntu.com/questions/132276/configure-gnome-terminal-to-start-bash-as-a-login-shell-doesnt-read-bashrc/132319#132319

.bash_profile is the startup configuration script of bash. There exists no standard mandating X to source .bash_profile.

What you are thinking of is rather .profile. Originally it was the startup configuration file of the bourne shell (sh). Today many distributions have their desktop environment set up to source .profile. Note that this is also not a standard, but it seems to be a convention.

Debian used to source .profile at graphical login (wiki page as of 2013) now it doesn't (wiki page as of 2016). 

Arch sources .xprofile at graphical login (wiki page as of 2013). 

Ubuntu used to discourage using .profile (wiki page as of 2013) now it doesn't discourage anymore (wiki page as of 2016).

 

Regarding your other question: Why doesn't my ~/.bash_profile work? That is the expected behaviour.

The behaviour, in short, is as follows:

  • bash started as an interactive login shell: reads ~/.profile
  • bash started as an interactive non-login shell: reads ~/.bashrc

For more details see my answer to a similar question in askubuntu: https://askubuntu.com/questions/132276/configure-gnome-terminal-to-start-bash-as-a-login-shell-doesnt-read-bashrc/132319#132319

added 167 characters in body
Source Link
Lesmana
  • 27.6k
  • 20
  • 82
  • 86

.bash_profile is the startup configuration script of bash. There exists no standard mandating X to source .bash_profile.

What you are thinking of is rather .profile. Originally it was the startup configuration file of sh. Today many distributions have their desktop environment set up to source .profile. Note that this is also not a standard, but it seems to be a convention.

Debian sourcesused to source .profile at graphical login (linklink to wiki page as of 2013) now it doesn't (link to wiki page as of 2016). Arch sources .xprofile at graphical login (link). Ubuntu used to discourage using .profile (link to old version in the wiki)

Regarding your other question: Why doesn't my ~/.bash_profile work? That is the expected behaviour.

The behaviour, in short, is as follows:

  • bash started as an interactive login shell: reads ~/.profile
  • bash started as an interactive non-login shell: reads ~/.bashrc

For more details see my answer to a similar question in askubuntu: https://askubuntu.com/questions/132276/configure-gnome-terminal-to-start-bash-as-a-login-shell-doesnt-read-bashrc/132319#132319

.bash_profile is the startup configuration script of bash. There exists no standard mandating X to source .bash_profile.

What you are thinking of is rather .profile. Originally it was the startup configuration file of sh. Today many distributions have their desktop environment set up to source .profile. Note that this is also not a standard, but it seems to be a convention.

Debian sources .profile at graphical login (link). Arch sources .xprofile at graphical login (link). Ubuntu used to discourage using .profile (link to old version in the wiki)

Regarding your other question: Why doesn't my ~/.bash_profile work? That is the expected behaviour.

The behaviour, in short, is as follows:

  • bash started as an interactive login shell: reads ~/.profile
  • bash started as an interactive non-login shell: reads ~/.bashrc

For more details see my answer to a similar question in askubuntu: https://askubuntu.com/questions/132276/configure-gnome-terminal-to-start-bash-as-a-login-shell-doesnt-read-bashrc/132319#132319

.bash_profile is the startup configuration script of bash. There exists no standard mandating X to source .bash_profile.

What you are thinking of is rather .profile. Originally it was the startup configuration file of sh. Today many distributions have their desktop environment set up to source .profile. Note that this is also not a standard, but it seems to be a convention.

Debian used to source .profile at graphical login (link to wiki page as of 2013) now it doesn't (link to wiki page as of 2016). Arch sources .xprofile at graphical login (link). Ubuntu used to discourage using .profile (link to old version in the wiki)

Regarding your other question: Why doesn't my ~/.bash_profile work? That is the expected behaviour.

The behaviour, in short, is as follows:

  • bash started as an interactive login shell: reads ~/.profile
  • bash started as an interactive non-login shell: reads ~/.bashrc

For more details see my answer to a similar question in askubuntu: https://askubuntu.com/questions/132276/configure-gnome-terminal-to-start-bash-as-a-login-shell-doesnt-read-bashrc/132319#132319

deleted 84 characters in body
Source Link
Lesmana
  • 27.6k
  • 20
  • 82
  • 86

You are mostly wrong to think that .bash_profile should be sourced when X starts. .bash_profile is the startup configuration script of bash. There exists no standard mandating X to source .bash_profile.

What you are thinking of is rather .profile. Originally it was the startup configuration file of sh. Today many distributions have their desktop environment set up to source .profile. Note that this is also not a standard, but it seems to be a convention.

Debian sources .profile at graphical login (link). Arch sources .xprofile at graphical login (link). Ubuntu used to discourage using .profile (link to old version in the wiki)

Regarding your other question: Why doesn't my ~/.bash_profile work? That is the expected behaviour.

The behaviour, in short, is as follows:

  • bash started as an interactive login shell: reads ~/.profile
  • bash started as an interactive non-login shell: reads ~/.bashrc

For more details see my answer to a similar question in askubuntu: https://askubuntu.com/questions/132276/configure-gnome-terminal-to-start-bash-as-a-login-shell-doesnt-read-bashrc/132319#132319

You are mostly wrong to think that .bash_profile should be sourced when X starts. .bash_profile is the startup configuration script of bash. There exists no standard mandating X to source .bash_profile.

What you are thinking of is rather .profile. Originally it was the startup configuration file of sh. Today many distributions have their desktop environment set up to source .profile. Note that this is also not a standard, but it seems to be a convention.

Debian sources .profile at graphical login (link). Arch sources .xprofile at graphical login (link). Ubuntu used to discourage using .profile (link to old version in the wiki)

Regarding your other question: Why doesn't my ~/.bash_profile work? That is the expected behaviour.

The behaviour, in short, is as follows:

  • bash started as an interactive login shell: reads ~/.profile
  • bash started as an interactive non-login shell: reads ~/.bashrc

For more details see my answer to a similar question in askubuntu: https://askubuntu.com/questions/132276/configure-gnome-terminal-to-start-bash-as-a-login-shell-doesnt-read-bashrc/132319#132319

.bash_profile is the startup configuration script of bash. There exists no standard mandating X to source .bash_profile.

What you are thinking of is rather .profile. Originally it was the startup configuration file of sh. Today many distributions have their desktop environment set up to source .profile. Note that this is also not a standard, but it seems to be a convention.

Debian sources .profile at graphical login (link). Arch sources .xprofile at graphical login (link). Ubuntu used to discourage using .profile (link to old version in the wiki)

Regarding your other question: Why doesn't my ~/.bash_profile work? That is the expected behaviour.

The behaviour, in short, is as follows:

  • bash started as an interactive login shell: reads ~/.profile
  • bash started as an interactive non-login shell: reads ~/.bashrc

For more details see my answer to a similar question in askubuntu: https://askubuntu.com/questions/132276/configure-gnome-terminal-to-start-bash-as-a-login-shell-doesnt-read-bashrc/132319#132319

replaced http://askubuntu.com/ with https://askubuntu.com/
Source Link
Loading
deleted 2393 characters in body
Source Link
Lesmana
  • 27.6k
  • 20
  • 82
  • 86
Loading
added 42 characters in body
Source Link
Lesmana
  • 27.6k
  • 20
  • 82
  • 86
Loading
added 1 characters in body
Source Link
Lesmana
  • 27.6k
  • 20
  • 82
  • 86
Loading
added 772 characters in body
Source Link
Lesmana
  • 27.6k
  • 20
  • 82
  • 86
Loading
Source Link
Lesmana
  • 27.6k
  • 20
  • 82
  • 86
Loading