Bug 20781 - Xsession script should be sure session runs as child of user's shell (as a login shell)
Xsession script should be sure session runs as child of user's shell (as a lo...
Product: Red Hat Linux
Classification: Retired
Component: xinitrc (Show other bugs)
i386 Linux
high Severity medium
: ---
: ---
Assigned To: Mike A. Harris
Dale Lovelace
: 37234 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2000-11-13 14:39 EST by dkaplan
Modified: 2007-03-26 23:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-07-19 18:15:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description dkaplan 2000-11-13 14:39:48 EST

I have justed installed Redhat 7.0 Guiness, and I have a host of small, but
rather annoying

1) When I step through windows using Alt-Tab, it puts the mouse in the
upper right hand corner of the new window.  I am not sure if this is
supposed to be a feature, but the end result is that the mouse jumps into
the corner of the screen and opens up the gnome panel, which takes away the
focus from the window I wanted and generally causes problems.

2) When I log in, a terminal window opens up automatically, as I want it
to, but ls in the terminal doesnt have any colors.  If I later open up
terminal windows, sometimes they have colors, sometimes not.  I have traced
the problem to the fact that for the colorless windows, SHLVL=1 not 2, as
for the ones with color.  Havent a clue why it does this.

There are more, but I will have to save them for another bug.


Comment 1 Matthew Saltzman 2001-02-25 22:55:46 EST
I also see the behavior described in the second part.  Interestingly, it appears
that *some*
of the scripts in /etc/profile.d are being executed and some are not.  In
particular, the variables
set and exported by gnome-ssh-askpass.sh, kde.sh, less.sh and qt.sh are actually
set, but
the aliases created by colorls.sh and which-2.sh are not set.   I tried defining
a variable in
colorls.sh and verified that it was not set.

If I log in on a console, $SHLVL is 1 but colorls.sh is executed.  If the user's
shell is tcsh, the
corresponding .csh files in /etc/profile.d *are* executed.  So this seems to
occur only in the
combination of bash and gnome-terminal started from the Gnome panel in runlevel
5.  I also
note that every other way I can think of to start a terminal (xterm, rxvt, kterm
fro the Gnome 
menu, anything from the comand line, startx from runlevel 3, etc) sets $SHLVL
greater than 1.

For the record, I don't see the behavior described in the first part.  In fact
my mouse cursor
doesn't move at all when I change focus with Alt-Tab.
Comment 2 Havoc Pennington 2001-07-12 14:28:34 EDT
The Alt+Tab thing is a "feature", anyhow it's configurable (look around in the
Sawfish control panels). 

If SHLVL is not 1 then we appear to read /etc/profile from /etc/bashrc.
I don't understand why gnome-session launches terminals with SHLVL of 1.
Investigating that.
Comment 3 Havoc Pennington 2001-07-18 14:35:27 EDT
The problem is basically that gnome-session blows away the environment before
launching apps.
Comment 4 Havoc Pennington 2001-07-19 14:23:32 EDT
*** Bug 37234 has been marked as a duplicate of this bug. ***
Comment 5 Havoc Pennington 2001-07-19 18:15:33 EDT
I was on crack about gnome-session and the empty environment.

The problem is simply that /etc/X11/xdm/Xsession should do:
   exec -l $SHELL -c 'foobar --frobate'
instead of:
   exec foobar

Comment 6 Mike A. Harris 2001-08-19 23:52:44 EDT
Fixed in rawhide for a while now.

Note You need to log in before you can comment on or make changes to this bug.