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: Emacs Environment Variables Date: Sun, 25 Nov 2007 17:18:37 +1100 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87ir3qzw3m.fsf@lion.rapttech.com.au> References: <7e3068b0-defa-4b37-9092-182b521f5f50@e23g2000prf.googlegroups.com> <3568102A-B060-4D1F-B7B5-7944386B07A9@Web.DE> <20071124124821.GA5409@ono.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1195972954 29268 80.91.229.12 (25 Nov 2007 06:42:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Nov 2007 06:42:34 +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 Nov 25 07:42:42 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 1IwBCT-0003ju-Ma for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Nov 2007 07:42:41 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IwBCE-0000gt-Sf for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Nov 2007 01:42:26 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.news-service.com!sn-xt-ams-06!sn-xt-ams-03!sn-post-ams-01!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/23.0.50 (gnu/linux) Cancel-Lock: sha1:EikYIk0vgaNMVNNSM5YtQ+N12vI= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 65 Original-Xref: shelby.stanford.edu gnu.emacs.help:154061 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:49493 Archived-At: Peter Dyballa writes: > Am 24.11.2007 um 13:48 schrieb Ismael Valladolid Torres: > >> I am afraid he means running emacs from an icon in its window manager >> menu. Then it doesn't honor .bashrc, as it wasn't run from a bash >> session. > > I did not understand the message this way, although I though of login and > non-login interactive sessions. > >> >> If running Debian or Ubuntu he could move important env definitions >> into /etc/environment. I am sure there are ways to do this on Fedora >> or Mandriva systems. > > > There is also /etc/profile which is read by bash if it's launched as a > login shell. If a user does not have ~/.profile, then a bash login shell > reads ~/.bash_login. When this file sets important environment variables > like LANG or LC_CTYPE, then the user's environment will have set these > values from login time at the login screen. All other processes will > inherit from this environment, including X, will which pass this on to all > clients launched via menu entries – and maybe also via icons on the > desktop or in the dock (but I am guessing, I'm mostly on Mac OS X or > Solaris with OpenWindows). ~/.bashrc would not need to contain that many > basic settings if it can "delegate" some to ~/.bash_login or ~/.profile. > Problem is that Xsession is, by default, not run as a login shell and is not an interactive shell, so basically, none of the normal init files are sourced. > IMO bash is a bit too complicated to be used as a user's default shell. Really? What would you recommend as a default user shell (and please don't say csh!)? Having originally started with Bourne (sh), then a brief time with csh, followed by ksh and then tcsh and zsh and finally just going with the common default bash, I'd have to say I don't find bash any more difficult than any of the other common shells and certainly not any morre complicated. (of course, all the shells have improved greatly from an end user perspective. I still remember how pleased I was when shells started coming with built-in support for meaningful promts that included the current directory and hostname in them. I remember having to spend hours getting the same behavior using the output from pwd and sed, together with some other trickery I don't remember fully to get the prompt reset correctly when you cd to another directory. Back then, you also needed to know at least two shells - something reliable and straight-forward for scripting, like sh and something with a few more bells/whistles, like csh/tcsh for end user interaction because it seemed you couldn't get both. csh had some nice bells, but crappy scripting syntax. sh had simple clear scripting syntax, but no nice end-user bells. There were also a few inconsistencies with csh yu had to watch out for) these days, I seem to only do very trivial shell scripts. anything that is at all complex or non-trivial and I'll probably use perl, ruby or maybe even something lispy like rep, guile, lush or scsh. tim -- tcross (at) rapttech dot com dot au