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.

This question already has an answer here:

In Unity one can easily switch between keyboard layouts using the keyboard tray icon. There is also the Keyboard menu where one can add/remove/set keyboard layouts.

I can not find any of this functionality in Xubuntu. How can the keyboard layout be switched in this desktop environment?

Thanks.

Update I: details on the xubuntu-desktop package this question refers to:

$ sudo apt-cache show xubuntu-desktop
Package: xubuntu-desktop
Priority: optional
Section: universe/metapackages
Installed-Size: 43
Maintainer: Xubuntu Developers <xubuntu-devel@lists.ubuntu.com>
Architecture: amd64
Source: xubuntu-meta
Version: 2.152
Depends: [...]
Size: 3790
MD5sum: 26efaa0f16c70a82d216165ba2af4fd4
SHA1: 49c283439314e48d46668e07d65c4a261e9b556a
SHA256: 36e51760324e081988a068aa29de4968a7d050c18bad4128967ffd656c570f3f
Description-en: Xubuntu desktop system
 This package depends on all of the packages in the Xubuntu desktop system
 .
 It is safe to remove this package if some of the desktop system packages are
 not desired.
Description-md5: 25eeb522d88fba23a532953cbbf1638e
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Task: xubuntu-desktop

Update II: The solution proposed for Xubuntu 11.10 is not working with this latest version of Xfce. The xfce4-xkb-plugin package is apparently installed together with xubuntu-desktop.

enter image description here

Update III: This is no longer an issue on Xubuntu 14.04, a nice tray icon in this latest version allows the user to easily switch between keyboard layouts.

share|improve this question

marked as duplicate by mikewhatever, psusi, i08in, belacq, souravc Mar 4 at 8:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
it would be nice also if you could mention what version are you using cuz versions between 12.04 and 13.10 are way different. –  JohnnyEnglish Mar 3 at 15:39
    
You have solution on this link askubuntu.com/questions/63178/… –  2707974 Mar 3 at 15:51

2 Answers 2

the command 'setxkbpmap' can help

If you want to switch from the belgian azerty to the us qwerty or the opposite, you can do:

  • setxkbpmap us
  • setxkbpmap be

You can also change way more parameter of the keyboard... see man setxkbpmap

(The link given by 2707974 can also help)

share|improve this answer

Create a file in /usr/bin/ path:

gksudo "mousepad /usr/bin/fixkeyboard"

Add following lines in this file. I'am using US and PK layouts for example, just change it to the keyboard layouts you want to use. Also note that this example sets xkb option to change groups when both alt keys are pressed together.

#!/bin/bash setxkbmap -option grp:switch,grp:alts_toggle us,pk

Save the file and exit.

Go to Applications > Settings > Autostarted Applications and click the Add button. In the Name field type fixkeyboard and in the Command field type /usr/bin/fixkeyboard press OK and then Close.

Thanks

share|improve this answer
    
I would be more interested in changing the keyboard with the desktop environment itself. Regarding the discussion on Xubuntu 11.10 it seems possible. –  Luís de Sousa Mar 4 at 7:36
    
Can you tell me which version of Xubuntu you used ? Or you used xfce4 –  FirstStrike Mar 4 at 7:41
    
Check Update I in the question. –  Luís de Sousa Mar 4 at 8:00

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