Author Topic: Bash Profile Question  (Read 3611 times)

apink

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Bash Profile Question
« 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.
--current use--
linux chroot on top of lineage  on cell phone

--past handhelds--
pandora
ben nanonote
zaurus sl-c1000

louigi600

  • Sr. Member
  • ****
  • Posts: 471
    • View Profile
Bash Profile Question
« Reply #1 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.
Regards
David

SL-c760*  pdaXrom latest
SL-c860    pdaXrom latest ;-)
SL-c1000  pdaXrom Latest
Acer Aspire One running slackware and Clash
Toshiba AC100 running ARMedslack and Clash

*with some hardware problems but good for testing

apink

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Bash Profile Question
« Reply #2 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.
« Last Edit: August 14, 2006, 02:01:15 pm by apink »
--current use--
linux chroot on top of lineage  on cell phone

--past handhelds--
pandora
ben nanonote
zaurus sl-c1000

karlto

  • Sr. Member
  • ****
  • Posts: 343
    • View Profile
    • http://
Bash Profile Question
« Reply #3 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)
SL6000-L, RC12

apink

  • Full Member
  • ***
  • Posts: 109
    • View Profile
Bash Profile Question
« Reply #4 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]

'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]
« Last Edit: August 14, 2006, 06:08:19 pm by apink »
--current use--
linux chroot on top of lineage  on cell phone

--past handhelds--
pandora
ben nanonote
zaurus sl-c1000