OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: apink on August 12, 2006, 12:57:47 am

Title: Bash Profile Question
Post by: apink on August 12, 2006, 12:57:47 am
(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.
Title: Bash Profile Question
Post by: louigi600 on August 12, 2006, 02:24:00 am
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.
Title: Bash Profile Question
Post by: apink on August 14, 2006, 10:52:17 am
Quote
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.
Title: Bash Profile Question
Post by: karlto on August 14, 2006, 03:51:51 pm
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)
Title: Bash Profile Question
Post by: apink on August 14, 2006, 06:06:13 pm
Quote
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)
[div align=\"right\"][{POST_SNAPBACK}][/a][/div] (http://index.php?act=findpost&pid=138625\")

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

I have put
Code: [Select]
Aterm*loginShell: true in ~/.Xdefaults to get the same result.

[a href=\"http://forums.gentoo.org/viewtopic.php?t=68555]http://forums.gentoo.org/viewtopic.php?t=68555[/url]