Re: /etc/profile not being run


Subject: Re: /etc/profile not being run
From: Conrad M. Hirano (conrad_hirano@yahoo.com)
Date: Sun Feb 25 2001 - 16:37:28 MST


on 2/25/01 10:27 AM, Hollis R Blanchard at hollis+@andrew.cmu.edu wrote:

> On Sun, 25 Feb 2001, Conrad M. Hirano wrote:
>
>> I have a B&W G3 running CS 1.2.1, updated to XF 4.0.1 using Hollis's .rpms.
>> I'm in run level 5, and when I log in at the console, /etc/profile doesn't
>> get executed.
>
> /etc/profile is executed by bash when it is run as a login shell. In runlevel
> 5, bash is never executed as a login shell, since all terminals you bring up
> in X are (correctly) non-login shells.

Thanks for the reply, Hollis.

In responding to it, I realized where the problem was. (It's pretty obvious
now in hindsight. :) I took a look at /etc/X11/xdm/Xsession and found that
with XF 3.3.6, Xsession is run in a bash login shell; with XF 4.0.1, it's
run in a non-login shell.

Xsession should be run in a login shell as it is the first process run as
the user upon login through the display manager. The exported environment
variables will then be inherited by the non-login terminals, and there's no
need for the hack that you mentioned or to avoid runlevel 5.

Conrad



This archive was generated by hypermail 2a24 : Sun Feb 25 2001 - 16:38:03 MST