From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22205 invoked from network); 18 Jun 2008 09:33:30 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Jun 2008 09:33:30 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 83515 invoked from network); 18 Jun 2008 09:33:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Jun 2008 09:33:26 -0000 Received: (qmail 10263 invoked by alias); 18 Jun 2008 09:33:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25207 Received: (qmail 10248 invoked from network); 18 Jun 2008 09:33:23 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 18 Jun 2008 09:33:23 -0000 Received: from mail.o2.co.uk (vader.london.02.net [82.132.130.150]) by bifrost.dotsrc.org (Postfix) with ESMTP id E7AC58084FA0 for ; Wed, 18 Jun 2008 11:33:18 +0200 (CEST) Received: from sc.homeunix.net (78.105.216.138) by mail.o2.co.uk (8.0.013.3) (authenticated as stephane.chazelas) id 4851DD9500F12062; Wed, 18 Jun 2008 10:33:18 +0100 Received: from chazelas by sc.homeunix.net with local (Exim 4.69) (envelope-from ) id 1K8u2X-0005eU-9z; Wed, 18 Jun 2008 10:33:17 +0100 Date: Wed, 18 Jun 2008 10:33:17 +0100 From: Stephane Chazelas To: =?iso-8859-15?Q?J=F6rg?= Sommer Cc: zsh-workers@sunsite.dk Subject: Re: environment settings Message-ID: <20080618093317.GV5016@sc.homeunix.net> Mail-Followup-To: =?iso-8859-15?Q?J=F6rg?= Sommer , zsh-workers@sunsite.dk References: <20080616074651.GB26165@marcus> <20080616080556.GA5091@sc.homeunix.net> <20080616123045.GC26165@marcus> <20080616124450.GC5091@sc.homeunix.net> <20080617093859.GB5016@sc.homeunix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.16 (2007-09-19) X-Virus-Scanned: ClamAV 0.92.1/7498/Wed Jun 18 04:08:00 2008 on bifrost X-Virus-Status: Clean On Wed, Jun 18, 2008 at 08:49:03AM +0000, Jörg Sommer wrote: > Stephane Chazelas wrote: > > On Tue, Jun 17, 2008 at 08:33:02AM +0000, Jörg Sommer wrote: > > [...] > >> > Which in a way makes sense though is not very useful. ~/.zshrc > >> > is your shell configuration file. ~/.zprofile is you session > >> > configuration file. > >> > > >> > Generally, in ~/.zshrc, you put stuff that affects the behavior > >> > of interactive shells (sets shell options, defines shell > >> > aliases, configure completions). > >> > > >> > In ~/.zprofile, you define what affects any process started in > >> > your session not necessarily only the shell processes. > >> > >> And what's the meaning of .zshenv? I use it for my environment variables > >> like EDITOR, because my session is started by X. > > [...] > > > > Your X login procedure should source your .zprofile > > How should this work? How can a binary program or a Perl script source a > shell file? [...] I've seen different approaches implemented. Most often, the session startup command run's the user's shell as in (simplified) if user_shell =~ csh exec usershell -c 'source ~/.login; exec xinit' elseif usershell =~ zsh exec usershell -c 'source ~/.zprofile; exec xinit' else exec usershell -c '. ~/.profile; exec xinit' -- Stéphane