Bug 10322

Summary: Missing " in /etc/X11/xdm/.Xsession
Product: [Retired] Red Hat Linux Reporter: horms
Component: XFree86Assignee: Preston Brown <pbrown>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: mw
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-05-30 16:51:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description horms 2000-03-24 00:54:00 UTC
There are missing " around $XKB_IN_USE in /etc/X11/xdm/.Xsession.
This is quite amusing as a -z test is being done, impling
that there is a chance that the variable may be empty, but the "
are still missing. The result of this is, amongst other things,
that a users .xession will never be executed.

Here is a patch.

--- Xsession.orig       Fri Mar 24 11:49:07 2000
+++ Xsession    Fri Mar 24 11:49:17 2000
@@ -28,6 +28,7 @@
 oldsysresources=/etc/X11/xinit/.Xresources
 oldsysmodmap=/etc/X11/xinit/.Xmodmap

+
 # merge in
defaults
 if [ -f "$oldsysresources" ]; then
     xrdb -merge "$oldsysresources"
@@ -52,7 +53,7 @@
     XKB_IN_USE=yes
 fi

-if [ -z $XKB_IN_USE -a ! -L /etc/X11/X ]; then
+if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
     if grep '^exec.*/Xsun' /etc/X11/X > /dev/null 2>&1 && [ -f
/etc/X11/XF86Config ]; then
        xkbsymbols=`sed -n -e 's/^[     ]*XkbSymbols[
]*"\(.*\)".*$/\1/p'`
        if [ -n "$xkbsymbols" ]; then
@@ -63,7 +64,7 @@
 fi

Comment 1 Nalin Dahyabhai 2000-03-27 12:58:59 UTC
This appears to be already fixed in xinitrc-2.9-1:

nalin@blade:~/projects/rp3> grep XKB /etc/X11/xinit/xinitrc
    XKB_IN_USE=yes
    XKB_IN_USE=yes
if [ -z "$XKB_IN_USE" -a ! -L /etc/X11/X ]; then
	    XKB_IN_USE=yes
if [ -z "$XKB_IN_USE" ]; then
unset XKB_IN_USE

Please verify that you have an unmodified version of the xinitrc file,
and that you are using the latest version.

Comment 2 Nalin Dahyabhai 2000-03-27 13:00:59 UTC
Ouch, checked the wrong file.  Verified as a problem in XFree86-3.3.6-20.

Comment 3 mw 2000-03-31 22:00:59 UTC
*** Bug 10495 has been marked as a duplicate of this bug. ***

Comment 4 mw 2000-03-31 22:05:59 UTC
I do not see sysxkbmap and userxkbmap defined anywhere in
/etc/X11/xdm/Xsession.  So perhaps do

userxkbmap=$HOME/.Xkbmap
sysxkbmap=/etc/X11/xinit/Xkbmap

Mate

Comment 5 randolph 2000-04-28 08:56:59 UTC
Also seen here.

Comment 6 Miloslav Trmac 2000-05-08 21:22:59 UTC
While somebody's modifying this, it might not be a bad idea to
take the keyboard handling common to both /etc/X11/{xinit/xinitrc,xdm/Xsession}
to some other file (/etc/X11/xinit/xkbrc ?) and include it from both.
This would prevent fixing one file and leaving the other alone (as
already pointed out, xinitrc is OK, while Xsession is not).

Comment 7 Preston Brown 2000-05-30 16:51:59 UTC
fixed in an X errata coming out this week.  For our next release, we will unify
xinitrc/Xsession handling of common tasks.

*** This bug has been marked as a duplicate of 10619 ***