8

There is previous similar question but solution there didn't work for me in Ubuntu 16.04. I mean:

gkbd-keyboard-display -l us,intl

The commands below work but I want to be able to specify which layout variant not just basic layout or current one.

gkbd-keyboard-display -l us
gkbd-keyboard-display -g 1
1
  • I would guess that gkbd-keyboard-display -l 'us(inlt)' would or could work. Or use xkbprint -lg 1 -color "$DISPLAY" - | ps2pdf - > keybord_layout-grp-1.pdf get a PDF of the current layout. To change the layout temorary, use setxkbmap, see manual page for options.
    – Anders
    Jul 16, 2021 at 18:14

1 Answer 1

9

Well, found the trick after trying the GUI then watch which command it is launching.

~$ ps aux | grep gkbd
user      4158  0.2  3.5 470116 27048 ?        Sl   14:06   0:00 gkbd-keyboard-display -l us?intl
user      4178  0.0  0.1  21296   928 pts/11   S+   14:07   0:00 grep --color=auto gkbd

~$ pgrep -a gkbd
4158 gkbd-keyboard-display -l us    intl

~$ pgrep -a gkbd | hexdump -c
0000000   2   3   7   0       g   k   b   d   -   k   e   y   b   o   a
0000010   r   d   -   d   i   s   p   l   a   y       -   l       u   s
0000020  \t   a   l   t   -   i   n   t   l  \n                        
000002a

So, here is the command that works, which uses tab \t as separator:

gkbd-keyboard-display -l $'us\tintl'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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