Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1914  / 1 Year ago, sun, may 7, 2023, 6:51:21

How do I install my custom keyboard map and have it start automatically at startup?



The following command works when I run it in a terminal:



xkbcomp -I$HOME/.xkb/ $HOME/.xkb/switch-LALT-LCTL.xkb $DISPLAY


but when I put this into .xinitrc (linked from .xsession just in case), the command is not run. What am I missing? I've spent hours / days searching and trying other 'solutions' but none of these work for me.



Thanks in advance for any help or ideas you may have.


More From » 13.10

 Answers
0

My work around had been to edit the keycodes in /usr/share/X11/xkb/keycodes/evdev and recompile by removing the .xkm files in /var/lib/xkb/ this was not a sound solution as it would break any other keymapings that involved those keycodes. The correct solution:



lightdm-session runs settings found in ~/.xmodmap or ~/.Xkbmap. Normally this would be the way to go and indeed settings put here are run and applied. But currently there is a bug where if you are running Gnome (which is the default in Ubuntu 13.10 - ubuntu desktop). It will override any settings made here.



The solution then becomes to edit the gnome settings that the gnome keyboard plugin is using to override the ones set by lightdm. In particular, to swap LALT and LCTL (for which there is no simple rule already in place), I followed the directions found here: http://www.itniwo.net/blog/v/404398.html



This involves editing (as root) several files in /usr/share/X11/xkb/. The result of this allows for a new option +ctrl(swap_lalt_lctrl) to be added to the keyboard setup using dconf-editor.



A lot of people on the internet were made angry when their xkb and xmodmap configurations suddenly stopped working after upgrading to 13.10. Too bad millions of dollars of time are being wasted diagnosing and working around this :-(. Somebody smart on the gnome side should write something that would honor any existing xkb settings or at least give warning them that they broke them on purpose (silent overrides are hard to find).


[#26395] Monday, May 8, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rryble

Total Points: 489
Total Questions: 121
Total Answers: 119

Location: Marshall Islands
Member since Mon, May 31, 2021
3 Years ago
;