mtp

Merge lp:~cyphermox/mtp/fix-1389223 into lp:mtp

Proposed by Mathieu Trudel-Lapierre
Status: Merged
Approved by: Ricardo Salveti
Approved revision: 55
Merged at revision: 55
Proposed branch: lp:~cyphermox/mtp/fix-1389223
Merge into: lp:mtp
Diff against target: 28 lines (+10/-1)
1 file modified
debian/mtp-server.conf (+10/-1)
To merge this branch: bzr merge lp:~cyphermox/mtp/fix-1389223
Reviewer Review Type Date Requested Status
Ricardo Salveti (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+240585@code.launchpad.net

Commit message

Wait for UnityGreeter before starting mtp-server.

Description of the change

Wait for UnityGreeter before starting mtp-server.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
lp:~cyphermox/mtp/fix-1389223 updated
55. By Mathieu Trudel-Lapierre

Wait for unity8 to be started; we need it for the UnityGreeter, to be aware
of the screen lock state.

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

LGTM, works as expected.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/mtp-server.conf'
2--- debian/mtp-server.conf 2014-08-14 16:33:19 +0000
3+++ debian/mtp-server.conf 2014-11-04 17:28:47 +0000
4@@ -1,10 +1,18 @@
5 description "MTP protocol server"
6
7-start on :sys:android-mtp-on or :sys:android-usb-connected
8+start on (:sys:android-mtp-on or :sys:android-usb-connected) and (started unity8)
9 stop on desktop-end or :sys:android-mtp-off
10
11 pre-start script
12 [ "$USER" != "lightdm" ] || { stop; exit 0; }
13+
14+ # Fix for bug LP: #1389223: UnityGreeter isn't available immediately
15+ if ! dbus-send --session --print-reply \
16+ --dest=com.canonical.UnityGreeter \
17+ / org.freedesktop.DBus.Introspectable.Introspect 2>&1 | \
18+ grep -qc IsActive; then
19+ sleep 10
20+ fi
21 end script
22
23 env GOOGLE_LOGTOSTDERR=1
24@@ -12,3 +20,4 @@
25 respawn
26
27 exec /usr/bin/mtp-server
28+

Subscribers

People subscribed via source and target branches