Bug 132898 - tcsh-users get always kde session no matter what they choose in kdms session menu
Summary: tcsh-users get always kde session no matter what they choose in kdms session ...
Status: RESOLVED FIXED
: 131223 (view as bug list)
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: unspecified
Hardware: Other SuSE Linux 10.0
: P5 - None : Normal
Target Milestone: ---
Assignee: Dr. Werner Fink
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-09 10:31 UTC by Rainer Krienke
Modified: 2006-01-09 17:32 UTC (History)
1 user (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Krienke 2005-11-09 10:31:19 UTC
A user who has a tcsh or csh as his login session can only start a KDE session from kdm. 

I found the reason for this in /usr/X11R6/lib/X11/xdm/sys.xsession in this script in line 54 this happens:

case "$SHELL" in
*/csh|*/tcsh)
    while read env ; do
        var="${env%%=*}" ; val="${env#*=}"
        test "$var" = "umask"  && umask $val
        test "$var" = "$val"   && continue
        eval export $var="\$val"
    done < <($SHELL -c 'test -r /etc/csh.login && source /etc/csh.login;
                        test -r $HOME/.login   && source $HOME/.login  ;
                        printenv; echo -n umask=; umask')
    ;;
esac

Actually $SHELL -c start a new tcsh or csh depending on the users shell. This finally will source /etc/profile.d/profile.csh and in this script the variable WINDOWMANAGER is set a new to the default windowmanager which usually is kde. Becvause of the code from above in sys.xsession the new setting for WINDOWMANGER from profile.csh is afterwards also exported to sys.xsession and so the script always starts a kde session.

The code in /etc/profile.d/profile.csh the resets the WINDOWMANGER variable (which should not happen if called from sys.xsession) is the following:

foreach val ($path /usr/X11R6/bin /opt/gnome/bin /usr/openwin/bin)
    if ( ${val:q} =~ *.* ) continue
    set val=${val:q}/${default_wm:q}
    if ( ! -x ${val:q} ) continue
    setenv WINDOWMANAGER ${val:q}   # <-------- it happens here
    break
end
Comment 1 Dr. Werner Fink 2005-11-09 10:52:29 UTC
Yep is known and fixed for next release.  Also I've changed the
scheme how the users login SHELL is executed.  With 10.1 I use
the users login SHELL directly to execute sys.xsession.
Comment 2 Stephan Kulow 2006-01-09 17:32:12 UTC
*** Bug 131223 has been marked as a duplicate of this bug. ***