**NOTE** January 2022 - Changes to Gstreamer and Pipewire packages from PackmanPlease read the following thread about the current changes
-
Startup command in /etc/init.d/boot.local?
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...
-
Re: Startup command in /etc/init.d/boot.local?
Code:
# 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).
-
Re: Startup command in /etc/init.d/boot.local?
That's what I suspected. So how do I run it later? Is the complicated "skeleton" procedure really my only option?
-
Re: Startup command in /etc/init.d/boot.local?
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?
-
Re: Startup command in /etc/init.d/boot.local?
Yes. As indicated above, it simply modifies the standard keyboard mapping.
-
Re: Startup command in /etc/init.d/boot.local?
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.
-
Re: Startup command in /etc/init.d/boot.local?
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.
-
Re: Startup command in /etc/init.d/boot.local?
Hmmm. Put the following script
Code:
#!/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...
-
Re: Startup command in /etc/init.d/boot.local?
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.
-
Re: Startup command in /etc/init.d/boot.local?
Making the script executable did indeed make the difference!
 Originally Posted by ken_yap
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. 
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|