-   Linux - Hardware (
-   -   Voyage Linux: British keyboard mismapping (

Geoff_L 01-04-2013 03:48 PM

Voyage Linux: British keyboard mismapping
I've got a new Voyage Linux command-line only virtual machine running on VirtualBox OSE under Ubuntu 12.04. The keyboard mapping isn't correct and it has the following missmapping (and possibly more):
"\" produces "<"
"|" (shift \) produces ">"
"~" produces "|"
"#" produces "\"
it has the usual US vs UK reversals of '"' and '@', which suggests that the keymap is based on US.

I tried installing console-data, doing dpkg-reconfigure console-data and choosing QWERTY, British to no avail.

Any ideas?

All help gratefully received.

business_kid 01-04-2013 05:17 PM

It's set up for US, by the look of it, or somewhere else anyhow. The Classic one for US is @ instead of " and vice versa. Command line only, check your $LOCALE setting. echo $LOCALE $LC_ALL $LANG
Files in /usr/share/kbd/i386/keymaps/qwerty/ (or something like that). Often configured in init scripts and login files (/etc/profile.d/*). Not unusual to have this stuff set multiple times. If there's a default symlink, change it. Man setfont, I think.

Geoff_L 01-04-2013 05:43 PM

Thanks for responding.

Unfortunately, those environment variables aren't set and /etc/profile.d contains nothing I can see about keyboards. I've found one keymap with a filename that suggests it to be the one to use, but I don't know how to configure the console to use it. Any further help would be welcome.

business_kid 01-05-2013 03:21 AM

so commands like

grep -re 'LANG' -e 'LC_ALL' /etc/profile*
produce nothing? Right then, it's running on defaults. Set LANG in /etc/profile.d
Slackware also has a and a, the latter being a symlink. The defkeymap should point to your default key map. Then simply invoking sefont loads it (I think). Ditto for default font. Both, iirc are settable. Play with setfont until you are happy.

Geoff_L 01-05-2013 04:17 AM

Thanks for sticking with this.

Unfortunately, setfont isn't installed. For info, Linux Voyage is based on Debian Sqeeze rather than Slackware.

Delving a little further turned up some comments in /etc/default/keyboard that suggested adding: KMAP=/usr/share/keymaps/i386/qwerty/uk.kmap.gz to /etc/default/keyboard might do the trick -- but that didn't work, even after rebooting. FWIW, I'm having issues with LAMP also on this distro (a known good application can't connect to MySQL data and doesn't return the expected errors) and having installed various utilties trying to correct the keyboard mapping and resolve other issues, the disk image is getting less and less lightweight. So I might need to look elsewhere. That said, it would still be nice to resolve the issues with this distro, and I'm learning a lot in the process!

Thanks again.

business_kid 01-05-2013 08:32 AM

no setfont. Have you loadkeys?

apt-get install kbd
might do things for you. Worth a shot. For the record, I have Debian squeeze on a machine with the hostname pipsqueak, my raspberry Pi. The total install is under 2 Gig. THAT has setfont, but not loadkeys.

Geoff_L 01-05-2013 09:52 AM

Thanks again.

installing kbd didn't fix the issue. However, doing loadkeys /usr/share/keymaps/i386/qwerty/uk.kmap.gz does give the correct mapping for the current session. So I guess I need to make that permanent, but I don't know where to add that command.

FWIW, the hard disk on the VM is 2GB and includes a swap partition. I chose Voyage Linux because it claims that typical installs weigh in at less than 128MB. However, with LAMP and all the utils I've installed, my installation has grown to over 400MB, which is too much as there's insufficient headroom after the expected data volume is loaded. So I need to strip out everything that isn't strictly necessary once I've got the machine doing what I need it to do.

business_kid 01-06-2013 09:00 AM

add it in /etc/rc.d/???/rc.local

As for stripping out, you can remove the include/ diretories and share/doc as well as any sources, all those spare icons lying about, etc. Have fun

Geoff_L 01-06-2013 03:00 PM

This is a strange distro as /etc/rc.d doesn't exist (I have /etc/rc.local and several /etc/rc?.d directories) so I considered inserting the command into /etc/rc.local -- although that might be overkill as the comment in that file suggests it runs at each runlevel entered. However, after the third session where I issued the command manually, the new keymapping somehow seems to have become permanent. I'm confused, but I guess the issue is solved.

Again, thanks.

business_kid 01-07-2013 03:22 AM

/etc/rc.local will be the place. Never mind the comment. If this is run more than once, the sky doesn't fall in.

Geoff_L 01-07-2013 04:10 AM


Originally Posted by business_kid (Post 4864393)
/etc/rc.local will be the place. Never mind the comment. If this is run more than once, the sky doesn't fall in.

Thanks again for staying with this. For info, while resolving another issue I discovered that Linux Voyage has its own idiosyncrasies and that the best place to insert 'run once on boot' instructions is probably /etc/init.d/voyage-util, which is proprietary to Voyage. That said, I've now created a second VM with this distro and a reproducible way to install the correct keyboard mapping is:
  1. Run apt-get update (needed because almost no repository info is included 'out of the box').
  2. apt-get install kbd
  3. apt-get install console-data
  4. Run loadkeys to installed the preferred mapping. After the previous steps, the mapping files can be found from /usr/share/keymaps/. For example, I ran loadkeys /usr/share/keymaps/i386/qwerty/uk.kmap.gz
Thanks again, and I hope this helps someone else.

All times are GMT -5. The time now is 07:59 AM.