Can't find where's my GTK_IM_MODULE and QT_IM_MODULE set

Recently when boot up I see a pop-up says “Detect GTK_IM_MODULE and QT_IM_MODULE being set and Wayland Input method frontend is working. It is recommended to use Wayland input method frontend. For more details see Using Fcitx 5 on Wayland - Fcitx

I have searched for this message, the perfect solution is find where the 2 environment variables are set and delete them. But I really can’t find how they are set. I have checked these files (continue updating)

grep “GTK_IM_MODULE” ~/*
grep “GTK_IM_MODULE” /etc/profile
grep “GTK_IM_MODULE” /etc/environment

and I didn’t find a way to install im-config

:pray:

Oh I found it

/etc/profile.d/input-support.sh

# https://wiki.archlinux.org/index.php/Fcitx
# https://wiki.archlinux.org/index.php/Fcitx5

function set_im_env {
    im=fcitx
    export GTK_IM_MODULE=$im
    export QT_IM_MODULE=$im
    export XMODIFIERS=@im=$im
    export INPUT_METHOD=$im
    export SDL_IM_MODULE=$im
}

function set_im_env_gnome_wayland {
    im=fcitx
    # XWayland
    export XMODIFIERS=@im=$im
    export QT_IM_MODULE=$im
}

function set_im_env_kde_wayland {
    im=fcitx
    export XMODIFIERS=@im=$im
    export INPUT_METHOD=$im
    export SDL_IM_MODULE=$im
    # change from waylandui to classicui.
    export QT_IM_MODULE=$im
    export GTK_IM_MODULE=$im
}

if [ "$XDG_SESSION_TYPE" != "wayland" ]; then
    set_im_env
else
  if [ "$XDG_CURRENT_DESKTOP" != "GNOME" ] && [ "$XDG_CURRENT_DESKTOP" != "KDE" ]; then
    set_im_env
  elif [ "$XDG_CURRENT_DESKTOP" == "GNOME" ]; then
        set_im_env_gnome_wayland
  elif [ "$XDG_CURRENT_DESKTOP" == "KDE" ]; then
        set_im_env_kde_wayland
  fi
fi

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.