From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9906 invoked by alias); 18 Nov 2014 17:06:45 -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: 19404 Received: (qmail 3822 invoked from network); 18 Nov 2014 17:06:43 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7f956d000005ed7-49-546b7ca0da70 Date: Tue, 18 Nov 2014 17:06:38 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: 'login' vs 'interactive' ? Message-id: <20141118170638.3a173cce@pwslap01u.europe.root.pri> In-reply-to: <546B7A65.2070806@necoro.eu> References: <20141118163929.71afd221@pwslap01u.europe.root.pri> <546B7A65.2070806@necoro.eu> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: quoted-printable X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplluLIzCtJLcpLzFFi42I5/e/4Zd0FNdkhBrOOMlvsOLmS0YHRY9XB D0wBjFFcNimpOZllqUX6dglcGdtO7mUtuCxW0fjyOFsD4yvBLkZODgkBE4mJEy6wQthiEhfu rWfrYuTiEBJYyihxZfdKZiiHSeLMo18sIFUsAqoSO1ZvZAOx2QQMJaZums0IYosIiEosX7GZ HcQWFlCXmPtsHZjNK2Av8fDcS7AaTgFNibYZh8G2CQksZ5TYuE0LxOYX0Je4+vcTE8QV9hIz r5xhhOgVlPgx+R7YXmagmZPmLWKGsLUlnry7wDqBUWAWkrJZSMpmISlbwMi8ilE0tTS5oDgp PddIrzgxt7g0L10vOT93EyMkCL/uYFx6zOoQowAHoxIPb8PGrBAh1sSy4srcQ4wSHMxKIrzn uoFCvCmJlVWpRfnxRaU5qcWHGJk4OKUaGPdEftqp47pM7bvOOhfDg783Prj28f6UCRscN5x8 VeeR7JR1bKMey32Ro4Ucu9oVNs3/p8gbrHjYLnHaHrcYhf3O3lIlz6bP+PJ7yoddqzwj9i5a bCbGszDcqrqGfaH6WTPrNBOhyuxXolm7peadPLTvzo2N8ZoWSRxvlsx892zBaguWjVZLGjqV WIozEg21mIuKEwFhr6eeIAIAAA== On Tue, 18 Nov 2014 17:57:09 +0100 Ren=C3=A9 Neumann wrote: > vs (from the FAQ-excerpt you quoted) >=20 > > All login shells are interactive. That's even older than the other sources of information... diff --git a/Etc/FAQ.yo b/Etc/FAQ.yo index 08ea979..dcb2ec5 100644 --- a/Etc/FAQ.yo +++ b/Etc/FAQ.yo @@ -1017,19 +1017,26 @@ sect(In which startup file do I put...?) reason it is important for administrators to make sure tt(/etc/zshenv) is as brief as possible. =20 - The order in which the four files are searched (none of them myem(need) - to exist) is the one just given. However, tt(.zprofile) and tt(.zlogin) - are only run when the shell is a login shell --- when you first login, - of course, and whenever you start zsh with the tt(-l) option. All - login shells are interactive. The order is the only difference - between those; you should decide whether you need things set before or - after tt(.zshrc). These files are a good place to set environment - variables (i.e. mytt(export) commands), since they are passed on to - all shells without you having to set them again, and also to check - that your terminal is set up properly (except that if you want to - change settings for terminal emulator windows like tt(xterm) you will - need to put those in tt(.zshrc), since usually you do not get a login - shell here). =20 + The order in which the four files are searched (none of them + myem(need) to exist) is the one just given. However, tt(.zprofile) + and tt(.zlogin) are only run when the shell is a login shell --- when + you first login, of course, and whenever you start zsh with the tt(-l) + option. The order is the only difference between those; you should + decide whether you need things set before or after tt(.zshrc). These + files are a good place to set environment variables (i.e. mytt(export) + commands), since they are passed on to all shells without you having + to set them again, and also to check that your terminal is set up + properly (except that if you want to change settings for terminal + emulator windows like tt(xterm) you will need to put those in + tt(.zshrc), since usually you do not get a login shell here). + + Login shells are often interactive, but this is not necessarily the + case. It is the programme that starts the shell that decides if it is + to be a login shell, and it is not required that the shell be run + interactively. A possible example is a display manager that starts a + shell to initialise your environment before running the window manager + to create terminals: it might run this as a login shell but with no + terminal, so it is not interactive. =20 The only file you can alter which is started with every zsh (unless you use the tt(-f) option) is tt(.zshenv), so this is a good place to \ pws