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

Re: Emacs and shell variables



Lo, on Wednesday, May 22, Stefan Bellon did write:

> Dave Carrigan wrote:
> > Stefan Bellon <sbellon@sbellon.de> writes:
> 
> [snip]
> 
> > > gdm, but without the rest of GNOME, only gdm.
> 
> > gdm won't evaluate your .bashrc to set the environment variables. The
> > idomatic solution is to create a ~/.environment file where you set all
> > of your environment variables, then each of your other .rc files
> > (.bashrc, .gnomerc, .xsession, etc.) source that file.
> 
> I know very little of the login process. Does gdm evaluate the
> ~/.environment file? Or the ~/.xsession file? If neither, then the
> above solution doesn't give me any advantage. If it does evaluate one,
> then yes, this is clearly the way to go.

I *think*, although I'm not entirely certain, that a gdm login will end
up reading .xsession.  It's been a long time since I've used gdm, so I'm
a little unclear on the details.

However, I don't remember whether it ever creates a login shell for
you.  If it doesn't, you might try putting the following on the first
line of .xsession:

#!/bin/bash --login

This will force it to be a login shell, which should source the
appropriate bash dotfiles.

In my case, I log in on the console and run startx from within a login
shell, so it pretty much just works.  (If you're not too attached to
graphical login managers, you may want to try this tactic; I've always
found it a lot easier to understand and configure.)

Richard


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: