Lubuntu 12.04 change default keyboard-layout after installation

I accidentally set the keyboard to the wrong language when I was installing the system, and now I have to change that keyboard setting every time i start the computer.

How do I change the default keyboard language in Lubuntu 12.04?


Solution 1:

To make a permanent change of the language of the keyboard, write this in the terminal:

 echo '@setxkbmap -option grp:alt_shift_toggle "es, us"' | sudo tee -a /etc/xdg/lxsession/Lubuntu/autostart

This sets the keyboard language to Spanish. This works for Lubuntu 12.04 too.

To just change the keyboard layout for the session, write this in the terminal (this example is for the english language):

setxkbmap -layout us

Solution 2:

I have faced the same problem. After instalation of Lubuntu, keybord layout became US. The following command helpd me to change it back to UK. Thanks for those who started this thread.

setxkbmap -layout gb

Solution 3:

Running the following in the Terminal will change the keyboard setting to US for example:

setxkbmap -layout us

And then you can make bash aliases such as keybaord_layout us, etc.