From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: "source" shell commands Date: Sun, 25 Mar 2007 20:56:04 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87ircpfv7f.fsf@lion.rapttech.com.au> References: <87bqii936r.fsf@baldur.tsdh.de> <85wt16btg5.fsf@lola.goethe.zz> <87hcsaqbui.fsf@lion.rapttech.com.au> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1174822729 15364 80.91.229.12 (25 Mar 2007 11:38:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 25 Mar 2007 11:38:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 25 13:38:43 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HVR3Z-0000Rf-Mo for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Mar 2007 13:38:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HVR5g-0002C1-U1 for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Mar 2007 06:40:52 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!sn-xt-sjc-05!sn-xt-sjc-06!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) Cancel-Lock: sha1:uioE2q+9dopZyIHSzES0y4JGVQI= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 57 Original-Xref: shelby.stanford.edu gnu.emacs.help:146575 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:42179 Archived-At: Matthew Flaschen 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 panel'. 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. HTH Tim 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