[LINUX] Fcitx doesn't work on Flatpak

A distribution-independent package management system is called Flatpak.

This Flatpak allows you to easily install binary packages with user privileges, which is convenient for me as a Gentoo user, but there is one problem. The problem is that I can't input Japanese.

To be honest, I thought I wouldn't have the opportunity to input Japanese so much, but recently I was forced to input Japanese because of the introduction of chat tools. For the time being, I managed to open the Web version in a browser, but I decided to sit down and look for a solution.

Cause

As a result of investigating here and there, I found that the problem of not being able to input Japanese was caused by poor D-Bus communication between Fcitx and the Flatpak app.

Why is the communication not going well? There were two causes. The first is the issue of authority. Flatpak is also security sensitive and pushes your application into the sandbox to run. Naturally, various communications and access are also restricted. As part of that limitation, socket communication is also restricted. Since D-Bus uses socket communication as the link layer, it is naturally affected by this limitation.

solution

Therefore, you need to make a hole in this "firewall". When I looked it up, there was a good issue. Apparently you can specify --talk-name = org.freedesktop.portal.Fcitx at runtime. If you want to set it permanently, you can do ʻoverride`.

Well, the problem is still going on. As the name implies, D-Bus communication is a bus-type communication system, so you need to specify the "destination" (to be exact, the object name). There was a convention in the "destination" naming convention, and most applications followed that convention, but Fcitx didn't. However, with this fix in Fcitx, it now behaves as usual. As a result, Fcitx stopped working on some Flatpak apps that were supposed to behave before. This issue is already known on the Fcitx side.

The solution is to wait for the application to respond or wait for Fcitx to be patched. However, the correction on the Fcitx side has a wide range of influence, and the behavior is the result of correcting the behavior correctly, so I think it is difficult to correct.

I gave up because it was annoying

I'm sorry to write so far, but I decided to escape to iBus for the time being Because I don't speak Japanese so much ...

As mentioned above, I hope it will be useful for those who are having trouble inputting Japanese with Flatpak.

Reference material

-Solving the problem that Japanese cannot be input with Fcitx + Mozc of Arch Linux -D-Bus Story | Wireless / Oto | Silex Technology, Inc.

Recommended Posts

Fcitx doesn't work on Flatpak
pygame doesn't work on macOS Mojave
Tensorflow doesn't work!
When dropbox-sdk-python doesn't work
[Python] Why pserve doesn't work
GrabBox didn't work on Sierra
What to do if Python doesn't work on Git for Windows
LocateCenterOnScreen does not work on PyAutoGui
When matplotlib doesn't work with python2.7
Intellisense doesn't work with tensorflow2.0 + VScode