I'm running Xubuntu 14.10, currently using lightdm. Let's examine two process trees:
init───lightdm───lightdm───upstart───xfce4-terminal───bash
and:
init───lightdm───lightdm───upstart───emacs─┬─{dconf worker}
├─{gdbus}
└─{gmain}
My issue is that I am setting PATH in .bashrc
, which given that emacs is started by upstart (using the keyboard shortcut), makes it not have the same PATH value. (I know I should move that to .bash_profile
or so, but that won't fix the issue and it's fine given that I usually login in one way only, through X / lightdm.)
Consider these three cases:
- Terminal on vty1 -> bash - path is initialized by bash (
.bash_profile
) - X -> emacs - path is initialized by lightdm (
.xinitrc
) - X -> xfce4-terminal -> bash - path is initialized by lightdm (
.xinitrc
), then modified by bash (.bash_profile
)
First - is the above correct or are there other things happening? Or better yet - should I be using the above to initialize or some other files / mechanisms?
If the above is correct, I assume putting PATH in a script, then calling from both .bash_profile
and .xinitrc
would be the best way to sync up all these environments, correct?
Are there hooks that provide a way to reset the PATH of lightdm? I'd like to avoid logging in and out when changing PATH if possible.
0 Answers