Bug 1217920 - QT_IM_MODULE is always set on plasma 5.27.9
Summary: QT_IM_MODULE is always set on plasma 5.27.9
Status: NEW
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Marguerite Su
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-10 13:45 UTC by Xu Zhao
Modified: 2024-03-23 11:40 UTC (History)
3 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xu Zhao 2023-12-10 13:45:13 UTC
According to the fcitx5 on wayland wiki page: https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland

QT_IM_MODULE and GTK_IM_MODULE and SDL_IM_MODULE are not suggested to be set on fcitx5+plasma_wayland>5.27.

However, after I install fcitx5 on opensuse 20231117, these environment variables are still being set by default.

Is there a way that I can disable setting these environment variables on startup?
Comment 1 Xu Zhao 2023-12-10 23:37:27 UTC
I have made some progress debugging this issue.

According to the fcitx5 on wayland best practice, on KDE Plasma it requires to set the Virtual Keyboard to "fcitx5" in the KDE system settings. This will also make KDE to autostart fcitx5 by default upon start.

However, this will conflict with /etc/xdg/autostart/org.fcitx.Fcitx5.desktop and /usr/lib/systemd/user/fcitx5.service in the fcitx5 rpm package, making them autostart to fail, because fcitx5 is already started by KDE.


Second, the best practice says QT_IM_MODULE and GTK_IM_MODULE are deprecated and should not be set. However, in /usr/etc/X11/xim.d, the fcitx5 package installs a bunch of files setting up these environment variables. They should not be set if KDE plasma+Wayland is being used.
Comment 2 Marguerite Su 2023-12-24 08:48:03 UTC
since it's the 'best' practice, you have to tolerate the existence of 'better' practice and 'plain' practice.

remember openSUSE is not a KDE-only distribution. please be sure to have all the contents in chapter "support in wayland compositor" read, then talk about 'balanced' practice. 

in my opinion, the 'best' practice is to have all DE openSUSE support work, not to satisfy any single one.
Comment 3 Xu Zhao 2024-01-03 12:32:16 UTC
(In reply to Marguerite Su from comment #2)
> since it's the 'best' practice, you have to tolerate the existence of
> 'better' practice and 'plain' practice.
> 
> remember openSUSE is not a KDE-only distribution. please be sure to have all
> the contents in chapter "support in wayland compositor" read, then talk
> about 'balanced' practice. 
> 
> in my opinion, the 'best' practice is to have all DE openSUSE support work,
> not to satisfy any single one.

It is possible to achieve the best of both worlds?

For example, I could image in the `xim.d` scripts, we first check if kwin_wayland is running or service is enabled. If true, we do not set up the the environment variables.
Comment 4 ulfbart 2024-03-16 09:16:28 UTC
After update to plasma 6.0.1/6.0.2 message was shown:

"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"