Keyboard layout won't stay

If none of the more specific forums is the right place to ask

Keyboard layout won't stay

Postby Jerther » 2009-07-26 14:55

Hi!

I'm using Debian Lenny. I've been having this problem since the installation a couple of weeks ago. Everything else is fine ;)

I use a Canadian French keyboard layout. However, when I get into GNOME, it returns to what I think is a standard US layout. I have to return to System, Prefs, Keyboard and add another Canada layout, even if there's already one.

And each time I reboot my machine, the system returns to the standard layout and I have to re-add a Canada one.

There are only Canada layouts in the list.

I've searched a bit, and found out I could use a terminal script to reload the layout at boot up using:

Code: Select all
loadkey cf


which returns:

Code: Select all
Loading /usr/share/keymaps/i386/qwerty/cf.kmap.gz


but the layout won't change.

I searched a bit more, and found out this kind of problem has been solved by many by running:

Code: Select all
dpkg-reconfigure console-data


I choose the according items, and... I end up with the following message:

Code: Select all
Looking for keymap to install:
cf
dpkg: warning: obsolete option '--print-installation-architecture', please use '--print-architecture' instead.


And the layout doesn't change.

Any clue or workaround for this?
If you need more information, please ask :)
User avatar
Jerther
 
Posts: 6
Joined: 2009-07-26 14:42

Re: Keyboard layout won't stay

Postby 987687 » 2009-07-26 15:11

When you are in gnome, if you open a terminal and type
Code: Select all
setxkbmap cf
does that give you the correct keyboard map you need?
If so, you can add it to xorg.conf to have it automatically loaded when X is started.
Edit /etc/X11/xorg.conf as root, and go to the InputDevice section. There will be a line that looks like this
Code: Select all
Option      "XkbLayout" "us"
Change us to cf. Save, then restart X (CTRL+ALT+BACKSPACE)

to open a file for editing as root, press ALT+F2 to bring up the command dialog, and type
Code: Select all
gksu gedit /etc/X11/xorg.conf
Since you are using gnome this should bring up a graphical text editor as root. BE CAREFUL!!!! YOU ARE ROOT, IF YOU MESS UP YOUR SYSTEM WILL STOP WORKING!
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
User avatar
987687
 
Posts: 2121
Joined: 2007-06-11 10:58
Location: Vacation Land

Re: Keyboard layout won't stay

Postby Jerther » 2009-07-26 15:29

setxkbmap cf yields:

Code: Select all
Error loading new keyboard description


and usinf us instead of cf yields nothing, so I guess this one works, but not cf...

I guess something is missing?
User avatar
Jerther
 
Posts: 6
Joined: 2009-07-26 14:42

Re: Keyboard layout won't stay

Postby 987687 » 2009-07-26 16:28

try
Code: Select all
setxkbmap "ca(fr)"

It works on my system, but I'm not sure if it is the layout you are looking for or not.
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
User avatar
987687
 
Posts: 2121
Joined: 2007-06-11 10:58
Location: Vacation Land

Re: Keyboard layout won't stay

Postby Jerther » 2009-07-26 16:52

yes this one works!

Here the xorg.conf section for my keyboard at the moment:

Code: Select all
Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection


I added

Code: Select all
Option "XkbLayout" "ca(fr)"


to this section and it worked!!! thanks!!

I believe this is a workaround to my problem and I'm fine with it. Otherwise, could you tell where could be the problem?
User avatar
Jerther
 
Posts: 6
Joined: 2009-07-26 14:42

Re: Keyboard layout won't stay

Postby 987687 » 2009-07-26 17:03

I personally don't see it as a workaround at all. I see it as the way to set a keyboard layout. But I don't use gnome, or gdm for managing things. I use openbox with no desktop manager, so for me, this is the only way to switch X keyboard layouts on X startup.
At this time I actually have a completely custom programmed dvorak keyboard layout I load with xkbcomp...

Anyway, there is probably some little bug in gnome that's making it not work properly... wouldn't surprise me at all.
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
User avatar
987687
 
Posts: 2121
Joined: 2007-06-11 10:58
Location: Vacation Land

Re: Keyboard layout won't stay

Postby MrFrood » 2009-07-26 23:54

Jerther wrote:I believe this is a workaround to my problem and I'm fine with it. Otherwise, could you tell where could be the problem?


987687 wrote:I personally don't see it as a workaround at all. I see it as the way to set a keyboard layout.


It is a workaround because the correct keyboard layout should (IMHO) be configured during install but in the dummed down lenny installer it is not, instead it uses X's guessing abilities (which in my case got en-gb layout but missed the fact that it is a 102 key KB not a 105 KB) - until X can start guessing right the install should go back to asking some very simple questions about the keyboard.

I am aware the the expert mode install still gives the option to choose a KB layout but with X's auto detection routine not working properly I am firmly of the opinion that these questions should be reintegrated back in to the normal install.
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.

http://happy.sdf-eul.org/
User avatar
MrFrood
 
Posts: 480
Joined: 2008-04-22 12:08
Location: London UK

Re: Keyboard layout won't stay

Postby 987687 » 2009-07-26 23:57

I have to completely disagree. For one, this is the correct way to do it if you want to switch to a different keyboard layout. And 2, I recently installed lenny on a system, and one of the first things the regular (non-expert) installer asks is what layout you want to use. It has a bunch of different options, but I chose dvorak, because that's what I use. Then later when I installed X in "knew" that I used dvorak in the installation and made it the default in X.
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
User avatar
987687
 
Posts: 2121
Joined: 2007-06-11 10:58
Location: Vacation Land

Re: Keyboard layout won't stay

Postby MrFrood » 2009-07-27 01:37

987687 wrote:I have to completely disagree. For one, this is the correct way to do it if you want to switch to a different keyboard layout.


It is as you say the correct way to switch to a different keyboard layout but in my case I just wanted the keyboard that was in use when I installed lenny to work properly and if I understood Jertherr's original post it would appear that they also were not trying to trying to install a new keyboard. As niether of us were trying to install a new keyboard it is (IMHO) a workaround as the keyboard should of been set right during the install.


987687 wrote:2, 2, I recently installed lenny on a system, and one of the first things the regular (non-expert) installer asks is what layout you want to use


I recall questions about language but nothing keyboard specific (such as how many keys).
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.

http://happy.sdf-eul.org/
User avatar
MrFrood
 
Posts: 480
Joined: 2008-04-22 12:08
Location: London UK

Re: Keyboard layout won't stay

Postby 987687 » 2009-07-27 01:40

MrFrood wrote:
987687 wrote:2, 2, I recently installed lenny on a system, and one of the first things the regular (non-expert) installer asks is what layout you want to use


I recall questions about language but nothing keyboard specific (such as how many keys).

I believe it asks for language and keyboard layout. Nothing keyboard specific though. I have a completely custom programmed layout though, so I didn't really care...
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
User avatar
987687
 
Posts: 2121
Joined: 2007-06-11 10:58
Location: Vacation Land

Re: Keyboard layout won't stay

Postby MrFrood » 2009-07-27 07:32

987687 wrote:I believe it asks for language and keyboard layout..


I do believe you are right, but now I've have had my memory jogged I still do not remember it asking me how many keys my British layout keyboard had - it just assumed a 105 key windows British keyboard rather than the standard 102 key pc British keyboard I use.
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.

http://happy.sdf-eul.org/
User avatar
MrFrood
 
Posts: 480
Joined: 2008-04-22 12:08
Location: London UK

Re: Keyboard layout won't stay

Postby 987687 » 2009-07-27 11:40

MrFrood wrote:
987687 wrote:I believe it asks for language and keyboard layout..


I do believe you are right, but now I've have had my memory jogged I still do not remember it asking me how many keys my British layout keyboard had - it just assumed a 105 key windows British keyboard rather than the standard 102 key pc British keyboard I use.

Yea, lenny did get rid of that. The installer used to ask if you wanted it to auto-detect your keyboard, or if you wanted to choose how many keys, etc. Same with the screen actually, I'm not sure why they got rid of that functionality.
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
User avatar
987687
 
Posts: 2121
Joined: 2007-06-11 10:58
Location: Vacation Land

Re: Keyboard layout won't stay

Postby MrFrood » 2009-07-27 13:01

987687 wrote:
MrFrood wrote:
987687 wrote:I believe it asks for language and keyboard layout..


I do believe you are right, but now I've have had my memory jogged I still do not remember it asking me how many keys my British layout keyboard had - it just assumed a 105 key windows British keyboard rather than the standard 102 key pc British keyboard I use.

Yea, lenny did get rid of that. The installer used to ask if you wanted it to auto-detect your keyboard, or if you wanted to choose how many keys, etc. Same with the screen actually, I'm not sure why they got rid of that functionality.


Because people like me who insist on using a standard PC keyboard instead of one specially designed for a well known commercial operating system are a dieing bread :?
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.

http://happy.sdf-eul.org/
User avatar
MrFrood
 
Posts: 480
Joined: 2008-04-22 12:08
Location: London UK

Re: Keyboard layout won't stay

Postby 987687 » 2009-07-27 13:10

To be honest, I don't even know how many keys are on my keyboard... It is some 3D ergonomic one from some random no-name company. I have a completely custom layout that uses all the keys, like windows key, for different uses anyway.
Desktop - 3.2GHz core2 quad
Laptop - 2.4GHz core2 duo ancient macbook
Bring back the penguin!! http://tinyurl.com/d57jwv
User avatar
987687
 
Posts: 2121
Joined: 2007-06-11 10:58
Location: Vacation Land

Re: Keyboard layout won't stay

Postby MrFrood » 2009-07-27 13:37

987687 wrote:To be honest, I don't even know how many keys are on my keyboard


101/102 keys for a standard PC keyboard
104/105 for a keyboard specially designed for a popular commercial operating system (hence the aforementioned operating systems logo is normally printed on certain keys).
(\__/)
(='.'=) This is Bunny. Copy and paste Bunny into your
(")_(") signature to help him gain world domination.

http://happy.sdf-eul.org/
User avatar
MrFrood
 
Posts: 480
Joined: 2008-04-22 12:08
Location: London UK

Next

Return to General Questions

Who is online

Users browsing this forum: No registered users and 19 guests

fashionable