Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to add greek polytonic keyboard layout under Lububtu (so in LXDE). I already realized there is no easy tool to do it with the graphic interface, so I need to use setxkbmap executing something the like of:

setxkbmap pl,gr

Now, how to make setxkbmap set the greek polytonic variant?

share|improve this question
up vote 3 down vote accepted

To set it with setxkbmap:

setxkbmap 'pl,gr' -variant ',polytonic' -option 'grp:alt_shift_toggle'

-variant sets variants for each selected layout and -option 'grp:alt_shift_toggle' enables switching layouts with Alt-Shift.

The available layouts and variants can be seen in /usr/share/X11/xkb/symbols. Every layout has its file and by listing such file you can find the variants of the layout.

(BTW the options are listed in /usr/share/X11/xkb/symbols.)

If you need to make the settings permanent, instead of using setxkbmap, you can edit /etc/default/keyboard.

share|improve this answer

You can add the setxkbmap to autostart with the polytonic variant like this

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

This is a combination of Alt+Shift keys to change the layout and for En(us)-Gr languages switch.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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