[openbox] autostart.sh and bashrc

Ashi ashi08104 at gmail.com
Wed Jun 13 22:16:31 EDT 2012


Jimmy, Thanks your advice. However, the exactly emacs's problem is: I try
to compile the project in emacs, it calls make to do the work. And my
makefile needs a call to pkg-config to get the libs and cflags to complete
its work, and pkg-config need the specified environment variable of
PKG_CONFIG_PATH, which is specified in bashrc. And now after move the
environment variable setting to .bash_profile, emacs compile command works.
Thanks again!

2012/6/13 <jimmy.wants.no.spam at gmail.com>

> On Wed, 13 Jun 2012, 10:10+0800, Ashi <ashi08104 at gmail.com> wrote:
> > I add the emacs daemon in the autostart.sh to speed up emacs. However, I
> > found the environment variables setted in my bashrc is still not setted
> in
> > the emacs(emacs would get all current environment variables when it
> > started). So I guess add the needed environment variables to autostart.sh
> > would solve this problem(I've tested, it works). But this solution is a
> > little ugly, I want all setting are kept in one place(such as bashrc). Is
> > there anyway to get this?
>
> As a general principle, environment variables should go in ~/.profile or
> a similar file, while .bashrc is for bash-specific non-environment
> related things like setting aliases, prompts, shell options, etc.
>
> Move your environment variables (i.e. the ones you have to export) to
> .profile, keeping the syntax portable as more shells than just bash read
> it, and see if that works.
>
> Emacs-specific settings should go in an emacs-specific configuration
> file and not in bashrc, of course.
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
>



-- 
Best wishes!
Ashi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20120614/885a5749/attachment.htm>


More information about the openbox mailing list