multiple keyboard layouts on crunchbang / debian / openbox with fbxkb

Categories Uncategorized

I really need to be able to write in multiple languages, using multiple keyboard layouts and I managed to oversee this aspect while migrating to my new system… well, it’s time to fix it.

To set up multiple keyboard layouts on your crunchbang/debian setup you have to define the layouts that X is going to use first.

To do this, fire up you terminal and edit /etc/default/keyboard.

$ sudo vim /etc/default/keyboard

The content should look like this:

XKBLAYOUT="us,ro" <-- these are 2 char country codes. `ls -la /usr/share/X11/xkb/symbols/` to list all of them
XKBVARIANT=",std" <-- these are variants, defined inside the layout files available in

Add as many layouts as you wish in the XKBLAYOUT setting. Don’t forget to set a variant, if your keyboard requires it. I’m using standard for Romanian. A typical us variant is international… so beware.

XKBOPTIONS sets the key bindings that will toggle the keyboard layout and alt_shift_toggle lets you use ALT+SHIFT to toggle between the layouts, Windows style.

Now just reboot or restart X anyway you can to start using your multiple keyboard layouts.

To switch visually and to have an indicator of the current layout I’m using fbxkb, which starts from Openbox’s autostart. To do this, just add the following line to the end of the autostart file (the file is usually in ~/.config/openbox/):

    fbxkb &

Fbxkb is a wonderful tool, although a little ugly.

You can change the status indicator flags (the default ones are just some images that contain the country codes) simply by copying new 24×24 pixel flags or other images to /usr/share/fbxkb/images.

language indicator

Now isn’t that sweet? It works too 🙂

10 thoughts on “multiple keyboard layouts on crunchbang / debian / openbox with fbxkb

  1. am cautat sa instalez pachetul – keyboard-configuration_1.92_all.deb- cu sudo apt-get aptitude si-mi da eroare din centrul software ubuntu.Am incercat de pe mai multe oglinzi si nu merge
    La mine in terminal sudo vim/etc/default/keyboard nu este recunoscuta Ma intereseaza o tasta pt l romana si rusa
    scz pt deranj

  2. Hi Bogdan it’s very useful to me, if you don’t have any problem i want to write a spanish post on my blog based on yours. Another question how do you get the syntax highlighting? Thank you so much

  3. Hello neighbour,thnx for this guide but I have one problem.I have done everything u wrote and installed fbxkb 0.6 .I’m runnin Debian Wheezy 64-bit with Openbox manager and fbxkb 0.6 doesn’t show me us flag when I switch to us keyboard.I use also serbian latin and I have a proper serbian flag when I turn on serbian keyboard but when I switch to us i got ?? (2 question mark) instead us flag.Saw on internet that this was a bug,but is there any chance to fix that.Tried with icons that I got with fbxkb and also I was downloaded new one and still same situation.Greetings from Serbia

  4. for some reason is not working for me, do I have to setup language support? it has worked on other 3 installations I’ve done but this last one is simply not working what would you guess it is, I’m using “latam, us” no variants, and the same “grp:alt_shift_toggle” options to change layout… weird.

Leave a Reply

Your email address will not be published. Required fields are marked *