I have found an older thread in the Ubuntu forums but I guess there is a more simple solution now. I would like to switch between the default German layout and an English (US) one.
You can use Lxkeymap under preferences. There is a Keyboard Layout Switcher under Panel Preferences / Panel Applets.
As arno says, try:
To make this permanent:
This is a general solution including solving other possible problems when setting keyboard layouts and changing them with shortcuts. I have tested this in Lubuntu oneiric, precise, and quantal.
- First, using the GUI Keyboard Layout Handler
Right click on the Keyboard Layout Handler button from the LXPanel
There are different types of layouts for the same language
Also set the shortcut (Change Layout Option).
Check current xkb parameters with:
I'll give an example with three languages, US Englush, French and Romanian standard. For German it is "de" I think.
So, to set us,fr,ro layout with variants default (us), (fr) and standard (ro) that can be changed with ALT-SHIFT keys:
To test if all are OK and make all changes permanent (if gedit is the preferred text editor):
See that parameters are according:
See that the settings in Keyboard Layout Handler are exactly the same regarding also order, subtype and shortcut.
- Other possible issues.
In 12.10 I had a more bizarre problem. In spite of doing the above two steps only the main language was accessible. This was solved by removing and reinstalling all secondary languages (all except the main one) and adding the secondary languages as in the previous steps.
The permanent solution provided by user1112507 worked for me in Lubuntu 12.04, but not in 12.10 where setxkbmap apparently needs to delay before executing.
His solution, modifying /etc/xdg/lxsession/Lubuntu/autostart, is for all users. Here is a workaround for the single-user case: