[GH-ISSUE #3732] firefox: cannot use fcitx IME (dbus) #2354

Closed
opened 2026-05-05 09:02:20 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @hugthecactus on GitHub (Nov 7, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3732

I was going to ask for help with this issue but I managed to fix it myself so I'm leaving the solution here in the hope that it will be easier for others to find.

In previous versions of firejail, the way to enable Fcitx input method (for typing in Japanese, for example) was to use ignore nodbus but this has recently been deprecated in favour of various dbus-user and dbus-system options. The one that seems to conflict with Fcitx is dbus-user filter in firefox.profile so what fixed the issue for me was to add the line ignore dbus-user filter to ~/.config/firejail/firefox.local (create if necessary).

Hope that helps someone.

Originally created by @hugthecactus on GitHub (Nov 7, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3732 I was going to ask for help with this issue but I managed to fix it myself so I'm leaving the solution here in the hope that it will be easier for others to find. In previous versions of firejail, the way to enable Fcitx input method (for typing in Japanese, for example) was to use `ignore nodbus` but this has recently been deprecated in favour of various `dbus-user` and `dbus-system` options. The one that seems to conflict with Fcitx is `dbus-user filter` in `firefox.profile` so what fixed the issue for me was to add the line `ignore dbus-user filter` to `~/.config/firejail/firefox.local` (create if necessary). Hope that helps someone.
Author
Owner

@rusty-snake commented on GitHub (Nov 7, 2020):

Does it work if you add dbus-user.talk org.fcitx.Fcitx instead of ignore dbus-user filter? This would be mores secure since it only allows a additional name than all session-bus.

<!-- gh-comment-id:723431869 --> @rusty-snake commented on GitHub (Nov 7, 2020): Does it work if you add `dbus-user.talk org.fcitx.Fcitx` instead of `ignore dbus-user filter`? This would be mores secure since it only allows a additional name than all session-bus.
Author
Owner

@hugthecactus commented on GitHub (Nov 7, 2020):

Just tested dbus-user.talk org.fcitx.Fcitx and unfortunately it's not enough to get it working for me. Happy to test some more configurations though, if you have any other ideas.

<!-- gh-comment-id:723474810 --> @hugthecactus commented on GitHub (Nov 7, 2020): Just tested `dbus-user.talk org.fcitx.Fcitx` and unfortunately it's not enough to get it working for me. Happy to test some more configurations though, if you have any other ideas.
Author
Owner

@rusty-snake commented on GitHub (Nov 7, 2020):

No, unfortunately I have no further ideas. But you can check grep -i fcitx /usr/share/dbus-1/services/* and busctl --user list | grep -iE "(fcitx|firefox)".

<!-- gh-comment-id:723480016 --> @rusty-snake commented on GitHub (Nov 7, 2020): No, unfortunately I have no further ideas. But you can check `grep -i fcitx /usr/share/dbus-1/services/*` and `busctl --user list | grep -iE "(fcitx|firefox)"`.
Author
Owner

@hugthecactus commented on GitHub (Nov 7, 2020):

Aha! That second command listed a few things, among which is org.freedesktop.portal.Fcitx.

Now my firefox.local looks like:

dbus-user.talk org.freedesktop.portal.Fcitx

and it seems to be working just fine. Thanks very much for pointing me in the right direction!

<!-- gh-comment-id:723488645 --> @hugthecactus commented on GitHub (Nov 7, 2020): Aha! That second command listed a few things, among which is `org.freedesktop.portal.Fcitx`. Now my `firefox.local` looks like: `dbus-user.talk org.freedesktop.portal.Fcitx` and it seems to be working just fine. Thanks very much for pointing me in the right direction!
Author
Owner

@rusty-snake commented on GitHub (Nov 7, 2020):

Summary: Depending on the dbus-policy of the profile you need to add different command to its local.

If dbus-user none:

dbus-user filter
dbus-user.talk org.freedesktop.portal.Fcitx
ignore dbus-user none

If dbus-user filter:

dbus-user.talk org.freedesktop.portal.Fcitx

I'll add it to the FAQ.

<!-- gh-comment-id:723490302 --> @rusty-snake commented on GitHub (Nov 7, 2020): Summary: Depending on the dbus-policy of the profile you need to add different command to its local. If `dbus-user none`: ``` dbus-user filter dbus-user.talk org.freedesktop.portal.Fcitx ignore dbus-user none ``` If `dbus-user filter`: ``` dbus-user.talk org.freedesktop.portal.Fcitx ``` I'll add it to the FAQ.
Author
Owner
<!-- gh-comment-id:723543933 --> @rusty-snake commented on GitHub (Nov 8, 2020): https://github.com/netblue30/firejail/wiki/Frequently-Asked-Questions#how-can-i-enable-fcitx
Author
Owner

@Algebro7 commented on GitHub (Jun 3, 2024):

Just a heads up, this no longer seems to work with fcitx5. I have been unable to get it working but here is the output from the grep and busctl commands you provided earlier in case that's helpful:

/usr/share/dbus-1/services/org.fcitx.Fcitx5.service:Name=org.fcitx.Fcitx5
/usr/share/dbus-1/services/org.fcitx.Fcitx5.service:Exec=/usr/bin/fcitx5

busctl --user list | grep -iE "(fcitx|firefox)"
:1.299                                      16140 fcitx5          algebro :1.299        user@1000.service -       -
:1.300                                      16140 fcitx5          algebro :1.300        user@1000.service -       -
:1.301                                      16140 fcitx5          algebro :1.301        user@1000.service -       -
:1.304                                      16140 fcitx5          algebro :1.304        user@1000.service -       -
:1.308                                      16140 fcitx5          algebro :1.308        user@1000.service -       -
:1.313                                      16140 fcitx5          algebro :1.313        user@1000.service -       -
org.fcitx.Fcitx-0                           16140 fcitx5          algebro :1.304        user@1000.service -       -
org.fcitx.Fcitx-1                           16140 fcitx5          algebro :1.301        user@1000.service -       -
org.fcitx.Fcitx5                            16140 fcitx5          algebro :1.299        user@1000.service -       -
org.freedesktop.IBus                        16140 fcitx5          algebro :1.299        user@1000.service -       -
org.freedesktop.IBus.Panel                  16140 fcitx5          algebro :1.299        user@1000.service -       -
org.freedesktop.portal.Fcitx                16140 fcitx5          algebro :1.300        user@1000.service -       -
org.freedesktop.portal.IBus                 16140 fcitx5          algebro :1.308        user@1000.service -       -
org.mozilla.firefox.AAAAAAAA__            23705 0               algebro :1.411        user@1000.service -       -

And ~/.config/firejail/firefox.local for reference:

noblacklist ${HOME}/Pictures
whitelist ${HOME}/Pictures
ignore nou2f
dbus-user filter
dbus-user.talk org.fcitx.Fcitx5
#dbus-user.talk org.freedesktop.portal.Fcitx
ignore dbus-user none

Note I've tried both org.fcitx.Fcitx5 and org.freedesktop.portal.Fcitx (and both at the same time), but none of the configs seem to work. Any ideas on how to fix this?

<!-- gh-comment-id:2145820284 --> @Algebro7 commented on GitHub (Jun 3, 2024): Just a heads up, this no longer seems to work with fcitx5. I have been unable to get it working but here is the output from the `grep` and `busctl` commands you provided earlier in case that's helpful: ```grep -i fcitx /usr/share/dbus-1/services/* /usr/share/dbus-1/services/org.fcitx.Fcitx5.service:Name=org.fcitx.Fcitx5 /usr/share/dbus-1/services/org.fcitx.Fcitx5.service:Exec=/usr/bin/fcitx5 busctl --user list | grep -iE "(fcitx|firefox)" :1.299 16140 fcitx5 algebro :1.299 user@1000.service - - :1.300 16140 fcitx5 algebro :1.300 user@1000.service - - :1.301 16140 fcitx5 algebro :1.301 user@1000.service - - :1.304 16140 fcitx5 algebro :1.304 user@1000.service - - :1.308 16140 fcitx5 algebro :1.308 user@1000.service - - :1.313 16140 fcitx5 algebro :1.313 user@1000.service - - org.fcitx.Fcitx-0 16140 fcitx5 algebro :1.304 user@1000.service - - org.fcitx.Fcitx-1 16140 fcitx5 algebro :1.301 user@1000.service - - org.fcitx.Fcitx5 16140 fcitx5 algebro :1.299 user@1000.service - - org.freedesktop.IBus 16140 fcitx5 algebro :1.299 user@1000.service - - org.freedesktop.IBus.Panel 16140 fcitx5 algebro :1.299 user@1000.service - - org.freedesktop.portal.Fcitx 16140 fcitx5 algebro :1.300 user@1000.service - - org.freedesktop.portal.IBus 16140 fcitx5 algebro :1.308 user@1000.service - - org.mozilla.firefox.AAAAAAAA__ 23705 0 algebro :1.411 user@1000.service - - ``` And `~/.config/firejail/firefox.local` for reference: ```cat ~/.config/firejail/firefox.local noblacklist ${HOME}/Pictures whitelist ${HOME}/Pictures ignore nou2f dbus-user filter dbus-user.talk org.fcitx.Fcitx5 #dbus-user.talk org.freedesktop.portal.Fcitx ignore dbus-user none ``` Note I've tried both `org.fcitx.Fcitx5` and `org.freedesktop.portal.Fcitx` (and both at the same time), but none of the configs seem to work. Any ideas on how to fix this?
Author
Owner

@gloomDev commented on GitHub (Jun 20, 2024):

Any ideas on how to fix this?

Note: I'm using NixOS so my anecdote might not apply. But figured I'd share in case.

I too was having issues getting fcitx5 to work with firejail+firefox.
After some trial and error, I was able to pinpoint the problem to include whitelist-run-common.inc from firefox-common.profile

  • It seems that attempting to whitelist anything within /run/ was preventing this dbus communication. Even if it was an arbitrary folder name.
  • So my temporarily solution was to --include a file that explicitly ignores all of the whitelist rules within whitelist-run-common.inc.
  • So far so good, but this could break some browser functionality on your system.

dbus-user.talk org.freedesktop.portal.Fcitx.* is the rule I'm using.

<!-- gh-comment-id:2181738701 --> @gloomDev commented on GitHub (Jun 20, 2024): >Any ideas on how to fix this? _Note: I'm using NixOS so my anecdote might not apply. But figured I'd share in case._ I too was having issues getting fcitx5 to work with firejail+firefox. After some trial and error, I was able to pinpoint the problem to `include whitelist-run-common.inc` from `firefox-common.profile` - It seems that attempting to whitelist **anything** within /run/ was preventing this dbus communication. Even if it was an arbitrary folder name. - So my temporarily solution was to --include a file that explicitly ignores all of the whitelist rules within whitelist-run-common.inc. - So far so good, but this could break some browser functionality on your system. `dbus-user.talk org.freedesktop.portal.Fcitx.*` is the rule I'm using.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2354
No description provided.