New Fcitx5 problems on Linux; Two Japanese IME questions for Anki 25.07.2 (3adcf05c) and later

Hello.

These are my questions, which also serve as the tl;dr:

  1. Do you have a Japanese input method that’s working reliably for Anki 25.07.2 (3adcf05c) or later from GitHub (not AUR or package managers) on any Linux distro? If so, what IME and distro?
  2. Did you have to fix anything? If so, what did you fix?

I didn’t structure the text below the best that I could, and that’s mostly because I only care about what I asked above. Think of my text below as an explanation for why I’m even asking.


My primary study topic is Japanese. For about 50% of the vocab cards I’m reviewing, I need to type kana in order to review at a decent pace. I also need to type kanji and kana at every stage while introducing new cards, mostly while editing them and searching against existing notes. This continues for the early stages of new cards as I improve my hints.

I was able to type Japanese just fine using fcitx5 with Anki 25.02. I was also able to use standard hotkeys, like 3 for “good”, without having to swap away from hiragana mode (distinction: romaji input for hiragana, not pure hiragana input). I updated my Arch Linux desktop and upgraded to Anki 25.07.2 from GitHub (I only use the direct downloads, no AUR). I could still type Japanese, just not in Anki (example locations that don’t work reliably: typed answer, browser window). I used the internal tool to downgrade back to 25.02. It didn’t change the situation. Running sudo /usr/local/share/anki/uninstall.sh and going back to the previous version that I had saved from GitHub doesn’t fix it. I haven’t tried rm’ing .local/share/Anki2/ or .local/share/AnkiProgramFiles/.

This is just to show that I have qt covered for fcitx5:

$ pacman -Ss fcitx5 | grep installed
extra/fcitx5 5.1.14-1 (fcitx5-im) [installed]
extra/fcitx5-anthy 5.1.7-1 [installed]
extra/fcitx5-configtool 5.1.9-1 (fcitx5-im) [installed]
extra/fcitx5-gtk 5.1.4-1 (fcitx5-im) [installed]
extra/fcitx5-qt 5.1.10-1 (fcitx5-im) [installed]

I also have Arch’s qt5 and qt6 package groups installed.

I tried swapping between these:

  • Sway
  • Hyprland
  • dwm
  • qtile
  • cinnamon
  • xfce4

I tried getting ibus to work instead, but I’m not sure I did everything needed.

I tried using fcitx instead of fcitx5. I remembered to grab the qt packages while doing so.

I also went through the typical fight involving IME variables (example instruction page: link). For example, modifying, unsetting, assigning as empty, manually setting while launching Anki, and changing where these are used:

GLFW_IM_MODULE=fcitx
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
#QT_IM_MODULES="wayland;fcitx;ibus"
XMODIFIERS=@im=fcitx

I also went through the motions involving variables for ibus.

I usually can’t even swap keyboard layouts unless the text field I’m using is the only type of text field that I’ve focused for the session!

I thought maybe it was a problem generated by the Arch Linux update. I have an Arch Linux laptop set up mostly the same, except I had 25.02.6 on it. I upgraded Anki to 25.07.2 without running an Arch Linux update. The same problem occurred. I could type Japanese, but not if I was using Anki. But this time, I didn’t bother to use the internal tool to downgrade and instead went straight to the uninstall. I then installed the previous version I had saved, which allowed me to type Japanese. This still doesn’t prove much to me because I don’t know what files, missing or not, would cause that.

I pulled out a laptop I’ve been treating as dead and installed Linux Mint with xfce on it. That makes it an attempt via the Debian / “just works” route. I got fcitx5 working. I also got a fresh Anki-from-GitHub install working and never modified it beyond that. But I still couldn’t use fcitx5 with Anki 25.07.2.

I remembered to disable addons, including anki-launcher, for my desktop while writing this. That didn’t fix it.

I searched via Google, reddit, and these forums, but I found nothing that ended the problem for me.


Secondary issue: when fcitx5 unreliably works, Anki won’t let me just stay in hiragana mode to hit 1, 2, 3, 4, b, d, o, and so on. For example, it requires that I swap each time that I score my answer:

  1. Type kana and submit with enter
  2. Swap layouts
  3. Score my answer
  4. Swap layouts
  5. Repeat

It wasn’t this way before.


There are things I’ve forgotten to include. There are also things I haven’t tried. But what I want more than an answer to this problem with my specific setup is the ability to type Japanese during my reviews so that I can move on.

I’ve spent enough of my free time on this. I just want to get back to my reviews like in the good times last month. I’ve already been getting very behind due to other things. If there’s a solution that requires it, I’ll even wipe my study laptop and install something ugly (but not Windows)!

IBUS/mozc input works out of the box for me on Ubuntu 24.04. Fcitx may not work out of the box anymore, as the PyPI versions of Qt don’t ship with an fcitx module IIRC.

1 Like

I’ll try this next. I’ll also look into what that latter part means. Thank you!

I’m just letting you know that ibus+mozc worked in linuxmint+xfce! I’ll still look into what you meant about the module later, but now I can get caught up, which is the most important thing!

For anyone after me trying this on linuxmint, you won’t have GUI access to the settings until you install the mozc-utils-gui package. Run sudo apt install mozc-utils-gui to install it.

I guess that means you could still compile your own Anki build with Qt in a way so that fcitx works. Or somebody else could create compatible packages. Just the particular Anki build that you get through using the launcher downloaded from GitHub will use Qt from PyPI and not from your Arch installation.

1 Like

Can a fcitx module not be included after the fact by Anki? I hope there will be a real solution for this because switching to Ibus is not that.

2 Likes

I gave compiling a shot, and now Fcitx5/Anthy’s working again on Anki 25.07.3 in Wayland/Sway in Arch Linux! Thank you!


For those who have problems after me, here’s basically what I did:

tl;dr version:

  1. Run these commands:
    sudo pacman -S rustup ninja
    cd ~/
    git clone https://github.com/ankitects/anki.git
    cd ~/anki
    git checkout 25.07.3
    ./run
    # Keep solving errors until ./run launches Anki. The above was all that I
    # needed, but I'm not on a clean Arch install.
    
  2. If Fcitx5 still doesn’t work, edit ~/.bashrc to contain these lines:
    unset GTK_IM_MODULE
    export XMODIFIERS=@im=fcitx
    unset QT_IM_MODULE
    export QT_IM_MODULES="wayland;fcitx" # Remove "wayland;" if you don't use Wayland.
    export GLFW_IM_MODULE=fcitx
    
  3. Use the command source ~/.bashrc.

Long version:

  1. Take a look at these pages to see if you’re missing anything:
    Anki GitHub: linux.md
    Anki Manual: Requirements
  2. Take a look at this page for notes about building:
    Anki GitHub: development.md
  3. Uninstall any currently installed Anki to avoid false positives.
    sudo /usr/local/share/anki/uninstall.sh
  4. If you’re using one, choose where the git folder’s going to be and get inside it.
    mkdir ~/.git
    cd ~/.git
  5. Get source code from the Anki releases page OR choose a method like shown below from How to clone git repository with specific revision/changeset?
    git clone https://github.com/ankitects/anki.git
    cd anki
    either git checkout 25.07.3
    or git reset --hard 65b5aefd0705463cb12e72e254f798f90c96e815
    • See this image for where 65b5aef…15 is on the releases page. You don’t need to enter the full string. You only need enough characters so that git knows which one you mean:
  6. (Bazel may be an unnecessary package) I found and installed the package that provides bazel because this post hinted that it’s needed: Guide: How to build and run Anki from Source with Xubuntu 20.04
    sudo pacman -S bazel
  7. When executing ./run, I got an error about cargo. There was a choice between rust and rustup. I went with rust. It was enough. Edit: development.md#building-from-source says to use rustup, but I didn’t see that.
    sudo pacman -S rustup
  8. I got an error about tools/install-n2 and ninja. Installing ninja fixed it.
    sudo pacman -S ninja
  9. The final step for confirmation. Anki launches when it’s done. Fcitx5 works again.
    ./run
  10. If Fcix5 doesn’t work yet:
    a. Edit ~/.bashrc to contain these lines:
    unset GTK_IM_MODULE
    export XMODIFIERS=@im=fcitx
    unset QT_IM_MODULE
    export QT_IM_MODULES="wayland;fcitx" # Remove "wayland;" if you don't use Wayland.
    export GLFW_IM_MODULE=fcitx
    
    b. Either use the command source ~/.bashrc or log out and back in again.

Other:

  1. Consider optimization: Optimized builds. These are the choices:
    ./tools/runopt
    RELEASE=1 ./run (same as ./tools/runopt)
    RELEASE=2 ./run (more optimization, slower)

  2. Consider making wheels: Building redistributable wheels

    The ./run method described in the platform-specific instructions is a shortcut for starting Anki directly from the build folder. For regular study, it’s recommended you build Python wheels and then install them into your own python venv.

Notes:
I’m not great at using git.
I haven’t done this on a clean install.
I haven’t used wheels, so I know basically nothing regarding them. (edit: The wheels version works too! I’ll explain this when I’m back home in mid-September.)
If these change, I’ll update my comment.

4 Likes

I was having the same issues and ended going to PythonWheels route too, so I figured I’d add a little of what I figured out in the process. The instructions on the Intro & Downloads page (link removed because forum rules D:< ) mostly worked, with the major omission of needing to clone the repository first, then run the commands one at a time from within the repository folder. If you copy past the whole set of pipenv instructions into the terminal at the same time, only the first one will execute and the others will return a “Unknown command” error.

To summarize what I did (On Arch):

1 - Install python dependencies and git (some may not be required, I just installed everything I thought I might need)

NOTE: I did also download the dependencies OP mentioned, so if this doesn’t work, try downloading those too.

sudo pacman -Sy git python pyqt6 python-pip

2 - clone the git repo (replace {instal location} with the location you want the repo to live. OP put it in ~, I chose to put it in ~/Documents/Applications)

cd {install location}
git clone https://github.com/ankitects/anki.git
cd anki

Side note, I did checkout 27.07.3 as OP did then didn’t bother checking the head back out, but I’d imagine being on the head is fine as the next step will download the latest version regardless.

3 - Setup and install the pipenv (from Intro & Downloads)

NOTE: Remember you must run these one at a time or the last 3 commands might not run at all.

python3 -m venv --system-site-packages pyenv
pyenv/bin/pip install --upgrade pip
pyenv/bin/pip install --upgrade --pre aqt #remove --pre to get the latest stable release
pyenv/bin/anki

If for some reason this doesn’t work even after executing the commands individually, try running ./run, then try again. I can’t imagine that would change much, but I tried (and failed) to build it before using PythonWheels.

As mentioned in Intro & Downloads, if you want to run anki from the command line, just run the last 2 commands. The 2nd to last updates anki, the last runs it.

4 (Optional) - Create a .desktop shortcut

To make the shortcut I copied the contents of my existing Anki.desktop file, then changed the exec and tryexec fields to mirror those in the last part. Keep in mind, in the shortcut I made it doesn’t update anki before running it

Here is the contents of the desktop file I created (replace {instal location} with the path to the anki repository, in my case it is: `/home/{username}/Documents/Applications/anki`)

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=AnkiWheels
Comment=An intelligent spaced-repetition memory training program
GenericName=Flashcards
Exec={install location}/pyenv/bin/anki %f
TryExec={install location}/pyenv/bin/anki
Icon=anki
Categories=Education;Languages;KDE;Qt;
Terminal=false
Type=Application
Version=1.0
MimeType=application/x-apkg;application/x-anki;application/x-ankiaddon;
#should be removed eventually as it was upstreamed as to be an XDG specification called SingleMainWindow
X-GNOME-SingleWindow=true
SingleMainWindow=true
StartupWMClass=anki

Hopefully someone finds this useful and thank you OP for giving me a lead to follow :slight_smile:

2 Likes

I have been using Anki for Japanese language studies since 2022 on my Fedora without any typing issue.
After upgrading from Anki 25.02 to 25.07.05, I cannot type Japanese anymore.
I type the “keyboard<=>IME” (CTRL+S) switch shortcut but I still can type only alphabet characters.
CTRL+S is a customized shortcut I had chosen some years ago that always worked fine, but does not work anymore now.

This is my OS setup:

OS: Linux Fedora 42
Kernel: x86_64 Linux 6.15.9-201.fc42.x86_64
Resolution: 2160x1440
DE: GNOME 48.3
WM: Mutter
WM Theme:
GTK Theme: Adwaita [GTK2/3]
Icon Theme: Adwaita
Font: Adwaita Sans 11
CPU: AMD Ryzen 5 4600H with Radeon Graphics @ 12x 3GHz
GPU: AMD Radeon Graphics (radeonsi, renoir, ACO, DRM 3.63, 6.15.9-201.fc42.x86_64)
RAM: 5230MiB / 15345MiB
IME: fcitx5 5.1.13 // Mozc 2.31.57.12.102

Anki debug info:

Anki 25.07.5 (7172b2d2) (ao)
Python 3.13.5 Qt 6.9.1 PyQt 6.9.1
Platform: Linux-6.15.9-201.fc42.x86_64-x86_64-with-glibc2.41

===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AnkiConnect [‘2055492159’, 2025-06-13T11:01, ‘None’, ‘’]
Japanese Support [‘3918629684’, 2023-10-19T12:13, ‘None’, ‘’]
Kanji Colorizer stroke order diagrams [‘1964372878’, 2024-07-04T04:09, ‘None’, ‘’]

===IDs of active AnkiWeb add-ons===
1964372878 2055492159 3918629684

===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
Edit Field During Review Cloze [‘385888438’, 2025-08-04T23:13, ‘6.23’, mod]

1 Like

Thank you very much. I had found that post but I thought to not have enough knowledge to be able to handle with it. Anyway, I ended up to have the latest stable release working with fcitx5 and I hope all other features will run smoothly too.

After all, I’m not a developer, I’m just a certified Linux ex-IT-engineer. I have no idea about how to maintain the installation I’ve just done, then I hope the developer community will find a way to fix it so that users (especially the not skilled ones) can go back to the standard way of installing/upgrading Anki.

1 Like

Thank you for adding to this! I suddenly didn’t and still don’t have time to make proper follow-ups.

I ran through a gauntlet doing a fresh install on my laptop before this trip, but I need to do it again to be sure of the exact requirements. I won’t have the spare day for that until mid-September.

One change I’m pretty sure on for the instructions I gave: The bazel package isn’t necessary as an installed system package. It’s not in my pacman -Qq | grep bazel output despite succeeding.

I still hadn’t thought of steps for installing the wheels package beyond a .local/bin/ file pointing to Anki ( pyenv/bin/anki ), so thank you. I’ll try it out when I’m back.

For step 3 above, the replacement instruction given at anki/docs/development.md at main · ankitects/anki · GitHub regarding https://betas.ankiweb.net/#via-pypipip tells us that the wheels commands for “Mac (both Intel/Apple), and Linux (x86_64)” become

./tools/build # creates wheels (.whl files) in out/wheels/
python3 -m venv pyenv
pyenv/bin/pip install --upgrade pip
#pyenv/bin/pip install --upgrade --pre 'aqt[qt6]'
pyenv/bin/pip install --upgrade out/wheels/*.whl # replaces aqt line
pyenv/bin/anki

Other than negating the need for ./tools/build, I don’t know what the total difference is if we execute the aqt line instead. I haven’t tried it. Oh, I see. You already gave the answer:

So the wheels lines are to keep the selected Anki version and the aqt line is to get the latest version (including betas).

Having had the same issue I followed @IronFishJmp0 ‘s steps and managed to get fcitx5 working. 27.07.5 didn’t work; only the Pre-release version has worked (thus far) with fcitx5.

You reminded me that there’s another step. Even though you may have succeeded with release versions, things may not work right when you’re testing. There are some environment variables that need to be set or unset/empty in a certain way.

Things are working well in Anki version ⁨25.07.5 (7172b2d2)⁩ on my laptop. This is in my ~/.bashrc, not ~/.profile, because that’s the file that has loading priority:

unset GTK_IM_MODULE
export XMODIFIERS=@im=fcitx
unset QT_IM_MODULE
export QT_IM_MODULES="wayland;fcitx" # Remove "wayland;" if you don't use Wayland.
export GLFW_IM_MODULE=fcitx

If I try to mess with the GTK/QT module variables, things go wrong.


I remembered another thing. Just so that you’re all aware:

There’s a bug that I have no idea on the source or the solution for. In Anki, not necessarily because of Anki, sometimes fcitx5 or Anki will decide it needs to hold backspace even if what I’m typing never used backspace. It’ll keep going and going even after nothing’s left. Hit backspace once and it’ll stop doing that until the next time.

Hello everyone,
I had the same issue on Fedora 42.
I don’t have any developing skills, but I’m a ex IT-engineer with Linux knowledge, so I could get out of this issue making a mix of @stupid and @IronFishJmp0 ‘s solutions. Now my Anki works (without launcher), even though I’ve no idea on how to maintain this kind of installation when It comes to install new updates. I’m very thankful to you all.

It’s clear this issue has popped out since anki-launcher was introduced.
I’d like to write down some consideration about this problem hoping can help us to address this solution in a way that could help the team to fix this bug. IMHO, this is a bug and should be fixed after all.

  • I would consider to unmark as solved this post with IBUS solution, that’s not a solution. That’s a workaround that doesn’t bring back any chance to use fcitx5 to users that want to use it and lost that feature, due to anki-launcher.
  • Compilation is not necessary to make Anki work again. @IronFishJmp0 solution make it works correctly. How could we maintain this kind of installation? I don’t know wheels, what that is, how can help in this situation. May you help to clarify for non skilled users?
  • I believe we could help the community in applying these workaround making a clear step-by-step and distro indipendent post
  • I feel like, even posting in AnkiForums is the official way to post an issue, there’s no bug tracking system and we don’t have any means to know if the team is taking in consideration to fix it or cut the compatibility with fcitx5. IMHO there is a lack of communication in between the team/project and users community on how the bugs/issues are managed. What is the official direction that this issue takes? How will it end up?

I had opened another post about this, but I will close it and point to this post to avoid posting duplication and take users to a valid post like this.

1 Like

Hello,

After recent system upgrade (to Debian 13) and Anki update (using the version from official website), it seems like fcitx5 Mozc input in Anki has stopped working. Now, when user switches to kana input and enters text, Anki simply outputs text in English. No Anki, environment variables or other input-related configuration has changed.

Could you please help with fixing the problem?

Additional information: the issue is also reproducible with 25.02.7 and 24.11 Anki versions.

@giragira, thank you! Actually, I’ve reviewed that thread before creating this one, but its seems like there hasn’t been defined one official solution/fix to address the issue, so I’ve created this one that clearly describes and illustrates the problem. There were suggestions with alternative installation methods, but I assume the official Anki binaries are expected to behave correctly.

Therefore, I wonder whether this issue can be passed to developers for investigation.

1 Like

Since this issue is new in 25.07 for everyone else, can you confirm – did you do fresh installs with those versions, or did you use the same launcher to “downgrade” to those versions?

I moved your post to this thread, because creating a separate thread makes it harder to track the issue. But at the suggestion of a few users, I’ve removed the “SOLVED” from the title.

@Danika_Dakika, I’ve used the launcher’s downgrade option to change versions.

Okay, good. I think that isn’t confirmation that the issue exists in those Anki versions – it’s still an issue related to the launcher itself. Hopefully a fresh install of 25.02.7 will continue to work for you for now – Release 25.02.7 · ankitects/anki · GitHub .

2 Likes