help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: environment variables in emacs


From: rusi
Subject: Re: environment variables in emacs
Date: Wed, 28 Mar 2012 19:28:18 -0000
User-agent: G2/1.0

On Nov 28, 1:33 am, Barry Margolin <bar...@alum.mit.edu> wrote:
> In article
> <10a388ae-22ff-41d3-9b4e-13668b7da...@o11g2000prg.googlegroups.com>,
>
>
>
>
>
>
>
>
>
>  rusi <rustompm...@gmail.com> wrote:
> > On Nov 27, 8:14 am, Barry Margolin <bar...@alum.mit.edu> wrote:
> > > In article
> > > <dad3cf1c-d75c-44fd-8cd6-7cffc4b31...@f36g2000prj.googlegroups.com>,
>
> > >  rusi <rustompm...@gmail.com> wrote:
> > > > Not really an emacs question but still hoping someone will know.
>
> > > > If I start emacs from a shell it sees  my path settings from .bashrc
> > > > If however I click the icon on the bar at the top of gnome I dont get
> > > > them
>
> > > > How to tell X to use my .bashrc settings?
>
> > > Your .xinitrc should source .bashrc.
>
> > Well I tried putting
> > . ~/.bashrc
> > in my .xinitrc
>
> > Does not make any difference. What am I doing wrong?
>
> Are you starting GNOME from your .xinitrc, or are you using GDM to log
> directly into the window environment?  It sounds like the latter.
>
> In that case, I think you need to set your environment variables in
> .profile rather than .bashrc.  I think this should be read by the
> session startup script.
>
> You can simply add
>
> . ~/.bashrc
>
> to your .profile so they're set in both scripts.
>
> --
> Barry Margolin, bar...@alum.mit.edu
> Arlington, MA
> *** PLEASE post questions in newsgroups, not directly to me ***

Thanks for the direction.
I had not a .profile only a .bash_profile
Putting a line
. ~/.bashrc
into my .profile

Now X stops working
.xsession-errors has
/etc/gdm/Xsession: Beginning session setup...
/etc/profile: 25: [[: not found
/home/rustom/.bashrc: 13: shopt: not found
/etc/bash_completion: 32: [[: not found
/etc/bash_completion: 38: [[: not found
/etc/bash_completion: 51: Bad substitution

Replacing the
. ~/.bashrc
with
source ~/.bashrc

makes X start but the PATHs are not set

Of course putting an explicit PATH=...
into .profile (and no attempt at sourcing) makes it work, so my
immediate problem is solved (thanks for that)

Do you have a better solution?
[Hope this is not too OT for the emacs list  :-) ]


reply via email to

[Prev in Thread] Current Thread [Next in Thread]