Robert Holtzman wrote:
> Bob Proulx wrote:
> > AFAIK it is still true that unless you have taken special measures
> > (e.g. ~/.xsession) then the .bashrc environment will not be present to
> > the GNOME desktop.
> 
> It sure seems to be present out of the box on mine (Lenny and Squeeze). 
> In addition to the browser export setting, I source my .bash_aliases
> file from it.

It definitely is not on mine.  Not on Lenny, Squeeze, nor Sid.  I just
double checked by doing the tests.  Variable settings in .bashrc are
not available to GNOME.

> > Therefore while setting BROWSER in .bashrc will work for
> > invocations of sensible-browser from the command line it won't
> > have any effect for when GNOME is launched.
> 
> Gnome has to be launched manually? Not my experience. On my distros it
> launches at boot. What distros are you basing your statement on? Or am I
> completely misunderstanding your post?

I didn't say anything about launching GNOME manually.  Not sure where
you read that from.  Although you certainly can do so through xinit or
startx and many do use those to start up X manually.

What I said was that setting shell variables in .bashrc won't normally
have any presence to applications launched by GNOME.  GNOME is
normally started by gdm, as you so noted.  That doesn't come through
either .bash_profile or .bashrc and so variables set there won't be in
effect.

So let's say you have GNOME preferences configured so that the web
browser will be sensible-browser.  In that case it won't get the
BROWSER variable setting in .bashrc and then won't launch the desired
browser.

> > Instead for GNOME
> > it appears in /etc/X11/Xsession.d/55gnome-session_gnomerc that you
> > need to put settings into ~/.gnomerc instead.  I mention this because
> > Paul said he was running GNOME.  Users running other session managers
> > would be better served to use ~/.xsession.
> > 
> > Probably best to have the .gnomerc simply dot source (with '.' not
> > 'source', Xsession is a /bin/sh script not a /bin/bash script) the
> > .bashrc file so that you get the same environment both places.

I think it is actually better to do the variable setting through
~/.xsession.  It certainly isn't an obvious solution though.  In any
case it has been discussed to death on the mailing list previously so
I will avoid it again here.  The 55gnome-session_gnomerc seems to want
those in a ~/.gnomerc file.

Bob

Attachment: signature.asc
Description: Digital signature

Reply via email to