Bug 20781 - Xsession script should be sure session runs as child of user's shell (as a login shell)
Summary: Xsession script should be sure session runs as child of user's shell (as a lo...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: xinitrc
Version: 7.0
Hardware: i386
OS: Linux
high
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: Dale Lovelace
URL:
Whiteboard:
: 37234 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-11-13 19:39 UTC by dkaplan
Modified: 2007-03-27 03:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-07-19 22:15:39 UTC
Embargoed:


Attachments (Terms of Use)

Description dkaplan 2000-11-13 19:39:48 UTC
Hi,

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

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.

Thanks.

David

Comment 1 Matthew Saltzman 2001-02-26 03:55:46 UTC
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 18:28:34 UTC
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 18:35:27 UTC
The problem is basically that gnome-session blows away the environment before
launching apps.

Comment 4 Havoc Pennington 2001-07-19 18:23:32 UTC
*** Bug 37234 has been marked as a duplicate of this bug. ***

Comment 5 Havoc Pennington 2001-07-19 22:15:33 UTC
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-20 03:52:44 UTC
Fixed in rawhide for a while now.



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