Skip to content

Is it possible to set the IME via im-config instead of environment variables? #385

@linghengqian

Description

@linghengqian
sudo apt-get install ibus ibus-gtk ibus-gtk3 fonts-noto-cjk fonts-noto-color-emoji dbus-x11 zenity -y
sudo apt-get install ibus-gtk4 -y
sudo apt-get install ibus-libpinyin -y
export XIM=ibus
export XIM_PROGRAM=/usr/bin/ibus
export QT_IM_MODULE=ibus
export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export DefaultIMModule=ibus
sudo sh -c 'echo "export XIM=ibus" > /etc/profile.d/ibus.sh'
sudo sh -c 'echo "export XIM_PROGRAM=/usr/bin/ibus" >> /etc/profile.d/ibus.sh'
sudo sh -c 'echo "export QT_IM_MODULE=ibus" >> /etc/profile.d/ibus.sh'
sudo sh -c 'echo "export GTK_IM_MODULE=ibus" >> /etc/profile.d/ibus.sh'
sudo sh -c 'echo "export XMODIFIERS=@im=ibus" >> /etc/profile.d/ibus.sh'
sudo sh -c 'echo "export DefaultIMModule=ibus" >> /etc/profile.d/ibus.sh'
ibus-daemon -x -d
ibus-setup
sudo pkill ibus-daemon
ibus-daemon -x -d
sudo sh -c 'echo "ibus-daemon -drx > /dev/null 2>&1" >> /etc/profile.d/ibus.sh'
  • Due to the discussion in Expect to update the Github Wiki section on Ubuntu installations ibus/ibus#2458 (comment), I'm a little bit confused why we don't automatically use im-config to switch input methods in /etc/profile.d. Is it because im-config has some limitations on WSL?

  • The result of my test on a WSL instance with systemd enabled is that every time the computer is restarted, the input method must be specified again through im-config -n ibus, and it seems that im-config will not automatically save the settings. The method I'm testing looks like this.

sudo apt-get install ibus ibus-gtk ibus-gtk3 fonts-noto-cjk fonts-noto-color-emoji dbus-x11 zenity -y
sudo apt-get install ibus-gtk4 -y # If ibus-gtk4 is available, you need to install
sudo apt-get install ibus-libpinyin -y # or other engine(s) you want
im-config -n ibus
ibus-setup # add input methods you want
  • Since Gnome's standard desktop environment does not use im-config, does the processing of pengwin-setup.d/ibus.sh still involve the limitation of im-config ?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions