Is it possible to use terminal commands to switch between keyboard layouts in ibus
? I can't see any GUI way to do it in XFCE.
4 Answers
Actually, ibus
provides an system tray applet.
- Run
ibus-setup
- On General tab, Check Show icon on system tray
- On General tab, confirm you have shortcut
- On Advanced tab,Uncheck Use system keyboard layout
-
1Yes, works quite well, thank you. Just tried it on Lubuntu Xenial while logged into XFCE.– FiksdalJun 30, 2016 at 19:33
It's more related to xkb
than to ibus
(but I am not sure I completely understand the intricacy of the keyboard handling, as you can see in this post of mine) but you can detect the current configuration with
[romano:~] % setxkbmap -query
rules: evdev
model: pc105
layout: es,gb
variant: standard_tlde,
options: caps:none,compose:caps,terminate:ctrl_alt_bksp
note it down, and then use
setxkbmap -layout es -variant standard_tlde -option caps:none,compose:caps,terminate:ctrl_alt_bksp
that you can associate to a key. It should work in all Ubuntu flavors, at least X11-based (no idea about wayland).
Use ibus command to set m17n
ibus engine m17n:te:itrans
to set us
ibus engine xkb:us::eng
list engines
ibus list-engine
show available engines
ibus read-config
-
Unfortunately it resets to the GUI-selected one as soon as you switch terminal (even if you switch back).– OJFordMay 16, 2020 at 17:08
-
1Finally I can change layout using keyboard binding in i3. Thanks!! Jun 2, 2021 at 11:16
checked answer is not the answer for the question title.
Easier way to use Ibus with command ↓
Get Engine Name
- type to terminal but don't execute:
ibus engine
- change ibus to the engine you want to know the engine name
- execute the command. Output is the engine name
Change Ibus Engine
- Command:
ibus engine ENGINE_NAME
. (ex:ibus engine xkb:us::eng
) ENGINE_NAME
is the name that you got from above step.
ibus
. I have Lubuntu, but I've installedxubuntu-desktop
and mostly use that. The only way I've found now is to log out of XFCE, into Lubuntu to switch layout, then back into XFCE.setxkbmap -query
when you have the correct layout, andsetxkbmap -layout XX -variant YYYYYY -option A:B,C:D
to switch? obviously substitute XX, YYY etc. with the output that-query
gives to you.setxkbmap -query
tells me that the layout isgb
, no matter if I have Tamil or US English active.