From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21213 invoked from network); 17 Oct 2008 21:11:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 Oct 2008 21:11:07 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 4289 invoked from network); 17 Oct 2008 21:10:53 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Oct 2008 21:10:53 -0000 Received: (qmail 15408 invoked by alias); 17 Oct 2008 21:10:25 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13344 Received: (qmail 15395 invoked from network); 17 Oct 2008 21:10:23 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 17 Oct 2008 21:10:23 -0000 Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.187]) by bifrost.dotsrc.org (Postfix) with ESMTP id 60D9C80524C0 for ; Fri, 17 Oct 2008 23:10:19 +0200 (CEST) Received: by fk-out-0910.google.com with SMTP id 26so752595fkx.13 for ; Fri, 17 Oct 2008 14:10:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=fWWUg0y3CzxVFM5OpSz8dB2V5yng5OogRM1J3LMtvIo=; b=M6RTdsSAXOwDhDlYEDLitze5e7/WwdnsrX+m5j32B/AhlDeehqvBCeOnIuQ+z/rNZ0 sWOQ10Sy0p6rYhWANsd6P81oNGVneiw9/a0i9sin+5QqQFM3imDmSOd8nzeyZpuj373n jGHKGcA7Acxv1Tc/CVUv+TZKeeauCKCzjuOtg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=kAFMCed9CRb7nsuCkPyf0aY3LiZ2O4VPL/Tot9Oejj2NB5Mf/Inqjon+EunaBRDENd ivJ2tsLm18G4QqH3TIHmiKdazp1OtiyHEsiNchQ44C505Dv77KRDQIK9bnzZJUn7hnMn TW6XZJVpVMglXl4N9d/63XlzZO760UgsL8yi4= Received: by 10.181.134.12 with SMTP id l12mr1640080bkn.80.1224277818279; Fri, 17 Oct 2008 14:10:18 -0700 (PDT) Received: by 10.103.173.11 with HTTP; Fri, 17 Oct 2008 14:10:18 -0700 (PDT) Message-ID: Date: Fri, 17 Oct 2008 23:10:18 +0200 From: "=?UTF-8?Q?Jan_H=C3=BClsbergen?=" To: dqarras@yahoo.com Subject: Re: Functions in system init scripts Cc: zsh-users@sunsite.dk In-Reply-To: <228455.67320.qm@web36801.mail.mud.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <228455.67320.qm@web36801.mail.mud.yahoo.com> X-Virus-Scanned: ClamAV 0.92.1/8441/Fri Oct 17 19:48:00 2008 on bifrost X-Virus-Status: Clean Hi Daniel, On Fri, Oct 17, 2008 at 22:17, Daniel Qarras wrote: > What happens here is that some applications install their initialization scripts under /etc/profile.d and those get sourced via /etc/profile when a user logins (and /etc/profile is sourced by /etc/zprofile). With console sessions or ssh connections all is good. > > When a user is logging via a display manager like GDM, the function definitions get "lost" as only zshenv/.zshenv/zshrc/.zshrc are getting sourced when an xterm / gnome-terminal is launched. zprofile/.zprofile are sourced during the login but only environment variable setting survive till xterm/gnome-terminal. > > So the question is what would be the most optimal way to fix this? Some distributions' zsh package (e.g., Red Hat's) actually source init scripts under /etc/profile.d *twice* but that raises new problems as then a user will have hard time to override some settings in his own init scripts (and it just feel broken to do something like that twice in any case). One way to fix this is to make your terminal emulator execute the shells as login shells (gnome-terminal can do that IIRC). Another way would be to *only* source /etc/profile in your zshrc as this file gets executed for any interactive shell, login or not. HTH Jan