Discussion:
[Fluxbox-users] fluxbox is altering emacs environment
Haines Brown
2011-09-11 19:44:08 UTC
Permalink
I've been runing Fluxbox for some time without problem. But now
things have suddenly changed. When I now start emacs from a terminal,
it has a proper environment, but when I start it from the fluxbox
menu, the texlive portion of the path is truncated and shows up as

M-x getenv, PATH

/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

However, the path I want is this:

$ echo $PATH
/usr/local/texlive/2011/bin/i386-linux:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

The texlive portion is appended to default user's environment by a
line in ~/.bachrc.

Oddly, but I don't know if at all relevant, when I start emacs in text
mode from the fluxbox menu, I can issue C-x commands from it, but no
M-x commands. When I enter M-x, garbage appears in the minibuffer and
a slash O in the scratch buffer. But when I start emacs from a
terminal as text-only

$ emacs -nw

I can issue the M-x genenv command, and it returns a proper full PATH.

Any ideas?


Haines Brown
Bob Hepple
2011-09-12 01:25:37 UTC
Permalink
Bob, thanks for the suggestion. Your point that fluxbox for some reason
is not sourcing ~/.bashrc would account for the problem, but putting
 [ "$BASHRC_DONE" ] ||  {
     source $HOME/.bashrc
     BASHRC_DONE=yes
 }
info fluxbox' startup file had no effect (I did restart fluxbox). I
also looked at the startx script, and it was not obvious how I would
tell it about ~/.bashrc.
OK - let's try making it unconditional. And to be on the safe side,
source .bash_profile too:
in startup:

source .bash_profile
source .bashrc

Try starting fluxbox with that.

Cheers


Bob

Loading...