Merge lp:~attente/unity8/gtk-qt-im-module into lp:unity8

Proposed by William Hua on 2015-11-24
Status: Rejected
Rejected by: Michał Sawicz on 2015-12-08
Proposed branch: lp:~attente/unity8/gtk-qt-im-module
Merge into: lp:unity8
Diff against target: 21 lines (+6/-0)
1 file modified
data/unity8.conf (+6/-0)
To merge this branch: bzr merge lp:~attente/unity8/gtk-qt-im-module
Reviewer Review Type Date Requested Status
Michał Sawicz Disapprove on 2015-12-08
Albert Astals Cid (community) 2015-11-24 Approve on 2015-12-02
PS Jenkins bot continuous-integration Needs Fixing on 2015-11-25
Review via email: mp+278522@code.launchpad.net

Commit Message

Set environment variables needed for Maliit to work with GTK+/Qt apps.

livecd-rootfs currently sets these in /etc/environment on flash. Doing it here instead will allow us to remove it from there.

Description of the Change

 * Are there any related MPs required for this MP to build/function as expected? Please list.

No

 * Did you perform an exploratory manual test run of your code change and any related functionality?

Yes, but only by directly copying the altered file into the file system. An unrelated test is failing, preventing the package from building:

task-0: FAIL! : SessionBackendTest::testLogin1Capabilities() Compared values are not the same
task-0: Actual (dbusUnitySessionService.CanHibernate()) : 0
task-0: Expected ((login1face.call("CanHibernate").arguments().first().toString() != "no")): 1
task-0: Loc: [/home/phablet/Code/unity8/unity8-8.11+16.04.20151112.1/tests/plugins/Unity/Session/sessionbackendtest.cpp(157)]

 * Did you make sure that your branch does not contain spurious tags?

Yes

 * If you changed the packaging (debian), did you subscribe the ubuntu-unity team to this MP?

Packaging was not changed

 * If you changed the UI, has there been a design review?

Packaging was not changed

To post a comment you must log in.
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Continuous integration, rev:2058
http://jenkins.qa.ubuntu.com/job/unity8-ci/6806/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-vivid-touch/5397
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-xenial-touch/221/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity-phablet-qmluitests-vivid/1517
    FAILURE: http://jenkins.qa.ubuntu.com/job/unity8-qmluitest-xenial-amd64/219/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-amd64-ci/1412
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-vivid-i386-ci/1412
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-amd64-ci/219
    SUCCESS: http://jenkins.qa.ubuntu.com/job/unity8-xenial-i386-ci/218
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-vivid-touch/4267
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5411
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-vivid-armhf/5411/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25483
    FAILURE: http://jenkins.qa.ubuntu.com/job/generic-deb-autopilot-runner-xenial-touch/71/console
    SUCCESS: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/220
        deb: http://jenkins.qa.ubuntu.com/job/generic-mediumtests-builder-xenial-armhf/220/artifact/work/output/*zip*/output.zip
    SUCCESS: http://s-jenkins.ubuntu-ci:8080/job/touch-flash-device/25482

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/unity8-ci/6806/rebuild

review: Needs Fixing (continuous-integration)
Albert Astals Cid (aacid) wrote :

What's the benefit of doing it here instead of /etc/environment ?

review: Needs Information
William Hua (attente) wrote :

Putting them in /etc/environment seems like kind of a hack. Those variables are related to the graphical environment in Unity 8 only, so it would be ideal if they were not set in other desktop shells or VTs where they aren't needed.

Albert Astals Cid (aacid) wrote :

Is this something we really need?

I've dropped the QT_IM_MODULE=maliitphablet export from /etc/environment in the phone and on reboot the unity8 process has QT_IM_MODULE=maliitphablet in its /proc/pid/environ.

I'm guessing it comes from /etc/profile.d/maliit-framework.sh ?

So maybe you can just drop it from /etc/environment without the need to add it to unity8?

review: Needs Information
William Hua (attente) wrote :

Yes, we need it. It isn't running /etc/profile.d/maliit-framework.sh on the Nexus 4 at all. This means just removing it from /etc/environment and rebooting, I can no longer adb into the device since it's locked, and I can't unlock it since QT_IM_MODULE isn't being set and the OSK needs it.

Albert Astals Cid (aacid) wrote :

It's really weird that the behaviour on your phone and on mine is different but oh well, i guess this won't hurt either.

 * Did you perform an exploratory manual test run of the code change and any related functionality?
Yes

 * Did CI run pass?
Yes for vivid

 * Did you make sure that the branch does not contain spurious tags?
Yes

review: Approve
Michał Sawicz (saviq) wrote :

So... I removed the line from /etc/environment, rebooted, and:

phablet@ubuntu-phablet:~$ initctl get-env QT_IM_MODULE
maliitphablet

So I'm not sure there's a need for this?

review: Needs Information
Michael Terry (mterry) wrote :

I also am able to remove the QT_IM_MODULE line from /etc/environment and it's correctly set by /etc/profile.d/maliit-framework.sh. (This is on mako, which you said you had.)

So I second this branch not being needed here... But this branch also sets GTK_IM_MODULE, which isn't currently done by maliit-framework.sh. Maybe this should turn into a branch against maliit to set that in its profile.d file.

William Hua (attente) wrote :

It's really strange that my device is acting differently from everyone else's. But if that's the case, then I guess it's safe to just remove it from livecd-rootfs.

Does anyone have an opinion on moving maliit-framework.sh out of the Maliit source package anyways? The contents seem quite Unity 8 specific...

Michał Sawicz (saviq) wrote :

I'm fine with moving the file to unity8 session (note there are currently two separate packages for touch and desktop - ubuntu-touch-session and unity8-desktop-session-mir).

review: Disapprove

Unmerged revisions

2058. By William Hua on 2015-11-24

Don't pass values when unsetting

2057. By William Hua on 2015-11-24

Set environment variables needed for Maliit

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/unity8.conf'
2--- data/unity8.conf 2015-09-30 09:43:53 +0000
3+++ data/unity8.conf 2015-11-24 22:55:58 +0000
4@@ -56,11 +56,17 @@
5 # For twice the fun and half the latency, try this (Warning: not all
6 # devices are fast enough to keep up smoothly yet)...
7 # initctl set-env MIR_SERVER_NBUFFERS=2
8+
9+ # Set these to enable the on-screen keyboard
10+ initctl set-env --global GTK_IM_MODULE=Maliit
11+ initctl set-env --global QT_IM_MODULE=maliitphablet
12 end script
13
14 exec ${BINARY:-unity8} $ARGS
15
16 post-stop script
17+ initctl unset-env --global QT_IM_MODULE
18+ initctl unset-env --global GTK_IM_MODULE
19 initctl set-env --global MIR_SOCKET=$UNITY_MIR_SOCKET
20 initctl unset-env --global UNITY_MIR_SOCKET
21 initctl unset-env --global MIR_SERVER_PROMPT_FILE

Subscribers

People subscribed via source and target branches