View previous topic :: View next topic |
Author |
Message |
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Mon Jan 12, 2015 9:03 am Post subject: .bash_profile or .xprofile in gnome 3.12 |
|
|
I add `PATH="..."` in .bash_profile , but find that does not work.
I add that to .xprofile , it works.
In gnome 3.12 , why does .bash_profile not work ?
Thanks _________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Mon Jan 12, 2015 10:29 am Post subject: |
|
|
~/.bash_profile is only read for login shells. Terminal emulators under X usually do not start a new login shell when you open a new terminal. |
|
Back to top |
|
|
waterloo2005 Apprentice
Joined: 26 Aug 2008 Posts: 271
|
Posted: Tue Jan 13, 2015 3:00 am Post subject: |
|
|
mv wrote: | ~/.bash_profile is only read for login shells. Terminal emulators under X usually do not start a new login shell when you open a new terminal. |
I know this .
Even I restart machine, PATH variable in .bash_profile still does not work. _________________ i5-2450M, gnome, amd64
R,Mathematica,Emacs |
|
Back to top |
|
|
Naib Watchman
Joined: 21 May 2004 Posts: 6051 Location: Removed by Neddy
|
Posted: Tue Jan 13, 2015 9:14 am Post subject: |
|
|
You need a .profile that checks if it is an interactive shell & then source .bashrc _________________
Quote: | Removed by Chiitoo |
|
|
Back to top |
|
|
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Tue Jan 13, 2015 10:15 am Post subject: |
|
|
Naib wrote: | You need a .profile that checks if it is an interactive shell & then source .bashrc |
Naib ... or visa-versa even :) ... but generally gnome-terminal, or what-have-you, will have "make shell a login shell" checkbox under preferences.
@waterloo2005 ... don't confuse knowing for understanding. You don't go through 'login' and so you don't have a 'login shell' ... no matter how many times you reboot :)
best ... khay |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Tue Jan 13, 2015 12:45 pm Post subject: |
|
|
khayyam wrote: | You don't go through 'login' and so you don't have a 'login shell' ... no matter how many times you reboot |
Well, it depends: .xprofile is read by some shell (which is started by some display manager), and this shell might very well be a login shell. But it depends on the display manager and how it is set up; moreover, it might be that this login shell is e.g. dash. |
|
Back to top |
|
|
|