Lubuntu 13.10. Keyboard model pc 105.
I have 4 keyboard layouts - RU, PL, FR, UA.
Is it possible to choose needed layout by command line in terminal?
Command setxkbmap -layout fr
not working for choosing French keyboard layout.

- 36,677
-
It is another question. I want to select needed keyboard from 5-7 ones directly in terminal. Directly French (for) example. But there is another answer on link - how to change 1 keyboard from 2. My question is related, but it is exactly different question. – Ziutek Kirelejson Dec 23 '13 at 16:37
3 Answers
If you want to switch between keyboard mappings, you need to add a setxkbmap command to /etc/xdg/lxsession/Lubuntu/autostart
To switch between two keyboard mappings with the control+shift keys, Open the terminal and
echo '@setxkbmap -option grp:ctrl_shift_toggle "de,us"' | sudo tee -a /etc/xdg/lxsession/Lubuntu/autostart
Keyboard mapping for 13.10 and beyond
Since Lubuntu 13.10, the method to choose and toggle keyboard layout has changed. Indeed, lxkeymap application is no longer installed by default, and we have to use Keyboard Layout Handler instead, a plugin for lxpanel.
On Lubuntu default installation, Keyboard Layout Handler appears on the right of the panel, near volume control. It displays a box which describes the current keyboard layout (for example, “US”). To modify keyboard layout settings, right click on it, and choose « Keyboard Layout Handler Settings ». Here you can make some modifications.
By default, the option « Keep system layouts » is checked. Uncheck it to customize your keyboard layout.

- 84,289
To change the keyboard layout (e.g. to French) in the Linux command line, enter the command:
loadkeys fr
The codes occur in various places like /etc/X11/xkb/
.
-
Command loadkey fr also not works in my Lubuntu 13.10 (Keyboard model pc 105). This command don't give any effect. – Ziutek Kirelejson Dec 23 '13 at 10:41
you can do it with two methods .
1.loadkeys
2.setxkbmap
Loadkeys
sudo apt-get install loadkeys
after installing loadkeys run it as normal user and choose the style you want with
loadkeys -v
PS: only works on CLI version.
setxkbmap
This command you have to run as root user. as a normal user can not do the process with this command.
use it as
sudo setxkbmap -layout es
If you want to change it to English.
credit goes to : ubuntuforums

- 102,391
- 106
- 255
- 328