Re: Structure of /etc/profile
I like this idea. Too bad there's not a reliable indicator to use in
/etc/profile to gate the the non-environment code. I have not found
DISPLAY to be a good indicator.
Is this a requirement for a small utility to indicate that its process
family was started by xdm?
Would it solve the problem if you set an envar in Xsession before
sourcing /etc/profile? (Like "export XDM=:")
Date: Wed, 17 Jan 1996 00:58:09 +0000 (GMT)
From: Stephen Early <email@example.com>
To: Debian development mailing list <debian-devel@Pixar.com>
Subject: Structure of /etc/profile
With the discussion going on in another thread about what to put in
/etc/profile by default, whether to allow packages to add to it, and so
on, I thought it was time to bring this idea up.
/etc/profile is normally used to do two things - set a default
process environment for users while logging in (environment variables,
umask, ulimit, and so on) and do other things the administrator wants it
to do, like running fortune, displaying messages, etc.
I think that these two functions are logically separate, and I suggest
that they be separated. I propose that a file /etc/environment is used to
set the process environment. This would be sourced by /etc/profile. It
would also be sourced by the system Xsession script.
This removes one of the major X administration hassles, that of keeping X
session environments in step with normal login ones. (Some people source
/etc/profile from Xsession, but this isn't a good thing for a distribution
to do because some things in /etc/profile may depend on having a
/etc/environment would have to be idempotent, but this shouldn't be hard