Jump to content

Xmodmap won't load at startup


oshunluvr
 Share

Recommended Posts

This is driving me batty. I have an unsupported keyboard with a few multimedia keys I want to activate for all my users. I got the keycode info via "xev" and edited /etc/X11/Xmodmap to this;

!

! This is the "Xmodmap" file for Standard Keyboards with Windows keys.

!

! If you want to have other keymappings for special X-Terminals, just

! create a "Xmodmap.${DISPLAY}" file with the according changes.

!

 

keycode 22 = BackSpace

keycode 115 = F13

keycode 116 = XF86Launch0

keycode 117 = Menu

keycode 144 = XF86AudioPrev

keycode 153 = XF86AudioNext

keycode 160 = XF86AudioMute

keycode 162 = XF86AudioPlay

keycode 164 = XF86AudioStop

keycode 174 = XF86AudioLowerVolume

keycode 176 = XF86AudioRaiseVolume

keycode 178 = XF86HomePage

keycode 223 = XF86LogOff

keycode 230 = XF86Favorites

keycode 233 = XF86Forward

keycode 234 = XF86Back

keycode 236 = XF86Mail

and I added this to /etc/X11/init/initrc "xmodmap /etc/X11/Xmodmap".

 

All of this does nothing. I have put the xmodmap statement above and below the "exec /etc/X11/Xsession $" line with and without a space. I have put a script file in my own home directory under Autostart in kde with "xmodmap /etc/X11/Xmodmap" - still nothing.

If I enter the keycodes manually via konsole (i.e. xmodmap -e 'keycodeXXX=XF86Command') the

keys work fine. If I manually execute the initrc script after logging in to X - the keys all work. If I manually launch the script in my Autostart directory, they all work. There is not a .initrc or .Xmodmap file in my home directory.

 

Any answers????

Link to comment
Share on other sites

These settings seem to need some "extended" keyboard variant defined in /etc/X11/xorg.conf. Checkout what you use there.

Also, some of them may not be likeable by your current locale settings (although my limited experience fails to see which one ATM). What's the output of a

locale -a

under a console?

Edited by scarecrow
Link to comment
Share on other sites

[stuart@localhost ~]$ locale -a

C

CP1251

en

en_AU

en_AU.ISO-8859-1

en_AU.UTF-8

en_BE

en_BE.ISO-8859-1

en_BE.ISO-8859-15

en_BE.UTF-8

en_BW

en_BW.ISO-8859-1

en_BW.UTF-8

en_CA

en_CA.ISO-8859-1

en_CA.UTF-8

en_DK

en_DK.ISO-8859-1

en_DK.UTF-8

en_GB

en_GB.ISO-8859-1

en_GB.UTF-8

en_HK

en_HK.ISO-8859-1

en_HK.UTF-8

en_IE

en_IE.ISO-8859-1

en_IE.ISO-8859-15

en_IE.UTF-8

en_IN

en_IN.UTF-8

en_NG

en_NG.UTF-8

en_NZ

en_NZ.ISO-8859-1

en_NZ.UTF-8

en_PH

en_PH.ISO-8859-1

en_PH.UTF-8

en_SG

en_SG.ISO-8859-1

en_SG.UTF-8

en_US

en_US.ISO-8859-1

en_US.UTF-8

en_ZA

en_ZA.ISO-8859-1

en_ZA.UTF-8

en_ZW

en_ZW.ISO-8859-1

en_ZW.UTF-8

ISO-8859-1

ISO-8859-10

ISO-8859-13

ISO-8859-14

ISO-8859-15

ISO-8859-2

ISO-8859-3

ISO-8859-4

ISO-8859-5

ISO-8859-7

ISO-8859-9

KOI8-R

KOI8-U

POSIX

UTF-8

Thats the locale -a output, but like I said, the keycode settings and keys work fine but only if I enter them manually or launch the scripts manually. I even put the xmod command in /etc/rc.d/rc.local to no avail. I was hoping I had some syntax or speling error. Plus all the docs I've read say the Xmapmods are loaded after xorg.conf, meaning the definitions there are somewhat not at issue. Just incase they are -

Section "InputDevice"

Identifier "Keyboard1"

Driver "keyboard"

Option "XkbModel" "pc105"

Option "XkbLayout" "us"

Option "XkbOptions" "compose:rwin"

EndSection

Edited by oshunluvr
Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...