Re: My .profile is not read?

John W <[email protected]>
Newsgroups gmane.comp.window-managers.fluxbox.user
Message-ID <CADO30sqsfRKHJB8kNVyAJYhE-uN010cwEhPMCWacBhxTQVsawA@mail.gmail.com>
2011/9/16 Raphaël Droz <[email protected]>:
>
> .profile is read by login shell [1]
> your xterm does not run a *login* shell thus only reads .bashrc.
>
> .profile exported values will affect fluxbox and xterm *if* fluxbox itself
> was launched into a login shell (or if the shell used to run fluxbox
> from loaded your .profile in some way).

Yes, I phrased my initial question badly; sorry about that.

After doing some more research, it seems that the real problem is that
PS1 (my custom prompt) somehow is getting overwritten when fluxbox
runs.

I was setting up PS1 in my .profile.
Normally, this env. var is inherited by subprocesses, so I would have
the correct PS1 in subsequent shells.

But for some reason fluxbox overwrote it with some 'default' value - I
don't know why that happened, or if it is configurable. I didn't find
cause for this in any obvious places, or in the documentation.
Everything *else* from my .profile was inherited correctly, which is
why I feel fairly confident in saying that something in fluxbox
overwrote it.

So ultimately, when I launched new xterm processes inside fluxbox,
they had the wrong PS1.

As a workaround, I put my PS1 definition in my .bashrc rather than my .profile.
Since .bashrc does get read every time a (non-login) shell is
launched, it gave me my special prompt.


If anyone knows why fluxbox seems to be messing with PS1 on startup,
I'd be curious to know.
But the workaround is fine for me, too.

-John

------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.