I’ve modified a few keyboard mappings with the command “setxkbmap us_de” and that works fine whenever run through a terminal but I’d like to make it permanent. Put the command in boot.local but nothing happens: is this because it’s run too early in the boot process, or because the full path to us_de is required?
The alternative method, using the “skeleton” file, that I’ve read about seems rather complicated…
# Here you should add things, that should happen directly after booting
# before we're going to the first run level.
Those comments tell you when it’s run. Even before the first runlevel, that means definitely no X server is running (level 5).
That’s what I suspected. So how do I run it later? Is the complicated “skeleton” procedure really my only option?
There are some files that are executed during X server startup. Is it something you want to apply to every instance of X running on your machine?
Yes. As indicated above, it simply modifies the standard keyboard mapping.
If you are running KDE4, simplest would probably to put a script in ~/.kde4/Autostart/. This can be a link to a common script somewhere else.
In fact it may be simpler than that. If you look at /usr/share/kde4/config/kdm/kdmrc you will see that it calls /etc/X11/xdm/Xsetup. Reading through that, around line 211 you will see that if /etc/X11/Xkbmap exists, it will get sent to setxkbmap. So all you have to do is put your mapping in /etc/X11/Xkbmap. You will also see that there are different Xkbmaps that can be used for different kinds of X sessions, but presumably you only care about the one on the console.
Hmmm. Put the following script
#!/bin/bash
setxkbmap us_de
into ~/.kde/autostart/ as us_de.sh and it didn’t work.
As to your second suggestion, my kdmrc contains no references to Xkbmap or setxkbmap around line 211, or anywhere else for that matter. Nor does /etc/X11/Xkbmap exist…
It’s not your kdmrc, it’s the system one, I already showed you the full path. And it’s not kdmrc anyway, it’s /etc/X11/xdm/'Xsetup that refers to setxkbmap.
You have to create /etc/X11/Xkbmap to be a link or a copy of your us_de.
Also if you are running KDE4, it’s ~/.kde4/Autostart. And make sure the file is executable (chmod 755 …)
Get some spectacles, mate.
Making the script executable did indeed make the difference!
Already have glasses, although the optician sent me a reminder only the other day to have an eye test. You may have a point
Thanks for your help.
Dears,
i want to add some keyboard mapping too to X configuration. I have added them to /etc/X11/Xmodmap and when i run
xmodmap /etc/X11/Xmodmap
as root it works well. but i want to make it permanent. where should i add this command to be executed after X initialization?
i note that i want this to be available on the whole system. ( all ttys with X )
Thanks!!