You are not logged in.

#1 2021-01-02 06:42:34

Sffred
Member
Registered: 2020-08-30
Posts: 55

[SOLVED] ibus doesn't work in emacs and notepadqq (i3wm)

I am using i3wm and I start it using xdm-archlinux. The input method ibus works fine at most times, but it doesn't work in certain applications, such as notepadqq, emacs or xedit.

I have already put these lines in ~/.bashrc

export GTK_IM_MODULE=ibus
export XMODIFIERS=@im=ibus
export QT_IM_MODULE=ibus

I have also installed ibus-qt from aur.
Here is my ~/.xsession

i3
[[ -f ~/.Xresources ]] && xrdb -merge -I$HOME ~/.Xresources

Here is my ~/.Xresources

xterm*background: black
xterm*foreground: white

xterm*faceName: DejaVu Sans Mono:pixelsize=13

xterm*inputMethod:ibus

Emacs*useXIM: true
Emacs*inputMethod:ibus
notepadqq*inputMethod:ibus

The last three lines is just a trial. I don't quite know what are the xresources of notepadqq or emacs and how to set it.

Things are quite strange, since if I start notepadqq or emacs from the terminal (xterm), I would be able to use ibus, but if I start it through a desktop entry or through dmenu, I would not be able to use ibus.

Last edited by Sffred (2021-01-03 04:54:10)

Offline

#2 2021-01-03 02:44:03

Sffred
Member
Registered: 2020-08-30
Posts: 55

Re: [SOLVED] ibus doesn't work in emacs and notepadqq (i3wm)

I have figured out what happened. This issue is caused by environment variables.
The environment set in .bashrc won't be preserved if you start an application using dmenu. To use ibus in notepadqq, you need to set QT_IM_MODULE=ibus. To use ibus in emacs, you need to set GTK_IM_MODULE=ibus and LANG=** (where ** represents a locale that includes characters that you would like to input)

Offline

#3 2021-01-03 02:44:41

Sffred
Member
Registered: 2020-08-30
Posts: 55

Re: [SOLVED] ibus doesn't work in emacs and notepadqq (i3wm)

One way to set a global environment variable is to edit /etc/environment

Offline

Board footer

Powered by FluxBB