You are not logged in.
I want to automatically load my custom .Xmodmap when logging in.
For reference I am using GNOME and GDM.
cat $HOME/.Xmodmap
! xev --> find the correct key code
! xmodmap -pke > .Xmodmap --> store current map
! xmodmap ~/.Xmodmap --> load map for testing
keycode 66 = ISO_Level3_Shift ISO_Level3_Shift
keycode 30 = u U u U BackSpace BackSpace
keycode 31 = i I i I bracketleft bracketleft
keycode 32 = o O o O bracketright bracketright
keycode 43 = h H h H Return Return
keycode 44 = j J j J Escape Escape
keycode 45 = k K k K braceleft braceleft
keycode 46 = l L l L braceright braceright
keycode 57 = n N n N asciitilde asciitildeI added debug-output to /etc/gdm/Xsession.
Therefore I know that the marked line of /etc/gdm/Xsession is executed
# xkb and xmodmap don't play nice together
if [ -z "$XKB_IN_USE" ]; then
if [ -f "$rh6sysmodmap" ]; then
xmodmap "$rh6sysmodmap"
fi
if [ -f "$sysmodmap" ]; then
xmodmap "$sysmodmap"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap" ####### is executed and points to my file
fi
fiFor some reason my Xmodmap takes no effect.
Yet when I manually load it the keys are as expected.
It appears as if something changes the keys back.
Note: I also tried loading my key setup via xmodmap in .xinitrc, .xprofile and .profile.
Last edited by mat69 (2018-08-06 21:28:13)
Offline
Most likely by gnome, because the file is executed before gnome is started which will then apply its keyboard settings what's gonna nuke your modmap.
Rather put this into some autostart service/script.
Offline
Thank you. That does the trick.
Offline