Bug 6885 - xmodmap runs on ~/.Xmodmap *TWICE*
xmodmap runs on ~/.Xmodmap *TWICE*
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: xinitrc (Show other bugs)
6.1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Preston Brown
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-11-10 14:41 EST by Jeff Norden
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-01-11 09:42:44 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jeff Norden 1999-11-10 14:41:34 EST
The RH6.1 /etc/X11/xinit/xinitrc runs xmodmap on
the users .Xmodmap file twice, assuming that the
setxkbmap is not being used.

For many people, this behavior is probably
harmless.  But my .Xmodmap uses keysms (not
keycodes) to swap the caps_lock and the right-hand
control keys.  Running xmodmap twice swaps the
keys twice, which is the same as not swapping them
at all!

The relevant lines from xinitrc (lines 40-60) are
below.  The first 'xmodmap $usermodmap' inside the
XKB_IN_USE conditional is probably the intended
one.  I think the second one was just accidentally
left in the file, and should be deleted.

I almost hate to submit this because xinitrc
currently has zarro boogs :-)

-- /etc/X11/xinit/xinitrc, lines 40-60 --
# xkb and xmodmap don't play nice together
if [ -z $XKB_IN_USE ]; then
    if [ -f $oldsysmodmap ]; then
	xmodmap $oldsysmodmap
    fi

    if [ -f $sysmodmap ]; then
	xmodmap $sysmodmap
    fi

    if [ -f $usermodmap ]; then
	xmodmap $usermodmap
    fi
fi

unset XKB_IN_USE

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi
Comment 1 Preston Brown 2000-01-11 09:42:59 EST
fixed for 6.2.  Thanks for the report.

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