You are not logged in.

#1 2014-02-19 02:46:25

josherick
Member
Registered: 2014-01-12
Posts: 6

.Xmodmap file not loading and not recognized by test

I'm trying to use a custom keymap. I got it set up in the virtual console with loadkeys, but I can't seem to get it to work in X. I'm following xmodmap to remap. I've created a mapping and stored it in `~/.Xmodmap`. When I run `xmodmap ~/.Xmodmap` (in X), it hangs for a few seconds and then loads the keymap correctly. However, I want it to load the keymap automatically when X loads.

The file, in my home directory:

-rw-r--r--  1 joshsherick users 9886 Feb 18 20:53 .Xmodmap

As suggested by the wiki page for the wiki page for xmodmap, I added a conditional run of xmodmap to my `~/.xinitrc`, so it looked like this:

if [ -s ~/.Xmodmap ]; then
    xmodmap ~/.Xmodmap
fi
exec gnome-session

After restarting X, I still had the default keymap. I ran `[sudo] test -s[f][e] ~/.Xmodmap` all of which returned 0, despite the file existing as shown above.

So then I changed my `~/.xinitrc` to:

xmodmap ~/.Xmodmap
exec gnome-session

The default keymap was still loaded when X was restarted, despite it being loaded correctly (after a ~3s lag) when running `xmodmap ~/.Xmodmap` in an X terminal once X has started.

I'm starting X with the `startx` command as the user joshsherick (who also owns the `~/.Xmodmap` file) and using gnome 3.

Does anyone know what could be happening?

Offline

#2 2014-02-19 05:33:31

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,219

Re: .Xmodmap file not loading and not recognized by test

I hear DEs have their own control over keysyms and will override xmodmap (just a guess).  I did a quick search and came upon an old 2012 thread about a related issue to yours. Maybe look at either configuring gnome's keyboard setup

I am not sure if the content is still relevant as many things have changed since 2012 but thought it would be a good for brainstorming. Perhaps someone more knowledgable can provide more info about this.  But in the mean time you can try other methods in mapping your keys.keymap archwiki shxkb

Offline

#3 2014-03-07 20:01:35

aleb
Member
Registered: 2013-10-14
Posts: 17

Re: .Xmodmap file not loading and not recognized by test

Offline

Board footer

Powered by FluxBB