From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21851 invoked by alias); 20 Jan 2013 19:10:32 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17595 Received: (qmail 13156 invoked from network); 20 Jan 2013 19:10:20 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.214.45 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xgm.de; s=google; h=x-received:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=Uau+Qs9EKt1D7RMjjLqcv+MtOoEv8uS+al19n1iEuok=; b=gH7LOT318A0uh/17P9xEWWoSOJ2BJyXD3dzs+l6Nq8EzFEkiz5npMWwubgriceccDS MrTlvtSGdJn3hHSNqRVmKmQ3zTpBBdoxAEpsjqjDJiqkZ3jN1dK40OjbJ/bERu1nB1cO D/Pnmq8sOFTLoCX9OajLwOAymb8oacpgywYLo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type:x-gm-message-state; bh=Uau+Qs9EKt1D7RMjjLqcv+MtOoEv8uS+al19n1iEuok=; b=nKfEEwzPxA6fq2qmQXQqUpOgel07S+aQfqunORnZB3FraBuMvGL2HZu+czxAyU/qii 5bAUSpZV3Q8Z91qEGEOs+h9H/pVW641yBv+0aUgACmXsrWBaVDdnFTdewI8hqY+5Jh0N PfwLLiTLbPJlpP74AYlBXCRcwZpKaKj6wSto5Pv9pNcRC4qq/Q3olDv9Q+tc5w1Tlkud EIAL4UDLEboc+A85O5JGN8aMORLF/5vis3TpIFZ6YCyZFYDlxDL4Ui0wEkW80nbIWy8m o+Xy9YYdnd6xJ+NOz6AaSFVabjUyx+mt0lApa7PSIb02GotBa2s4AWTJ9fgqMRMRq2xe GZTw== X-Received: by 10.204.147.139 with SMTP id l11mr4309628bkv.46.1358707415559; Sun, 20 Jan 2013 10:43:35 -0800 (PST) From: Florian Lindner To: zsh-users@zsh.org Cc: Bart Schaefer Subject: Re: Invocation of zshenv Date: Sun, 20 Jan 2013 19:43:27 +0100 Message-ID: <3828409.yvgubn8Pyh@horus> User-Agent: KMail/4.9.5 (Linux/3.6.11-1-ARCH; KDE/4.9.5; x86_64; ; ) In-Reply-To: <130117065847.ZM23286@torch.brasslantern.com> References: <28298170.euN6CzUU1l@horus> <36715347.6JBz4RFEZ9@horus> <130117065847.ZM23286@torch.brasslantern.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Gm-Message-State: ALoCoQnvN9Swh08rZn7/BhI9RfktlALR+5N0wt2SwmNC7sjUQr/3TSbBwxfInZ0qjLX7eV292ZAS Am Donnerstag, 17. Januar 2013, 06:58:47 schrieb Bart Schaefer: > On Jan 17, 10:23am, Florian Lindner wrote: > } > } So [/etc/profile] sets and exports the PATH but does not take a > } already set PATH variable into account. If .zshenv is sourced before > } /etc/profile that would explain it. But why only on SSH shells not on > } usual shells? > > How do you typically create a "usual shell"? Log in on console, or > open a terminal window on a graphical desktop? Ok, I just found out that it works only when using the shell from my graphical environment (KDE). Login from a text console or SSH does not work. But .zshenv is invoked in any case. I suspect that the two latter cases (text + SSH) are login shells and /etc/profile is evaluated. This file simply sets and not append/prepend to a existing PATH. > If the latter, it's possible that ssh shells are being invoked as > login shells whereas "usual" shells are not. This will depend on the > configuration of the terminal emulator. I concur. > > Try putting > > setopt NO_GLOBAL_RCS > > in your .zshenv to see if that suppresses /etc/profile. However, you > may not want that in general, depending on what other environment the > global init files are establishing for you. Instead you may simply > need to reset the path again in a later file. It works (the PATH setting I did in .zshenv is there). But as you have guessed it fucks up my environment ;-) > I put my path-setting logic in an extra file which is "source"d from > both .zshenv and .zlogin (first and last files sourced at startup). > This also has the advantage of making it easier to customize the path > to each local host. I changed my /etc/profile from PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" to PATH="$PATH:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin" Any potential problems with that? Thanks! Florian