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.

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

2 Answers 2

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.

Done.

share|improve this answer

Your Answer

 
discard

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.