Help - Search - Members - Calendar
Full Version: Bash Profile Question
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > pdaXrom
apink
(newbie alert:)

I am trying to set my PATH variable in the bash shell. I would like to put a .profile file in my home directory but this does not seem to be working. Does pdaxrom only allow for /etc/profile or is there some other detail that I am missing? I am under the impression that bash checks both ~/.profile and ~/.bash_profile for configuration.

I am using beta3 on akita.
louigi600
If bash is executed without the "--noprofile" option it looks by default for profiles in: /etc/profile ~/.profile ~/.bash_profile.
pdaXrom 1.1.beta4 has a real bash but some other systems may be using busybox which may react differently.

Generally on a PDA you do not need multy user login so adding stuff to the system wide profile in /etc/profile is ok.
apink
QUOTE(louigi600 @ Aug 11 2006, 10:24 PM)
If bash is executed without the "--noprofile" option it looks by default for profiles in: /etc/profile ~/.profile ~/.bash_profile.


I have figured out that ~/.profile does get visited when my login bash starts up. However I am having problems exporting a revised PATH from ~/.profile. I can change PATH within .profile and document that change (by putting "echo $PATH > fileA" within .profile). However this change is not persistent once I am in my login environment. The PATH determined in /etc/profile is the one that shows up.

I understand that the fix is to do what I want in /etc/profile. But I am using my Z to learn linux and would like to figure this one out. (Perhaps this question belongs on a more generalized linux forum, not oesf.) I appreciate any explanations anyone is willing to give.

Edit: I'm figuring this out. When I start my login shell both /etc/profile and ~/.profile are checked, in that order. Then when I 'startx' and 'aterm', /etc/profile is run again, but not ~/.profile.
karlto
Often terminals like aterm etc don't actually provide a login/profile shell - they just do the bare minimum. Investigate to see if there is an option you can pass to aterm to use the profile. (e.g. on my laptop I use konsole with the -ls switch)
apink
QUOTE(karlto @ Aug 14 2006, 11:51 AM)
Often terminals like aterm etc don't actually provide a login/profile shell - they just do the bare minimum. Investigate to see if there is an option you can pass to aterm to use the profile. (e.g. on my laptop I use konsole with the -ls switch)
*


'aterm -ls' does the trick. Thank you. cool.gif

I have put
CODE
Aterm*loginShell: true

in ~/.Xdefaults to get the same result.

http://forums.gentoo.org/viewtopic.php?t=68555
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.