Bug 2256267

Summary: add IMSETTINGS_IGNORE_SESSION=*-wayland in /etc/X11/xinit/xinput.d/fcitx5.conf
Product: [Fedora] Fedora Reporter: jackyzy823
Component: fcitx5Assignee: Qiyu Yan <yanqiyu01>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 39CC: i18n-bugs, tagoh, yanqiyu01
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: fcitx5-5.1.10-3.fc41 fcitx5-5.1.10-3.fc39 fcitx5-5.1.10-3.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-07-22 14:30:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jackyzy823 2023-12-30 15:26:57 UTC
Unable to input in Firefox with fcitx5 under Fedora KDE 39

Reproducible: Always

Steps to Reproduce:
1. Install Fedora 39 KDE spin
2. Install fcitx5 fcitx5-mozc and config fcitx5 to add mozc as a input method.
3. Use "Input Method Selecor" to configure to use fcitx5 and log out and log in
4. Test input with Kwrite
5. Test input with Firefox
Actual Results:  
Input in kwrite with fcitx5 successfully.
Failed to input in Firefox with fcitx5.



Expected Results:  
Input in Firefox with fcitx5 successfully.

with maually start firefox with `GTK_IM_MODULE=fcitx firefox`, i could input with fcitx in firefox.

-----

So it looks related to the change in https://bugzilla.redhat.com/show_bug.cgi?id=2232064

---------

in imsettings.log GTK_IM_MODULE is empty.


XINPUTRC: /home/xx/.config/imsettings/xinputrc
          File: /home/xx/.config/imsettings/xinputrc -> /etc/X11/xinit/xinput.d/fcitx5.conf
          Size: 35              Blocks: 8          IO Block: 4096   symbolic link
        Device: 0,38    Inode: 7257        Links: 1 
        Access: (0777/lrwxrwxrwx)  Uid: ( 1000/xx)   Gid: ( 1001/xx)
        Context: unconfined_u:object_r:config_home_t:s0
        Access: 2023-12-30 20:01:07.645109258 +0800   
        Modify: 2022-10-24 00:47:02.011820102 +0800   
        Change: 2022-10-24 00:47:02.011820102 +0800   
         Birth: 2022-10-24 00:47:02.011820102 +0800
Is DBus enabled: yes 
Is imsettings enabled: yes
Is GTK+ supported: yes
Is Qt supported: yes
Is Action needed: yes
DESKTOP: KDE-wayland 
GUESS_DESKTOP: $XDG_SESSION_TYPE
DISABLE_IMSETTINGS:  
IMSETTINGS_DISABLE_DESKTOP_CHECK: 
DBUS_SESSION_BUS_ADDRESS: unix:path=/run/user/1000/bus
GTK_IM_MODULE: 
QT_IM_MODULE: fcitx
XMODIFIERS: @im=fcitx5
IMSETTINGS_MODULE: fcitx5
IMSETTINGS_INTEGRATE_DESKTOP: yes
IMSETTINGS_DISABLE_SYS_XINPUTRC: no
IMSETTINGS_DISABLE_USER_XINPUTRC: no
IMSETTINGS_IGNORE_SESSION:

Comment 1 Jens Petersen 2024-01-04 08:22:39 UTC
Did you enable fcitx as a virtual keyboard in KDE settings? (this aspect of KDE is not very natural...)

Comment 2 jackyzy823 2024-01-04 12:10:22 UTC
Hello,  Jens Petersen .

Thanks for the information. I could input with setting fcitx5 as a virtual keyboard in KDE. 

For anyone who may interested , https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#KDE_Plasma


However there's still a problem.  If i both set input method to fcitx in virtual keyboard and "Input Method Selecor" , after rebooting , fcitx will crash . 

I found the fcitx's popup message:

#: src/modules/wayland/waylandmodule.cpp:464
msgid ""
"Fcitx should be launched by KWin under KDE Wayland in order to use Wayland "
"input method frontend. This can improve the experience when using Fcitx on "
"Wayland. To configure this, you need to go to \"System Settings\" -> "
"\"Virtual keyboard\" and select \"Fcitx 5\" from it. You may also need to "
"disable tools that launches input method, such as imsettings on Fedora, or "
"im-config on Debian/Ubuntu. For more details see https://fcitx-im.org/wiki/"
"Using_Fcitx_5_on_Wayland#KDE_Plasma"
msgstr ""

------------------
So could imsettings automatically set to none when detecting that virtual keyboard is set ?

Comment 3 Akira TAGOH 2024-01-06 19:11:46 UTC
imsettings doesn't support desktops on wayland session. This isn't a bug.

For a crash, We need to add a line of:

IMSETTINGS_IGNORE_SESSION=*-wayland

in /etc/X11/xinit/xinput.d/fcitx5.conf; the wildcard will works after imsettings 1.8.8.

Reassigning to fcitx5.

Comment 4 Fedora Update System 2024-07-22 08:16:52 UTC
FEDORA-2024-5bb189a560 (fcitx5-5.1.10-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-5bb189a560

Comment 5 Fedora Update System 2024-07-22 14:30:33 UTC
FEDORA-2024-5bb189a560 (fcitx5-5.1.10-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 6 Fedora Update System 2024-07-22 16:01:38 UTC
FEDORA-2024-552447c69c (fcitx5-5.1.10-3.fc39) has been submitted as an update to Fedora 39.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-552447c69c

Comment 7 Fedora Update System 2024-07-22 16:01:39 UTC
FEDORA-2024-33a6dd9d49 (fcitx5-5.1.10-3.fc40) has been submitted as an update to Fedora 40.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-33a6dd9d49

Comment 8 Fedora Update System 2024-07-23 01:53:54 UTC
FEDORA-2024-552447c69c has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-552447c69c`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-552447c69c

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2024-07-23 02:01:36 UTC
FEDORA-2024-33a6dd9d49 has been pushed to the Fedora 40 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2024-33a6dd9d49`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2024-33a6dd9d49

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 10 Fedora Update System 2024-07-31 01:33:08 UTC
FEDORA-2024-552447c69c (fcitx5-5.1.10-3.fc39) has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2024-07-31 02:45:12 UTC
FEDORA-2024-33a6dd9d49 (fcitx5-5.1.10-3.fc40) has been pushed to the Fedora 40 stable repository.
If problem still persists, please make note of it in this bug report.