-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Issue] GTK_IM_Module set? #222
Comments
I don't know but maybe you're using ibus and not fcitx5? I've searched |
I'm at a loss on what to do or how it impacts my setup. I've noticed some times of an app like vlc is open the keyboard won't work and the right mouse button doesn't work...not sure if these things are related to the diagnostic message or not |
I guess you need to install the input method first, since they are not listed in sudo pacman -S fcitx5{,-{qt,lua,configtool,gtk}} ibus If this solves your problem, then I think those pkgs should be added to Or, if you don't need input method, you can just remove the related lines in |
@clsty I installed those packages yet the issue persists.... |
From https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland:
The information you met with comes from here: Click to expand auto *gtk = getenv("GTK_IM_MODULE");
auto *qt = getenv("QT_IM_MODULE");
std::string gtkIM = gtk ? gtk : "";
std::string qtIM = qt ? qt : "";
std::vector<std::string> messages;
const auto desktop = getDesktopType();
if (desktop == DesktopType::KDE5) {
if (!isWaylandIM) {
sendMessage(
"wayland-diagnose-kde",
_("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"));
} else if (!gtkIM.empty() || !qtIM.empty()) {
sendMessage("wayland-diagnose-kde",
_("Detect GTK_IM_MODULE and QT_IM_MODULE being set and "
"Wayland Input method frontend is working. It is "
"recommended to unset GTK_IM_MODULE and QT_IM_MODULE "
"and use Wayland input method frontend instead. For "
"more details see "
"https://fcitx-im.org/wiki/"
"Using_Fcitx_5_on_Wayland#KDE_Plasma"));
}
} else if (desktop == DesktopType::GNOME) {
if (instance_->currentUI() != "kimpanel") {
sendMessage(
"wayland-diagnose-gnome",
_("It is recommended to install Input Method Panel GNOME "
"Shell Extensions to provide the input method popup. "
"https://extensions.gnome.org/extension/261/kimpanel/ "
"Otherwise you may not be able to see input method popup "
"when typing in GNOME Shell's activities search box. For "
"more details "
"see "
"https://fcitx-im.org/wiki/Using_Fcitx_5_on_Wayland#GNOME"));
}
} else {
// It is not clear whether compositor is supported, only warn if wayland
// im is being used..
if (isWaylandIM) {
// Sway's input popup is not merged.
if (!gtkIM.empty() && gtkIM != "wayland" &&
desktop != DesktopType::Sway) {
messages.push_back(
_("Detect GTK_IM_MODULE being set and "
"Wayland Input method frontend is working. It is "
"recommended to unset GTK_IM_MODULE "
"and use Wayland input method frontend instead."));
}
} |
I guess you can just remove the Still, it's kinda weird because I'm using fcitx5 myself and I didn't met with such diagnose notification. And there's another possibility that fcitx5 think you're in sway, not hyprland. Notice that: } else {
// It is not clear whether compositor is supported, only warn if wayland
// im is being used..
if (isWaylandIM) {
// Sway's input popup is not merged.
if (!gtkIM.empty() && gtkIM != "wayland" &&
desktop != DesktopType::Sway) {
messages.push_back(
_("Detect GTK_IM_MODULE being set and "
"Wayland Input method frontend is working. It is "
"recommended to unset GTK_IM_MODULE "
"and use Wayland input method frontend instead."));
}
} Which means that, to pop up this message you saw, the value of EDIT: Sorry for mistake, it's |
As for Click to expandstatic inline DesktopType getDesktopType() {
std::string desktop;
// new standard
auto *desktopEnv = getenv("XDG_CURRENT_DESKTOP");
if (desktopEnv) {
desktop = desktopEnv;
}
if (desktop.empty()) {
// old standard, guaranteed by display manager.
desktopEnv = getenv("DESKTOP_SESSION");
if (desktopEnv) {
desktop = desktopEnv;
}
}
for (auto &c : desktop) {
c = charutils::tolower(c);
}
auto desktops =
stringutils::split(desktop, ":", stringutils::SplitBehavior::SkipEmpty);
for (const auto &desktop : desktops) {
if (desktop == "kde") {
auto *version = getenv("KDE_SESSION_VERSION");
auto versionInt = 0;
if (version) {
try {
versionInt = std::stoi(version);
} catch (...) {
}
}
if (versionInt == 4) {
return DesktopType::KDE4;
}
return DesktopType::KDE5;
} else if (desktop == "x-cinnamon") {
return DesktopType::Cinnamon;
} else if (desktop == "lxde") {
return DesktopType::LXDE;
} else if (desktop == "mate") {
return DesktopType::MATE;
} else if (desktop == "gnome") {
return DesktopType::GNOME;
} else if (desktop == "xfce") {
return DesktopType::XFCE;
} else if (desktop == "deepin") {
return DesktopType::DEEPIN;
} else if (desktop == "ukui") {
return DesktopType::UKUI;
} else if (desktop == "sway") {
return DesktopType::Sway;
}
}
return DesktopType::Unknown;
}
static inline bool isKDE() {
static const DesktopType desktop = getDesktopType();
return desktop == DesktopType::KDE4 || desktop == DesktopType::KDE5;
} |
Please run: echo "1=$XDG_CURRENT_DESKTOP"
echo "2=$DESKTOP_SESSION" and paste your output. |
I tried to add the values below to ~/.bash_profile export GTK_IM_MODULE= |
Well... Firstly, although I don't know why, I hardly see people add these lines into Secondly, you mentioned there're vlc and keyboard problems so I guess |
1=Hyprland 2=hyprland also no mention of fcitx in hyprland.config |
And I forgot to mention that echo "1=$XDG_CURRENT_DESKTOP"
echo "2=$DESKTOP_SESSION" to get the "real" values. |
And there may be pacman -Q|grep xdg-desktop-portal ? |
Ok, so let me summarize what for now: Problems
Try to resolve
sudo pacman --noconfirm -Rdd xdg-desktop-portal-{gnome,wlr}
yay -S --noconfirm --needed xdg-desktop-portal-hyprland-git qt{5,6}-wayland
|
As I mentioned before, the output is from shell, which might be different from other programs e.g. vlc and fcitx5.
|
@clsty |
Update: I may have mistaken something. But I can't find such description anymore on https://wiki.hyprland.org/Useful-Utilities/Hyprland-desktop-portal/, so I guess they're NOT conflicting anymore due to some updates. |
I have not noticed any issue. All seems to work well. |
I get a Wayland diagnostic notification saying "GTK_IM_MODULE being set and Wayland input method frontend is working. It is recommended to unset GTK_IM_MODULE."
I've tried adding the lines below to ~/.bash_profile but same notification appears after login.
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
The text was updated successfully, but these errors were encountered: