[Top][All Lists]

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

Re: "source" shell commands

From: Tim X
Subject: Re: "source" shell commands
Date: Sun, 25 Mar 2007 20:56:04 +1000
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux)

Matthew Flaschen <address@hidden> writes:

>> The first and easiest is to change the shell that executes your
>> .Xsession (or equivalent) to a login shell.
> Any idea how I would do that in Ubuntu (gNewSense really)?
> Matthew Flaschen

Well, I've never really run KDE, but all the different window managers pretty
much follow a similar pattern AFAIK. I'm not running Ubuntu, but plain Debian,
so I'll assume they are pretty similar. However, I do know that KDE does have
some 'quirks' that make life a bit more tricky in some situations (for example,
setting app colours and/or geometry is not as easy as just setting values in
.Xdefaults/Xresources - you have to do some settings inside the KDE 'control

The trick is to identify which of the startup scripts are the one which spawns
the window manager - normally this is done with a 'exec window_manager'.
Unfortunately, I can't rmember which one it is just now (and I've heavily
customized my startup on my home machine). From memory it is one of

/etc/gdm/Xsession (if your running gdm)
/etc/X11/xdm/Xsession (if your running xdm)

If you change one of these to run as a login shell, then your .bash_profile (or
whatever) will be executed. This script then sources the client startup scripts
(i.e. at its most basic, this could be just starting an xterm, but normally it
will start a window manager.). As the window manager is started as a subprocess
of your login shell, its environment inherits your login environment and as all
the processes it starts (such as emacs) is a subprocess of that, they will also
inherit your environment settings. 

If you can't work out which file it is, let me know and I'll have a look at my
work machine (which has not been 'customized' - I may even be able to look at
one of my co-workers machines as quite a few of them run Ubuntu. 



P.S. Back in the bad old days when I use to do java development and was using
JDE, this is exactly what I did to ensure I could just start emacs from the
window manager (without first starting an xterm and sourcing .bash_profile. In
those days I was running RH, but from memory, that was when I first had to work
this out)

PPS - now, I don't have to struggle with that horrible java stuff. Now I really
appreciate the simple environment of perl and ruby (and for fun CL). The only
constant over the past 12 years has been emacs!

tcross (at) rapttech dot com dot au

reply via email to

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