LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-24-2011, 11:54 AM   #1
Josh000
Member
 
Registered: Aug 2009
Distribution: Slackware 13 64bit
Posts: 534

Rep: Reputation: 35
How to get a US keymap in X?


in 13.0 I remember I had to setup some HAL stuff to get a UK keyboard.

Now I have upgraded to 13.1 and my keyboard has been replaced with a US keyboard, so I would like to change the keymap to match.


From what I have found when reading X no longer uses HAL? In which case, how would I change the keymap?

AFAIK, I am not using an xorg config file.
 
Old 02-24-2011, 12:00 PM   #2
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Code:
setxkbmap gb
 
Old 02-24-2011, 12:18 PM   #3
Josh000
Member
 
Registered: Aug 2009
Distribution: Slackware 13 64bit
Posts: 534

Original Poster
Rep: Reputation: 35
I guess you mean setxkbmap us


There isn't a more permanant solution? I know I could put that in my xinitrc but I thought there would be a more permanant way.
 
Old 02-24-2011, 12:41 PM   #4
Buumi
Member
 
Registered: Dec 2010
Location: Finland
Distribution: Slackware 14.1
Posts: 61

Rep: Reputation: 10
From ftp://mirrors.kernel.org/slackware/s..._AND_HINTS.TXT

If you need to use a non-US keyboard layout, then copy the file located at
/usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi to /etc/hal/fdi/policy
and edit it to suit your needs. Have a look at the contents of that file
for an example and more information. If you prefer to do this the "old" way
using /etc/X11/xorg.conf, then you can use "X -configure" or "xorgsetup" to
generate an xorg.conf, then add the following lines to the "ServerFlags"
section to disable input device hotplugging via HAL:
Option "AllowEmptyInput" "false"
Option "AutoAddDevices" "false"
Option "AutoEnableDevices" "false"
This is also relevant if you prefer to disable HAL completely for whatever
reason.


I wish I understood your question correctly. I was having the problem with wrong keymap just last week and at least this helped. Someone else correct me if it's completely wrong. The first one seems to be way with HAL though but it worked for me at least and later one shouldn't need HAL.

But for me it was by default US.

Last edited by Buumi; 02-24-2011 at 12:48 PM.
 
Old 02-24-2011, 12:53 PM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by Buumi View Post
From ftp://mirrors.kernel.org/slackware/s..._AND_HINTS.TXT

If you need to use a non-US keyboard layout, then copy the file located at
/usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi to /etc/hal/fdi/policy
and edit it to suit your needs.
I agree with this solution, this is probably the way you changed it to the UK keymap, if you copy back the original, or delete '/etc/hal/fdi/policy/10-keymap.fdi', it should work.
 
Old 02-24-2011, 01:38 PM   #6
Josh000
Member
 
Registered: Aug 2009
Distribution: Slackware 13 64bit
Posts: 534

Original Poster
Rep: Reputation: 35
I did indeed setup the UK keymap by copying '/etc/hal/fdi/policy/10-keymap.fdi' originally, however deleting it did not result in a us keymap when restarting X.
 
Old 02-24-2011, 02:39 PM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
You have to restart hal: '/etc/rc.d/rc.hald restart'
 
Old 02-24-2011, 03:09 PM   #8
tobyl
Member
 
Registered: Apr 2003
Location: uk
Distribution: slackware current
Posts: 768

Rep: Reputation: 64
Josh,

I think this also depends on whether you use evdev. I copied /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf

to /etc/X11/xorg.conf.d/90-keyboard-layout.conf (this overrides upgrades to /user/share/X11/... reverting your settings)

and modified the entries to Option "XkbLayout" "gb"

well it worked for me...

tobyl
 
  


Reply

Tags
keymap


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How have I got a US keymap? devnull10 Slackware 5 11-18-2010 03:47 PM
Changing Linux keymap to reflect dual-booted WinXP keymap AbuKaidman Linux - Newbie 2 07-18-2009 03:05 AM
Keymap problem ixhabbaba Linux - Software 1 09-16-2007 12:00 PM
Keymap trouble mjjzf VectorLinux 5 11-29-2004 02:23 AM
Keymap with æ,ø,å ulfob Slackware 1 02-04-2004 11:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:12 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