Zsh Mailing List Archive
Messages sorted by:
Re: environment settings
- X-seq: zsh-workers 25209
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxx, Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: environment settings
- Date: Wed, 18 Jun 2008 12:52:27 +0100
- In-reply-to: <20080618103808.GB10734@xxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx, Mikael Magnusson <mikachu@xxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080617125834.GI5016@xxxxxxxxxxxxxxx> <20080617131154.GM10734@xxxxxxxxxxxxxxxxxxx> <20080617132611.GL5016@xxxxxxxxxxxxxxx> <237967ef0806170628m56b80d3anaf252e68ad6c497d@xxxxxxxxxxxxxx> <20080617142557.GO5016@xxxxxxxxxxxxxxx> <20080617155429.GT10734@xxxxxxxxxxxxxxxxxxx> <20080617160009.GS5016@xxxxxxxxxxxxxxx> <20080617195007.GV10734@xxxxxxxxxxxxxxxxxxx> <20080617203229.GU5016@xxxxxxxxxxxxxxx> <20080618103808.GB10734@xxxxxxxxxxxxxxxxxxx>
So, to sum up.
~user/.zshrc is the interactive shell customisation file of the user
~user/.zprofile is the login session customisation file of the user
~user/.zshenv can be used to set environment for every process
run by the corresponding user through zsh.
Most of the processes a user every runs are run during his login
session. Exceptions one can think of are:
- cron jobs: cron(8) generally doesn't run the user's shell but
sh to parse the job command line, so .zshenv won't be sourced
unless the cron job is a zsh script.
- ssh/rsh cmd. sshd/rshd does use the user's shell (which can be
a pain), so .zshenv will be sourced if the user's login shell
- rexec, no shell involved.
- ~/public_html/xxx.cgi: no shell involved.
- ~/.forward: depends on the MTA, I don't think the user's shell
Basically, there's nothing for "a file that should set env
variable for every process run by this given user".
But in all the cases above, the user can explicitely call a "sh"
that sources a file that does the "exports".
Messages sorted by: