[SOLVED] Mozc works but isn't listed as an option in fcitx5-configtool

Here is the relevant parts of my configuration.nix

i18n.inputMethod = {
    enabled = "fcitx5";
    fcitx5.addons = with pkgs; [
        fcitx5-mozc
        fcitx5-gtk
        fcitx5-configtool
    ];
};

environment.variables = {
  GTK_IM_MODULE = "fcitx";
  QT_IM_MODULE = "fcitx";
  XMODIFIERS = "@im=fcitx";
  GLFW_IM_MODULE = "ibus";
};

Using fcitx5-configtool, mozc isn’t an option, however:

/run/current-system/sw/lib/mozc/mozc_tool --mode=config_dialog

works perfectly fine,

any help would be appreciated.

I’ve had this problems a few times, and I’ve not been able to come to the bottom of what causes it. I think there might be some shenanigans caused when it’s started via dbus, vs. being started manually using a desktop item (although it should theoretically be the same binary from the same derivation reading the same configuration). Could you try killing the running instance, start fcitx5 via the application item and see if you get a different result? I’ll also assume you’re running X11?

You work magic… before I was opening the configtool, being prompted to start fcitx5 in the configtool and then mozc would be nowhere to be found. After killing it, starting it via dmenu and then editing my config, it suddenly shows up.

Thank you so much

I was having issues all of a sudden with my configuration that had been working fine for years.

I ended up just moving to a different approach with ibus which has been working fine.

My current working config for Japanese is below (if you want it).

{ config, pkgs, ... }:

{
  i18n.inputMethod.ibus = {
    engines = with pkgs.ibus-engines; [ mozc ];
  };

  fonts.packages = with pkgs; [
    ipafont
    kochi-substitute
    noto-fonts-cjk
  ];

  environment.variables = {
    GTK_IM_MODULE = "ibus";
    QT_IM_MODULE = "ibus";
    XMODIFIERS = "@im=ibus";
  };

  environment.systemPackages = with pkgs; [
    ibus-engines.mozc
  ];
}
1 Like