mike-fabian / ibus-typing-booster

ibus-typing-booster is a completion input method for faster typing
https://mike-fabian.github.io/ibus-typing-booster/
Other
230 stars 16 forks source link

[BUG] Difficulties in getting the booster to work in the XFCE4 environment. #403

Closed andruska closed 1 year ago

andruska commented 1 year ago

So far, I have followed all the guidelines. One gets the impression that the ibus/ibus-typing-booster simply does not work in the XFCE4 environment. Also I cant see any error messages. My goal is to use ibus-typing-booster for predictive typing in Russian.

# pacman -Qi ibus-typing-booster
Name            : ibus-typing-booster
Version         : 2.19.8-1
Description     : Predictive input method for the IBus platform
Architecture    : any
URL             : https://mike-fabian.github.io/ibus-typing-booster/
Licenses        : GPL3  Apache
Groups          : None
Provides        : None
Depends On      : ibus  python-gobject  python-dbus  python-pyenchant  m17n-lib  sqlite
Optional Deps   : None
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 13,51 MiB
Build Date      : R 11 nov 2022 20:48:11
Install Date    : E 28 nov 2022 01:34:54
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature
# pacman -Qi ibus
Name            : ibus
Version         : 1.5.27-1
Description     : Next Generation Input Bus for Linux
Architecture    : x86_64
URL             : https://github.com/ibus/ibus/wiki
Licenses        : LGPL
Groups          : None
Provides        : None
Depends On      : dconf  gtk3  hicolor-icon-theme  libnotify  python-dbus  python-gobject  iso-codes  librsvg  libibus=1.5.27
Optional Deps   : None
Required By     : ibus-typing-booster
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 7,52 MiB
Build Date      : E 29 aug 2022 21:09:36
Install Date    : E 28 nov 2022 01:34:54
Install Reason  : Installed as a dependency for another package
Install Script  : No
Validated By    : Signature
# set
...
GTK_IM_MODULE=ibus    (also tryed 'xim')
...
QT_IM_MODULE=ibus
...
XMODIFIERS=@im=ibus
...
# top
...
  8464 mcb   20   0  594180  12848   5020 S   0,3   0,2   0:05.08  `- ibus-daemon --xim --daemonize                                                                                 
   8473 mcb   20   0  235476   4492   4028 S   0,0   0,1   0:00.00      `- /usr/lib/ibus/ibus-dconf                                                                                  
   8474 mcb   20   0  480588  45032  27600 S   0,3   0,6   0:01.94      `- /usr/lib/ibus/ibus-ui-gtk3                                                                                
   9945 mcb   20   0  569936  80064  45708 S   0,3   1,0   0:02.39          `- python3 /usr/share/ibus/setup/main.py ibus-setup                                                      
   8475 mcb   20   0  312356  28124  13452 S   0,0   0,4   0:02.74      `- /usr/lib/ibus/ibus-extension-gtk3                                                                         
   8502 mcb   20   0  161648   7124   4408 S   0,0   0,1   0:01.48      `- /usr/lib/ibus/ibus-engine-simple                                                                          
   8477 mcb   20   0  233072  19120  11696 S   0,0   0,2   0:00.13  `- /usr/lib/ibus/ibus-x11 --kill-daemon  
# uname -a
Linux 6.0.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Nov 2022 21:14:24 +0000 x86_64 GNU/Linux
# pacman -Qi xfwm4
Name            : xfwm4
Version         : 4.16.1-3
Description     : Xfce's window manager
Architecture    : x86_64
URL             : https://docs.xfce.org/xfce/xfwm4/start
Licenses        : GPL2
Groups          : xfce4
Provides        : None
Depends On      : libxfce4ui  xfconf  libwnck3  libepoxy  libxpresent  hicolor-icon-theme
Optional Deps   : None
Required By     : xfwm4-themes
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 2,17 MiB
Build Date      : P 14 nov 2021 13:27:47
Install Date    : E 07 nov 2022 03:14:36
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature
# pacman -Ss hunspell
extra/hunspell 1.7.1-1 [installed]
    Spell checker and morphological analyzer library and program
...
extra/hunspell-en_us 2020.12.07-4 [installed]
    US English hunspell dictionaries
...
community/hunspell-ru 20210731-1 [installed]
    Russian dictionary for Hunspell
# echo $XDG_SESSION_TYPE
x11

https://imgur.com/fsgtUEN.png https://imgur.com/pIoOAaw.png https://imgur.com/euQaPyO.png

What I am missing ?

mike-fabian commented 1 year ago

It works fine for me on XFCE4 (on Fedora 36 or Fedora 37):

Screenshot

mike-fabian commented 1 year ago

Your sceenshots of “IBus Preferences” look fine.

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

is also OK.

mike-fabian commented 1 year ago

Can you select ibus-typing-booster in the XFCE4 panel? You should see the rocket 🚀 icon in the panel when it is selected (as in my screenshot).

mike-fabian commented 1 year ago

Also check whether a python3 process running /usr/share/ibus-typing-booster/engine/main.py --ibus is running:

$ ps aux | grep booster
mfabian     5606  1.7  8.8 1259892 355028 ?      Sl   22:33   0:05 /usr/bin/python3 /usr/share/ibus-typing-booster/engine/main.py --ibus
mike-fabian commented 1 year ago

Is there anything suspicious in the log file?

The log file is at .local/share/ibus-typing-booster/debug.log.

You can attach the log file here.

andruska commented 1 year ago

Thank you for your references, that helped much, it seems to be problem with ibus.

Reported to here

The similar problems discussed in here and here and here.

mike-fabian commented 1 year ago

https://github.com/ibus/ibus/issues/2462#issue-1467302242 has:

ModuleNotFoundError: No module named 'packaging'

That seems to be a problem in ibus-typing-booster though.

On Fedora this would mean that the python3-packaging package is not installed:

$ rpm -q python3-packaging
python3-packaging-21.3-6.fc37.noarch

On Arch it seems to be in this package: https://archlinux.org/packages/extra/any/python-packaging/

andruska commented 1 year ago

Thanks !

I installed the python-packaging package and the booster started working. This dependency should be included in PKGBUILD. However, the problems with starting the ibus-daemon remained the same.

It seems to me that ibus is still conflicting with the XFCE4 keyboard implementation. Changing the language in ibus is difficult, sometimes the key combination does not work.

Ibus-typing-booster does not work with all programs. It doesn't work in Firefox, Telegram, Emacs. Works well with XFCE4 bundled programs e.g. Mousepad. In the configuration of ibus-typing-booster, in addition to the English language, I added a Russian language (speller and emoji both checked) and a Russian keyboard. After a while, some of the keyboard keys gave Latin letters instead of Cyrillic. The Prediction window offers a mix of both Russian and English words.

I guess I'll have to look into the User Documentation for first.

mike-fabian commented 1 year ago

It works for me in Firefox, Telegram, and Emacs. For Firefox on Xorg you usually need GTK_IM_MODULE=ibus but I think you have that? For emacs you need XMODIFIERS=@im=ibus. The telegram desktop client has a weird bug:

https://github.com/ibus/ibus/issues/2329

Apparently somebody worked on a fix but I don’t have a fixed version yet.

I am using web.telegram.org in Firefox instead, that works fine.

The User documentation for typing booster is here:

https://mike-fabian.github.io/ibus-typing-booster/docs/user/

https://mike-fabian.github.io/ibus-typing-booster/docs/user/#2_1 “Basic setup for your language” https://mike-fabian.github.io/ibus-typing-booster/docs/user/#4 “Multilingual input”

mike-fabian commented 1 year ago

Does everything work for you now or do you still have problems?