Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: environment settings
- X-seq: zsh-workers 25207
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Jörg Sommer <joerg@xxxxxxxxxxxx>
- Subject: Re: environment settings
- Date: Wed, 18 Jun 2008 10:33:17 +0100
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <slrng5hivv.hdr.joerg@xxxxxxxxxxxx>
- Mail-followup-to: Jörg Sommer <joerg@xxxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080616074651.GB26165@marcus> <20080616080556.GA5091@xxxxxxxxxxxxxxx> <20080616123045.GC26165@marcus> <20080616124450.GC5091@xxxxxxxxxxxxxxx> <slrng5etlu.mft.joerg@xxxxxxxxxxxx> <20080617093859.GB5016@xxxxxxxxxxxxxxx> <slrng5hivv.hdr.joerg@xxxxxxxxxxxx>
On Wed, Jun 18, 2008 at 08:49:03AM +0000, Jörg Sommer wrote:
> Stephane Chazelas <Stephane_Chazelas@xxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author