~/.Xmodmap gets loaded only by gdm (and not by kdm or startx)

Bug #373260 reported by Akos Ladanyi
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kdebase (Ubuntu)
Invalid
Undecided
Unassigned
kubuntu-default-settings (Ubuntu)
Fix Released
Wishlist
Harald Sitter
xinit (Ubuntu)
Triaged
Low
Unassigned

Bug Description

~/.Xmodmap is loaded by gdm only, and not if you start X any other way (by kdm or startx for example).

For a good example please see Fedora, where a single shell script loads .Xmodmap, .Xkbmap, .Xresources, etc., which is utilized by all display managers and xinit.

affects: gnome-settings-daemon (Ubuntu) → ubuntu
Revision history for this message
Akos Ladanyi (akos-ladanyi) wrote :

Sorry, I was wrong. This is a Kubuntu only bug.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please answer these questions:

 * Is this reproducible?
 * If so, what specific steps should we take to recreate this bug?
 * Do you get the issue using a new user?
 This will help us to find and resolve the problem.

affects: ubuntu → gnome-settings-daemon (Ubuntu)
Changed in gnome-settings-daemon (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: New → Incomplete
affects: gnome-settings-daemon (Ubuntu) → ubuntu
affects: ubuntu → gnome-settings-daemon (Ubuntu)
affects: gnome-settings-daemon (Ubuntu) → ubuntu
affects: ubuntu → gnome-settings-daemon (Ubuntu)
Revision history for this message
Akos Ladanyi (akos-ladanyi) wrote :

 * Is this reproducible?
Yes.

 * If so, what specific steps should we take to recreate this bug?
Log out if you are logged in.
Log in using KDM.
See that the key mappings defined in .Xmodmap are not applied.
Run 'xmodmap ~/.Xmodmap'.
See that the key mappings defined in .Xmodmap are now working.

 * Do you get the issue using a new user?
Yes.

Revision history for this message
Akos Ladanyi (akos-ladanyi) wrote :

 - My keyboard has en_GB layout.
 - xorg.conf has no settings related to keyboard (actually it is not modified in any other way either).
 - This is a new install of Kubuntu 9.04.
 - 'xmodmap -verbose ~/.Xmodmap' prints the following:

! /home/akos/.Xmodmap:
! 1: keycode 19 = 0 parenright odiaeresis Odiaeresis
        keycode 0x13 = 0 parenright odiaeresis Odiaeresis
! 2: keycode 20 = minus underscore udiaeresis Udiaeresis
        keycode 0x14 = minus underscore udiaeresis Udiaeresis
! 3: keycode 21 = equal plus oacute Oacute
        keycode 0x15 = equal plus oacute Oacute
! 4: keycode 34 = bracketleft braceleft odoubleacute Odoubleacute
        keycode 0x22 = bracketleft braceleft odoubleacute Odoubleacute
! 5: keycode 35 = bracketright braceright uacute Uacute
        keycode 0x23 = bracketright braceright uacute Uacute
! 6: keycode 51 = numbersign asciitilde udoubleacute Udoubleacute
        keycode 0x33 = numbersign asciitilde udoubleacute Udoubleacute
! 7: keycode 47 = semicolon colon eacute Eacute
        keycode 0x2f = semicolon colon eacute Eacute
! 8: keycode 48 = apostrophe at aacute Aacute
        keycode 0x30 = apostrophe at aacute Aacute
! 9: keycode 61 = slash question iacute Iacute
        keycode 0x3d = slash question iacute Iacute
! 10: keysym ISO_Level3_Shift = Mode_switch
! Keysym ISO_Level3_Shift (0xfe03) corresponds to keycode(s) 0x5c 0x6c
        keycode 0x6c = Mode_switch
        keycode 0x5c = Mode_switch
! 11: remove Lock = Caps_Lock
! Keysym Caps_Lock (0xffe5) corresponds to keycode(s) 0x42
        remove lock = 0x42
! 12: keysym Caps_Lock = Control_L
! Keysym Caps_Lock (0xffe5) corresponds to keycode(s) 0x42
        keycode 0x42 = Control_L
! 13: add Control = Control_L
        add control = Control_L
!
! executing work queue
!
        keycode 0x13 = 0 parenright odiaeresis Odiaeresis
        keycode 0x14 = minus underscore udiaeresis Udiaeresis
        keycode 0x15 = equal plus oacute Oacute
        keycode 0x22 = bracketleft braceleft odoubleacute Odoubleacute
        keycode 0x23 = bracketright braceright uacute Uacute
        keycode 0x33 = numbersign asciitilde udoubleacute Udoubleacute
        keycode 0x2f = semicolon colon eacute Eacute
        keycode 0x30 = apostrophe at aacute Aacute
        keycode 0x3d = slash question iacute Iacute
        keycode 0x6c = Mode_switch
        keycode 0x5c = Mode_switch
        remove lock = 0x42
        keycode 0x42 = Control_L
        add control = Control_L

 - Attached the .Xmodmap file.

Revision history for this message
Sebastien Bacher (seb128) wrote :

do you use GNOME or not? the description says you get the issue on both desktop environments?

Revision history for this message
Akos Ladanyi (akos-ladanyi) wrote :

No, this happens only with KDE. When I wrote the description I remembered that it happend on my other machine too - which runs GNOME - but this is not the case. This is the reason why I added my first comment. Now I changed the description too.

description: updated
Revision history for this message
Sebastien Bacher (seb128) wrote :

reassigning to kde

affects: gnome-settings-daemon (Ubuntu) → kdebase (Ubuntu)
Changed in kdebase (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: Incomplete → New
Revision history for this message
gedge (justin-gedge) wrote :

I've seen this issue as well. I've just installed kubuntu 9.04 [previously running kubuntu 7.10]. The test case I have may be a little easier to run. I use .Xmodmap to swap the CAPS and CTRL keys to resemble a Sun keyboard. My .Xmodmap file follows:

<---- [.Xmodmap] ---->
remove Lock = Caps_Lock
remove Control = Control_L
keysym Caps_Lock = Control_L
keysym Control_L = Caps_Lock
add Lock = Caps_Lock
add Control = Control_L
</---- [.Xmodmap] ---->

If you put this file in your home account- logout- then back in- your CAPS-LCK and LEFT-CTRL keys should be swapped. The caps lock light on your keyboard should now be toggled with the CTRL key.

Revision history for this message
Akos Ladanyi (akos-ladanyi) wrote :

Actually this is not really a bug: this is simply not implemented. In case of Ubuntu gdm runs xmodmap, in case of Kubuntu nothing. I guess the proper solution would be that /etc/X11/Xsession would process ~/.Xmodmap instead of gdm, like it does with all similar files (like ~/.Xresources, ~/.xsessionrc, etc.). Maybe this bug needs to be reassigned to the gdm and/or X maintainers.

Revision history for this message
gedge (justin-gedge) wrote : Re: [Bug 373260] Re: ~/.Xmodmap does not get loaded

any tips- I'm not familliar with the /etc/X11/Xsession file. It looks like
a standard bourne shell script- I'm jsut not sure what command I need to
call to parse .Xmodmap?

On Thu, Jun 11, 2009 at 12:33 PM, Akos Ladanyi <email address hidden>wrote:

> Actually this is not really a bug: this is simply not implemented. In
> case of Ubuntu gdm runs xmodmap, in case of Kubuntu nothing. I guess the
> proper solution would be that /etc/X11/Xsession would process ~/.Xmodmap
> instead of gdm, like it does with all similar files (like ~/.Xresources,
> ~/.xsessionrc, etc.). Maybe this bug needs to be reassigned to the gdm
> and/or X maintainers.
>
> --
> ~/.Xmodmap does not get loaded
> https://bugs.launchpad.net/bugs/373260
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in “kdebase” source package in Ubuntu: New
>
> Bug description:
> ~/.Xmodmap does not get loaded on Kubuntu 9.04. When manually executing
> 'xmodmap ~/.Xmodmap' the key mappings get loaded properly.
>

affects: kdebase (Ubuntu) → xinit (Ubuntu)
description: updated
summary: - ~/.Xmodmap does not get loaded
+ ~/.Xmodmap gets loaded only by gdm (and not by kdm or startx)
description: updated
Bryce Harrington (bryce)
tags: added: kubuntu
Revision history for this message
Daniel Hahler (blueyed) wrote :

It should be sourced in Kubuntu via /etc/X11/Xsession.d/80kubuntu-xmodmap (package kubuntu-default-settings), similar to /etc/X11/Xsession.d/80ubuntu-xmodmap..

wait.. /etc/X11/Xsession.d/80ubuntu-xmodmap is from kdebase-bin..

And, both files appear to get not shipped at all anymore.. they are only mentioned in the debian/changelog files of kubuntu-default-settings and kdebase-bin.

This should get fixed.. either by re-adding them, or removing them as obsolete conffiles (if another method should get used to source ~/.Xmodmap).

Revision history for this message
Akos Ladanyi (akos-ladanyi) wrote :

Any news on this?

Changed in kdebase (Ubuntu):
status: New → Invalid
Changed in kubuntu-default-settings (Ubuntu):
assignee: nobody → Harald Sitter (apachelogger)
importance: Undecided → Wishlist
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kubuntu-default-settings - 1:10.04ubuntu6

---------------
kubuntu-default-settings (1:10.04ubuntu6) lucid; urgency=low

  * Only add the battery applet to Plasma when there is a battery
  * Set desktop:/ as default url for folderview (needs patch
    for folderview to support configChanged())
  * Readd 80kubuntu-xmodmap to Xsession.d (LP: #373260)
 -- Harald Sitter <email address hidden> Sun, 21 Feb 2010 17:39:25 +0100

Changed in kubuntu-default-settings (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Bryce Harrington (bryce) wrote :

Hi Akos,

        Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Can you try with the latest development release of Ubuntu? (ISO CD images are available from http://cdimage.ubuntu.com/releases/)

        If it remains an issue, could you also attach a new /var/log/Xorg.0.log?
        Thanks in advance.

    [This is an automated message. Apologies if it has reached you inappropriately; please just reply to this message indicating so.]

tags: added: needs-verification
Changed in xinit (Ubuntu):
status: New → Incomplete
Revision history for this message
Bryce Harrington (bryce) wrote :

We're closing this bug since it is has been some time with no response from the original reporter. However, if the issue still exists please feel free to reopen with the requested information. Also, if you could, please test against the latest development version of Ubuntu, since this confirms the bug is one we may be able to pass upstream for help.

Changed in xinit (Ubuntu):
status: Incomplete → Expired
Revision history for this message
odoncaoa (odonncaoa) wrote :
Download full text (4.9 KiB)

#1 Akos Ladanyi wrote on 2009-05-07:
    Sorry, I was wrong. This is a Kubuntu only bug.
#13 aunchpad Janitor wrote on 2010-02-21:
    This bug was fixed in the package kubuntu-default-settings - 1:10.04ubuntu6
#14 Bryce Harrington wrote on 2010-07-02:
    If it remains an issue, could you also attach a new /var/log/Xorg.0.log?

I've installed, and have been using lubuntu 10.04 (with LXDE) for the desktop. As, the problem exhibits itself exactly as in comment #1, then I submit that it, actually has not been fixed, it still persists, and it remains an issue.

Not being able to swap Ctrl, and CapsLock IS ---> Painful. Please refer to the attached.

Cheers

System keymaps upon login:

 Caps_Lock 66 <---> x42
 Control_L 37 <---> x25

$ xmodmap -pke
keycode 37 = Control_L NoSymbol Control_L
keycode 66 = Caps_Lock NoSymbol Caps_Lock

$ xmodmap -pm
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

Caps_Lock key before any changes (upon login):
KeyPress event, serial 36, synthetic NO, window 0x1a00001,
root 0xfd, subw 0x0, time 460812, (144,376), root:(1041,417),
state 0x0, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 39, synthetic NO, window 0x1a00001,
root 0xfd, subw 0x0, time 460937, (144,376), root:(1041,417),
state 0x2, keycode 66 (keysym 0xffe5, Caps_Lock), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
--
Control key before any changes (upon login):
KeyPress event, serial 36, synthetic NO, window 0x1c00001,
root 0xfd, subw 0x0, time 1513472, (-285,618), root:(845,659),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 39, synthetic NO, window 0x1c00001,
root 0xfd, subw 0x0, time 1513583, (-285,618), root:(845,659),
state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False

---
Apply KeymapKeysym changes:

 odoncaoa@waterford$ xmodmap -e "remove Lock = Caps_Lock"; xmodmap -pm
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

 odoncaoa@waterford$ xmodmap -e "remove Control = Control_L"; xmodmap -pm
shift Shift_L (0x32), Shift_R (0x3e)
lock
control Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xc...

Read more...

Revision history for this message
odoncaoa (odonncaoa) wrote :

Oh, yeah ... nada !!!

odoncaoa@waterford$ xpm
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

/home/odoncaoa
odoncaoa@waterford$ xmodmap .Xmodmap

/home/odoncaoa
odoncaoa@waterford$ xpm
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x25)
control Control_L (0x42), Control_R (0x69)
mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x85), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf)
mod5 ISO_Level3_Shift (0x5c), Mode_switch (0xcb)

odoncaoa@waterford$ cat .Xmodmap
remove Lock = Caps_Lock
remove Control = Control_L
keysym Caps_Lock = Control_L
keysym Control_L = Caps_Lock
add Lock = Caps_Lock
add Control = Control_L

Revision history for this message
Thomas (t-hartwig) wrote :

Please reopen this bug. It is not fixed in latest KDE of Natty. Will report my environment shortly.

Revision history for this message
Thomas (t-hartwig) wrote :

As stated before in the following environment the problem still persists.
I have attached 80kubuntu-xmodmap. It looks quite well.

DistroRelease: Ubuntu 11.04
Package: kdebase-runtime 4:4.6.0-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.38-4.31-generic-pae 2.6.38-rc5
Uname: Linux 2.6.38-4-generic-pae i686
Architecture: i386
Date: Sun Feb 20 22:20:47 2011
InstallationMedia: Ubuntu 10.04 "Lucid Lynx" - Alpha i386 (20100308)
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.utf8
 LC_MESSAGES=en_US.utf8
 SHELL=/usr/bin/zsh
SourcePackage: kdebase-runtime

Revision history for this message
Daniel Hahler (blueyed) wrote :

Re-opening according to latest comments.

Changed in xinit (Ubuntu):
status: Expired → Triaged
Changed in kubuntu-default-settings (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Harald Sitter (apachelogger) wrote :

Just tested on quantal works perfectly with KDM. That said... 2 requirements: a) KDM must be used b) kubuntu-default-settings must be installed.

Changed in kubuntu-default-settings (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.