Hi all. I know this is an odd question, but I'm hoping someone else out there knows how to do this.

I've just installed Kubuntu 7.10 (which I like), but Debian seems to have messed around with the startup a bit...

I've replaced my /etc/console-setup/ file with one that changes my Caps_Lock into a Control key and the "Windows" Super_L into Caps_Lock (yeah, I do use caps now and again).

I've tested my new mapping with sudo loadkeys, and it works fine, but Kubuntu doesn't seem to find it when booting up!!??

I know I can do this with X. The point is that I don't want to. I want my keyboard modifications whether or not X is running.

I've been googling for a couple days now without useful advice. I'm not a unix guru, but I'm not exactly a neophyte either. Is there anyone out there that knows how to make Kubuntu behave?

Dani AI

Generated

— quick, practical summary that fills the gap in the thread; — your links are useful background but here's a more integrated, Debian/Ubuntu‑style approach that survives updates and boots early.

Put short: make your custom translations part of console-setup so they get compiled into the system cached keymap and (if you need it for the early initramfs stage) regenerate the initrd. For persistent, upgrade‑safe remaps add the keycode lines to /etc/console-setup/remap.inc and let setupcon regenerate the cached keymap; setupcon is the tool that builds and installs the console keymap files used at boot. ()

A minimal workflow to apply and verify:

# edit /etc/console-setup/remap.inc (append your keycode lines)
sudo setupcon --save-only
sudo update-initramfs -u -k all   # include the new cached keymap in initrd(s)
lsinitramfs /boot/initrd.img-$(uname -r) | grep kmap
sudo systemctl status console-setup.service

Running setupcon writes the cached keymap used by the normal boot sequence; update-initramfs copies that file into the initramfs so the mapping is available before userspace (important for encrypted‑root passphrases). Use the lsinitramfs check to confirm the map ended up inside the initrd. (manpages.debian.org)

Notes and gotchas: older helpers such as install-keymap write /etc/console/boottime.kmap.gz and may still work on some installs, but Ubuntu/Debian initramfs hooks differ between releases and may instead expect the cached console-setup file (naming can vary, e.g. cachedUTF-8*.kmap.gz). If the passphrase prompt still sees a US map, either rebuild the initrd after setupcon or create the small symlink to the cached filename the initramfs hook expects. Check the console-setup/keyboard units if the map isn’t being applied at the right time. (manpages.debian.org)

This keeps your custom mapping under package-managed infrastructure (so updates won’t silently clobber it) and puts the mapping into the early boot environment when needed.

Recommended Answers

All 4 Replies

Actually, I missed that one. Its a nice link. Unfortunately, it doesn't help...

I've got a functional keymap, and it is in the correct place, but Kubuntu doesn't seem to pay it any attention on boot.

I could just stick a loadkeys command in one of the startup scripts, but the problems with that are two-fold: the next update could clobber any changes I make; and loadkeys needs to be called pretty early in the boot process, but not too early. These two problems are at odds with any simple change I could make...

So I was just wondering if anyone knew the "Debian/Kubuntu approved way" of telling the init process how to use the keymap.

Alas.

Heh, I appreciate your efforts to help.

Alas, I've done both things suggested in those threads.

The dpkg-reconfigure script is useful for changing to a pre-defined keyboard layout.
The install-keymap script is rather crude, and puts the result in the wrong place anyway...
:-/

Fooey. :confused:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.