Merge lp:~attente/maliit/1245925 into lp:~ubuntu-core-dev/maliit/maliit-framework-ubuntu

Proposed by William Hua
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 47
Merged at revision: 47
Proposed branch: lp:~attente/maliit/1245925
Merge into: lp:~ubuntu-core-dev/maliit/maliit-framework-ubuntu
Diff against target: 13 lines (+5/-2)
1 file modified
debian/maliit-framework.sh (+5/-2)
To merge this branch: bzr merge lp:~attente/maliit/1245925
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
Michael Sheldon (community) Approve
Sebastien Bacher Approve
Review via email: mp+250311@code.launchpad.net

Commit message

maliit-framework.sh prevents IBus and Fcitx from running under Unity 7 because of the export of QT_IM_MODULE. This export should only be done under a Unity 8 session.

Description of the change

maliit-framework.sh prevents IBus and Fcitx from running under Unity 7 because of the export of QT_IM_MODULE. This export should only be done under a Unity 8 session.

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

the change seems to work fine on a vivid device

review: Approve
Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Seems to work fine on the device, I'm a bit confused though, as printing out the contents of XDG_SESSION_DESKTOP on a device (using the terminal inside unity8) gives "ubuntu-touch" rather than anything containing "unity8-". Do you know where XDG_SESSION_DESKTOP is set and whether this takes on a different value during start up or something? I'd like to fully understand the apparent inconsistency here before approving this.

review: Needs Information
lp:~attente/maliit/1245925 updated
47. By William Hua

Add ubuntu-touch as possible value for XDG_SESSION_DESKTOP.

It comes from the ubuntu-touch-session package from the
/usr/share/lightdm/lightdm.conf.d/52-ubuntu-touch.conf file.

Revision history for this message
William Hua (attente) wrote :

I don't have a device to test this on, but after looking a bit more, you're right. There are two different sessions, one is ubuntu-touch-session (sets it to 'ubuntu-touch'), the other is unity8-desktop-session-mir (sets it to 'unity8-mir'). These values are set by lightdm, which looks up the user-session values from /usr/share/lightdm/lightdm.conf.d/52-ubuntu-touch.conf (from the ubuntu-touch-session package) and /usr/share/lightdm/lightdm.conf.d/55-unity8.conf (from the unity8-desktop-session-mir package) respectively.

So I guess the solution is to add ubuntu-touch as a possible match for XDG_SESSION_DESKTOP. TBH, I'm extremely surprised it worked on the device initially...

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

What's the correct way to test this on the desktop? I'd like to verify that the fix works on the desktop given that it seemed to allow it to start with a different XDG_SESSION_DESKTOP value on devices.

review: Needs Information
Revision history for this message
William Hua (attente) wrote :

It can be tested under Unity 7, set the current input method framework to IBus if it isn't already:

im-config -n ibus

Then restart the session and try:

env | grep MODULE

If it's working properly, you should see:

QT_IM_MODULE=ibus
QT4_IM_MODULE=ibus
GTK_IM_MODULE=ibus

Otherwise, you'll see something like:

QT_IM_MODULE=maliitphablet

and QT4_IM_MODULE and GTK_IM_MODULE will not be set to ibus, preventing input methods from working.

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Double checked on the desktop and it seems to be working correctly. It looks like QT_IM_MODULE=maliitphablet is also set in /etc/environment on the phone images, which explains why it still worked when the session name was different.

review: Approve
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

There is a side effect of changing it this way as it will export the variable if you're trying to launch apps from the shell (adb/ssh), as XDG_SESSION_DESKTOP is not available in there. This is not a problem as we have the same export happening via /etc/environment, so it's still a good change.

Later I don't think we need to have this file provided by this package, but we fist need to clean up our environment file.

review: Approve
Revision history for this message
Ricardo Salveti (rsalveti) wrote :

*it will not export

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/maliit-framework.sh'
2--- debian/maliit-framework.sh 2013-07-17 20:56:00 +0000
3+++ debian/maliit-framework.sh 2015-03-05 21:50:26 +0000
4@@ -1,4 +1,7 @@
5 # Exports the QT_IM_MODULE from the maliit-framework package
6-QT_IM_MODULE=maliitphablet
7
8-export QT_IM_MODULE
9+case $XDG_SESSION_DESKTOP in
10+ ubuntu-touch|unity8*)
11+ export QT_IM_MODULE=maliitphablet
12+ ;;
13+esac

Subscribers

People subscribed via source and target branches