What is the cause of input method problems on non-nix platforms?

There are problems about the input method integration for nix packages installed on a non-nix platform. For example, you cannot use fcitx Dvorak or Chewing in eclipse-java installed on Debian Testing (Bullseye) with Nix, but they work fine on NixOS.

Such problems have been mentioned in a GitHub issue and a NixOS discourse topic.

What is the cause of the problem? Input method integration problems also happen to platform-independent package managers such as Snap and Flatpak. Are the reasons similar to the one(s) with Nix?

Is there any workaround for these problems? Is there a solution that is being worked on?

1 Like

Similar issue here. I believe that the the problem stems from how GTK works in nix. For example, if I install the xterm terminal emulator through nix, I am able to use my input method editor (fcitx) just fine in xterm! However, if I install the leafpad text editor through nix, fcitx doesn’t work in it. I believe this is because xterm talks with fcitx directly, while leafpad relies on GTK to talk with fcitx.

I also notice that all apps installed through nix ignore my GTK theme as well as the cursor theme I set in my ~/.Xresources.

1 Like

How about kate? It uses the Qt library, and is available in Nixpkgs.

The Nix expression that for kate in at pkgs/applications/kde/kate.nix:

Hmmmm AFAIK both QT and GTK have a separate component for talking with input methods. For example, on void linux I have to install both fcitx5-gtk and fcitx5-qt packages to get fcitx to work in both gtk and qt apps.

1 Like

Setting

export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

does not help either.

Anyone know enough about the intricacies of GTK/QT integration with input
methods as to provide a direction of how to proceed with this? All issue
discussions that I could find online seem to abruptly end with no solution.

Is this an inherent problem that can not be fixed? Or is very hard to fix?