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.
emacsstarted? It should run with your user, and the only sane thing I can imagine is doinglightdmis calling it through asu youruser whateverthat should run a shell which should read at least.profile. But I can be wrong, use-uoption topstreeto show where the change of users are. – Rmano Nov 27 '14 at 09:48