Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am using 12.10 with Gnome 3. I changed LightDM to GDM. When I boot up keyboard layout changes to default US layout. When I add another layout to end of list at Region settings my selected layout becomes active. What should I do ?

share|improve this question

8 Answers 8

I also have the same problem. I did a lot of research, but I have not found a solution for me. Instead, for many people, this was the solution:

  1. Open Terminal
  2. Type sudo vim /etc/default/keyboard
  3. The values ​​within the file should be as follows:

    XKBMODEL="pc105"
    XKBLAYOUT="it"
    XKBVARIANT=""
    XKBOPTIONS=""
    
  4. XKBLAYOUT is the code of your keyboard layout. Type man xkeyboard-config for shows the codes for keyboard model and layout.

  5. exit

Reboot and check. I hope this is the right solution for you too ;)

share|improve this answer

This (the second, not the first) solution definitely works. I had the same problem with the US layout I wanted to use and kept having to remove and readd each time I logged into Ubuntu 13.04. It kept reverting back to the UK Keyboard layout, despite having run:

dpkg-reconfigure keyboard-configuration

(EVEN WHEN THE LANGUAGE ICON ON THE TOP RIGHT OF THE SCREEN ACTUALLY SAYS 'en US') so this is definitely a serious bug as even changing keyboard layouts by clicking on them is completely unresponsive! Hope there will be some kind of fix for this soon.

Anyway, I found that, in fact, simply typing the command:

setxkbmap

into the 'Startup Applications' command tab solves the problem of Ubuntu forgetting the keyboard layout settings upon each boot.

HOWEVER: I did discover something else: If you are also running xmodmap in startup, then it will be OVERWRITTEN by the setxkbmap command. The setxkbmap command thus overrides the xmodmap commands at startup. (I found this out because I had finally succeeded in getting Ubuntu to remember my keybinding of Scroll Lock (which I use for my backlit keyboard) by means of running an .Xmodmap file including the modification (in my case:

add mod3 = Scroll_Lock

Would be nice if anyone has any ideas on how to be able to run both on startup, at least until there is a permanent fix for the very very common, obvious and serious language layout problem in Ubuntu (i.e. Ubuntu forgetting keyboard layout settings after every boot).

share|improve this answer
  1. Open Terminal by hitting Alt+Ctrl+T.
  2. Login with root, su
  3. Enter Pass
  4. Type dpkg-reconfigure keyboard-configuration
  5. exit

Reboot and recheck. Let us know if this solves your problem.

share|improve this answer
    
It didnt solve my problem. –  serdar Apr 17 '13 at 18:24
up vote 0 down vote accepted

First I entered this command at terminal to get my current keyboard layout that I set after every boot

setxkbmap -query

result:

rules:      evdev
model:      pc105
layout:     tr

I created a script that includes this line setxkbmap <layout>, in my case setxkbmap tr. I added this script to startup programs. This solved my problem.

share|improve this answer

Another solution:

  1. Open Terminal
  2. Login with root su
  3. Enter password of root
  4. Update and Upgrade all with sudo apt-get update && sudo apt-get upgrade
  5. Type the following:

    apt-get install console-data
    apt-get install console-setup
    apt-get install console-locales
    apt-get install keyboard-configuration
    
  6. Reboot and recheck.

share|improve this answer

After an update to 14.4 using awesome as windowmanager I ran into the very same issue.

Now I execute "setxkbmap de" (for german layout) in the configuration-file ~/.config.rc.lua and anything works fine.

share|improve this answer

I checked my startup application preferences and noticed Fcitx was being run by default in the start. I then configured Fcitx for my layout and got it fixed.

share|improve this answer

I have Ubuntu 10.04, and I have a same problem!

The follow fix works for me:

Logout of your current session.

Click on your username. At bottom bar: there is a combo <-- switch to language correct

That's all!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.