I run ubuntu 12.04.1 LTS. And I can't get what is the order/priority for loading profile files. When I start the system and login using GUI which file is loaded? And why? What if run login-shell? Will it be the same? Actually right now I can't get why my ~/.profile doesn't load when system starts because here I see it should:
|
|
|||||
|
|
You may define a variable in every file:
respectively
and perform an
to see, what was involved and in which order. Of course it will not tell you, if there were different scripts you missed. So if you see one source mentioned, read that script to look, whether one script sources another one, and include these too. /etc/bash.bashrc and ~/.bashrc and ~/.bash_login come to mind, as well as things from /etc/default. |
|||||
|
|
It all depends on with which user you're trying to log in. The global
|
|||
|
|
Both should be loaded, and ~/.profile should be loaded last (meaning it has priority). |
|||
|
|
It's my fault. There was [[ some_test ]] in my ~/.profile and it runs good in bash, but I guess dash runs some pre_session_creation/post_session_creation commands on session start and dash don't know [[ keyword. So everything had been loaded but stopped at the error. |
|||
|
|