From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: environment settings
Date: Wed, 18 Jun 2008 10:11:08 -0700 [thread overview]
Message-ID: <080618101108.ZM12751@torch.brasslantern.com> (raw)
In-Reply-To: <20080618115227.GZ5016@sc.homeunix.net>
On Jun 18, 12:52pm, Stephane Chazelas wrote:
}
} Most of the processes a user every runs are run during his login
} session.
}
} Basically, there's nothing for "a file that should set env
} variable for every process run by this given user".
The definition of a "login session" has unfortunately become very
uncertain. The Gnome desktop via GDM on Ubuntu, for example, does
not perform "login session"-type initialization (or at least, does
not do so in a way specific to the user's shell from /etc/passwd).
The default gnome-terminal configuration also does not create login
shells when opening new windows. Without some more-than-trivial
knowledge of Gnome configuration, there is no way for a user to
accomplish the things that you attribute to a single login session.
} - ~/.forward: depends on the MTA, I don't think the user's shell
} is involved.
It depends on the program invoked (procmail derives $SHELL from
/etc/passwd -- users are often advised to add SHELL=/bin/sh early
in their .procmailrc unless they know exactly what they are doing).
Also, there are ways other than the .forward that filter programs,
etc. can be invoked from an MTA.
} But in all the cases above, the user can explicitely call a "sh"
} that sources a file that does the "exports".
Even granting that this is true, why solve the same problem again
every time a new situation comes up?
For example purposes, here's part of what I do in .zshenv:
----
if [[ -O $HOME ]]
then
# Use version-controlled configuration library if available
[[ -d $HOME/.zsh ]] && ZDOTDIR=$HOME/.zsh
else
# Not me, or not my home directory, don't read the startup files
setopt NO_RCS
return 0
fi
PATH=${ZSH_ENVPATH:-$PATH}
export ZSH_ENVPATH=$PATH
----
This is followed by some miscellaneous stuff to delete stupid settings
that misguided Linux packagers have at various times placed in the
/etc/zshenv file, and set $fpath in case $0 indicates I'm running zsh
from a non-standard location (like out of my development sandbox). The
ZSH_ENVPATH setting assures that I can always reset $PATH to the system
default before modifying it.
next prev parent reply other threads:[~2008-06-18 17:11 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080616074651.GB26165@marcus>
[not found] ` <20080616080556.GA5091@sc.homeunix.net>
[not found] ` <20080616123045.GC26165@marcus>
[not found] ` <20080616124450.GC5091@sc.homeunix.net>
2008-06-17 8:33 ` Jörg Sommer
2008-06-17 9:39 ` Stephane Chazelas
2008-06-17 10:41 ` Vincent Lefevre
2008-06-17 12:58 ` Stephane Chazelas
2008-06-17 13:11 ` Vincent Lefevre
2008-06-17 13:26 ` Stephane Chazelas
2008-06-17 13:28 ` Mikael Magnusson
2008-06-17 14:25 ` Stephane Chazelas
2008-06-17 15:54 ` Vincent Lefevre
2008-06-17 16:00 ` Stephane Chazelas
2008-06-17 19:50 ` Vincent Lefevre
2008-06-17 20:32 ` Stephane Chazelas
2008-06-18 10:38 ` Vincent Lefevre
2008-06-18 11:52 ` Stephane Chazelas
2008-06-18 17:11 ` Bart Schaefer [this message]
2008-06-17 14:55 ` Vincent Lefevre
2008-06-17 14:45 ` Vincent Lefevre
2008-06-18 8:49 ` Jörg Sommer
2008-06-18 9:33 ` Stephane Chazelas
2008-06-21 6:26 ` Wayne Davison
2008-06-21 11:36 ` Vincent Lefevre
2008-06-21 12:30 ` Stephane Chazelas
2008-06-22 8:41 ` Vincent Lefevre
2008-06-23 15:24 ` Stephane Chazelas
2008-06-23 16:16 ` Vincent Lefevre
2008-06-23 16:20 ` Bart Schaefer
2008-06-23 16:29 ` Stephane Chazelas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=080618101108.ZM12751@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).