Fcitx5 Not Opening Input Box on Electron or Chromium based applications

Hi. I’ve recently switched over to Wayland and Hyperland and have been facing issues with using Fcitx5 with electron based apps (i.e. Brave and Visual Studio Code). The input box opens normally in Alacritty and Firefox. I’ve tried the solutions on the following post but to no avail.

The relevant portions of my configuration.nix are:

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

environment.sessionVariables = lib.mkDefault rec {
  NIXOS_OZONE_WL = "1";
};

Any help is appreciated, thanks in advance!

I found a solution to this. When opening a chromium based browser, you run it with fish -c 'brave --enable-features=UseOzonePlatform --enable-wayland-ime' . I have that bound to a key in my hyperland.conf. I’m unsure if it works on other shells besides fish.

References

Fcitx5 not working on Discord under Wayland
Using Fcitx 5 on Wayland

2 Likes

It’s interesting that this is working for your setup. I’m using GNOME and haven’t had any success with your method, nor with any other hints I’ve found so far.Both ungoogled-chromium and Obsidian cease to use fcitx5.
Maybe I should switch to Sway or Hyprland… I’ve been considering this for a while now.

I’m on Hyprland, and the only thing that’s worked so far is those arguments.

Is there a way to get it to always run Chromium browsers and electron apps with those arguments though?