Fcitx5 not working under Gnome

This is not my first fcitx5 related question but so far I always thought my issues were specific to Wayland. But now I switched back to X11, yet fcitx5 is still not working. This is my configuration:

{
  i18n.defaultLocale = "en_US.UTF-8";
  i18n = {
    inputMethod = {
      enabled = "fcitx5";
      fcitx5.addons = with pkgs; [
        fcitx5-mozc
        fcitx5-chinese-addons
        fcitx5-gtk
      ];
    };
  };
}

and running the diagnosis tool doesn’t show me anything that’s obviously wrong. Here are a few things that it found though:

3.  Qt IM module files:

    **Cannot find fcitx5 input method module for Qt4.**
    **Cannot find fcitx5 input method module for Qt5.**

2.  `gtk-query-immodules`:
    1.  gtk 2:
        **Cannot find `gtk-query-immodules` for gtk 2**
        **Cannot find fcitx5 im module for gtk 2.**

    2.  gtk 3:
        **Cannot find `gtk-query-immodules` for gtk 3**
        **Cannot find fcitx5 im module for gtk 3.**

3.  Gtk IM module cache:

    1.  gtk 2:
        **Cannot find immodules cache for gtk 2**
        **Cannot find fcitx5 im module for gtk 2 in cache.**
    2.  gtk 3:
        **Cannot find immodules cache for gtk 3**
        **Cannot find fcitx5 im module for gtk 3 in cache.**
    3.  gtk 4:
        **Cannot find immodules cache for gtk 4**
        **Cannot find fcitx5 im module for gtk 4 in cache.**

what do I mean by “it doesn’t work”? Well, I can’t get the input switcher to appear. I added Japanese input through mozc in the config tool and also tried changing the key combo for triggering the input switcher but it never works, regardless of which application I’m in.

Maybe someone here has an fcitx5 Nix config snippet they can share, which works on their machine.

1 Like

I wanted to provide an update. In an act of desperation I took another look at the fcitx5 configuration GUI. This time I checked “Show Advanced options” under “Addons” and noticed that the “X Input Method Frontend” was not enabled. So I enabled it and restarted the daemon systemctl restart --user fcitx5-daemon.service and what do you know, it works.

I try to fcitx5-config-qt then Addons -> X input Method Frontend. Then

I got

$ systemctl restart --user fcitx5-daemon.service
Failed to restart fcitx5-daemon.service: Unit fcitx5-daemon.service not found.

What something wrong I did?

I have known what happened. gnome have a builtin keyboard and use super+space to switch IME and I use same hotkey in fcitx and gnome override it. Just disable the gnome keyboard’s hotkey in gnome-control-center will be OK.

1 Like