LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-04-2013, 03:48 PM   #1
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Rep: Reputation: Disabled
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.

Last edited by Geoff_L; 01-06-2013 at 03:01 PM. Reason: To mark as solved
 
Old 01-04-2013, 05:17 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,293

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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.
 
Old 01-04-2013, 05:43 PM   #3
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-05-2013, 03:21 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,293

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
so commands like
Quote:
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 defkeymap.map.gz and a ko.map.gz, 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.
 
Old 01-05-2013, 04:17 AM   #5
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-05-2013, 08:32 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,293

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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.
 
Old 01-05-2013, 09:52 AM   #7
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-06-2013, 09:00 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,293

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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

Last edited by business_kid; 01-06-2013 at 09:02 AM.
 
Old 01-06-2013, 03:00 PM   #9
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
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.
 
Old 01-07-2013, 03:22 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,293

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
/etc/rc.local will be the place. Never mind the comment. If this is run more than once, the sky doesn't fall in.
 
Old 01-07-2013, 04:10 AM   #11
Geoff_L
Member
 
Registered: Jan 2013
Posts: 42

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
/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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to use IP Tables in Linux Voyage Version: 0.7 Wynman? Linux - Server 3 07-05-2012 10:50 AM
Voyage Linux on Alix.2D2 board nydiow Linux - Embedded & Single-board computer 1 11-12-2010 12:38 PM
[SOLVED] Unable to install FFMPEG on voyage linux voyage-linux-noob Linux - Software 1 10-30-2010 07:34 AM
My Maiden Voyage With Linux/Ubuntu turbogrub LinuxQuestions.org Member Intro 1 08-23-2009 09:09 AM
Problem with foreign keys on a British layout keyboard eBopBob SUSE / openSUSE 1 06-03-2006 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration