Bug 1215962 - XMODIFIERS and QT_IM_MODULE are not set when using Gnome Wayland, therefore ibus does not work in Qt or X11 programs started from a Gnome Wayland desktop
Summary: XMODIFIERS and QT_IM_MODULE are not set when using Gnome Wayland, therefore i...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-settings-daemon
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Bastien Nocera
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-28 08:50 UTC by Mike FABIAN
Modified: 2016-07-20 05:01 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 13:53:52 UTC
Type: Bug


Attachments (Terms of Use)

Description Mike FABIAN 2015-04-28 08:50:44 UTC
On a Gnome Wayland session in Fedora 22 Beta, ibus works
after the fix by Fujiwara San is applied
(see https://bugzilla.redhat.com/show_bug.cgi?id=1214271#c6).

But in Qt or plain X11 programs started from a Gnome Wayland session,
ibus still does not work
(see https://bugzilla.redhat.com/show_bug.cgi?id=1214271#c3).

This is because the environment variables

    XMODIFIERS=@im=ibus

and

    QT_IM_MODULE=ibus

are not set.

Setting the environment variable GTK_IM_MODULE=ibus is optional
because 

    [mfabian@Fedora-Live-Workstation-x86_64-2 ~]$ dconf dump /org/gnome/desktop/interface/
    [/]
    gtk-im-module='ibus'

already makes the GTK programs use ibus.

But XMODIFIERS and QT_IM_MODULES are required.

Comment 1 Mike FABIAN 2015-04-28 09:19:30 UTC
On a non-Wayland Gnome session on Fedora 22 Beta,
QT_IM_MODULE=ibus and XMODIFIERS=@im=ibus are set.

Comment 2 Mike FABIAN 2015-04-28 09:22:19 UTC
On a non-Wayland Gnome session on Fedora 22 Beta,

IM_SETTINGS_MODULE=IBus

is set as well, which is not set on the Gnome Wayland session either.

Comment 3 Mike FABIAN 2015-04-28 09:31:00 UTC
(In reply to Mike FABIAN from comment #2)

> IM_SETTINGS_MODULE=IBus

IMSETTINGS_MODULE=IBus

sorry for the typo.

Comment 4 Ray Strode [halfline] 2015-04-29 14:36:14 UTC
This probably works in X but not wayland, because X sessions are run through the 

 /etc/X11/Xsession 

shell script which runs a tower of shell scripts in

 /etc/X11/xinit/xinitrc.d

We don't run Xsession on wayland, so probably need to find some other way to set the environment variables (or change the code to have the right defaults and not need them)

Comment 5 fujiwara 2015-04-30 05:54:17 UTC
gnome-settings-daemon/main.c:set_legacy_ibus_env_vars() sends QT_IM_MODULE and XMODIFERS environment variables.

and gnome-session/gsm-manager.c:gsm_manager_setenv() receives the environment variables and calls setenv().

setenv() works in non-Wayland GNOME but does not work in GNOME Wayland.

Comment 6 fujiwara 2015-05-11 05:39:43 UTC
__environ[] includes QT_IM_MODULE and XMODIFIERS in gnome-session but /proc/$PID/environ does not include the variables.
I don't know why this can happen in wayland.

Comment 7 Fedora End Of Life 2016-07-19 13:53:52 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 8 fujiwara 2016-07-20 05:01:45 UTC
Fixed verified in Fedora 24.


Note You need to log in before you can comment on or make changes to this bug.