Using Mepis 8, I'm trying to enable a key on my keyboard that has a keycode but no keysym.
I found a number of online descriptions of the process, such as
http://cweiske.de/howto/xmodmap/allinone.html
or
http://www.mepis.org/docs/en/index.php/Extra_keys
I created both /etc/X11/Xmodmap and ~/.Xmodmap with the keycode lines I need. If I manually give the command
xmodmap ~/.Xmodmap
then those keys work for the rest of that session. But I can't find a way to make it automatic for every session. That Mepis page I linked implies simply having /etc/X11/Xmodmap would make it automatic, but it doesn't.
Many places I looked this up suggest editing various forms of
if statement into Xsession to run one of the commands
/usr/bin/xmodmap ~/.Xmodmap
or
/usr/bin/xmodmap /etc/X11/Xmodmap
Xsession isn't any of the places any of those pages say it should be, such as
$KDEDIR/share/config/kdm/Xsession
I am using KDE, but so far as I can tell, there is no $KDEDIR environment variable defined anywhere. I also can't find a share/config/kdm directory anywhere, and I searched the whole hard drive for Xsession files and found only two (one of which invokes the other).
I tried the various
if constructs in those files and nothing did anything. Then I removed the
if construct (in case that part was wrong) and did a bare
/usr/bin/xmodmap /etc/X11/Xmodmap
and that did nothing. I tried (still in the Xsession file)
/usr/bin/xmodmap /etc/X11/Xmodmap > /etc/X11/Xmodmap.log
to try to see if there was any output to explain the lack of effect. That made graphical login stop working. I'm confused about why, but at least it tells me the Xsession file I'm editing is used during graphical login. (I'm really inept at non GUI Linux use, but I managed to use nano to remove the
> /etc/X11/Xmodmap.log and regain GUI login.)
I also tried creating a ~/.bashrc file containing
/usr/bin/xmodmap ~/.Xmodmap
but that made no difference.
Typing that command in a konsole window after each login always enables the keys, but nothing I've found to automate the process does anything.