Merge lp:~mterry/unity8/dbus-x11 into lp:unity8

Proposed by Michael Terry
Status: Merged
Approved by: Michał Sawicz
Approved revision: 946
Merged at revision: 943
Proposed branch: lp:~mterry/unity8/dbus-x11
Merge into: lp:unity8
Diff against target: 78 lines (+22/-10)
2 files modified
data/unity8-greeter-wrapper (+16/-10)
debian/changelog (+6/-0)
To merge this branch: bzr merge lp:~mterry/unity8/dbus-x11
Reviewer Review Type Date Requested Status
Michał Sawicz Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Review via email: mp+221894@code.launchpad.net

Commit message

Launch dbus ourselves in the greeter, don't use the upstart job.

Otherwise we lose control on what is started in the greeter, 'cause there's a lot of jobs that "start on dbus started".

Description of the change

Bring back dbus-x11 to fix dbus usage in user session more properly.

We can't use the existing hack of starting dbus via upstart for greeter session.

A better long term fix is to use dbus-x11's dbus-launch like the Desktop does but stop LightDM from parsing Xsession.d for user sessions as it seems to insist on doing (which is https://code.launchpad.net/~mterry/ubuntu-touch-session/no-lightdm-session/+merge/221891)

== Checklist ==

 * Are there any related MPs required for this MP to build/function as expected? Please list.
 - Yes, https://code.launchpad.net/~mterry/ubuntu-touch-session/no-lightdm-session/+merge/221891

 * Did you perform an exploratory manual test run of your code change and any related functionality?
 - Yes, you can see that session only gets one dbus-daemon with both these branches

 * 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?
 - I'm on that team.

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

To post a comment you must log in.
lp:~mterry/unity8/dbus-x11 updated
944. By Michael Terry

Undo wrapper changes too

945. By Michael Terry

Bump version

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
lp:~mterry/unity8/dbus-x11 updated
946. By Michael Terry

Manually start dbus-daemon to avoid pulling in dbus-x11 after all

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Michał Sawicz (saviq) wrote :

This still doesn't launch dialer for me :/. It does unlock, but doesn't launch the greeter in either of greeter or session...

review: Needs Fixing
Revision history for this message
Michał Sawicz (saviq) wrote :

Oh it looks like url-dispatcher is completely broken.

Revision history for this message
Michał Sawicz (saviq) wrote :

OK, that was a fallout of a mis-migrated upstart^Wubuntu-app-launch rename.

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

 * Did CI run pass? If not, please explain why.
Known greeter test fail :|

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'data/unity8-greeter-wrapper'
2--- data/unity8-greeter-wrapper 2014-06-03 10:31:34 +0000
3+++ data/unity8-greeter-wrapper 2014-06-03 20:29:55 +0000
4@@ -24,6 +24,9 @@
5 if [ -n "$INIT_PID" ]; then
6 kill "$INIT_PID"
7 fi
8+ if [ -n "$DBUS_PID" ]; then
9+ kill "$DBUS_PID"
10+ fi
11 if [ -n "$CMD_PID" ]; then
12 kill "$CMD_PID"
13 fi
14@@ -32,8 +35,6 @@
15
16 set_greeter_var()
17 {
18- # Only use this after upstart has been started, otherwise multiple dbus
19- # daemons are spawned.
20 export "$1=$2"
21 gdbus call --session --dest org.freedesktop.DBus --object-path /org/freedesktop/DBus --method org.freedesktop.DBus.UpdateActivationEnvironment "{'$1': '$2'}"
22 if [ -n "$INIT_PID" ]; then
23@@ -41,6 +42,14 @@
24 fi
25 }
26
27+# Start dbus if it hasn't already been started for us (such as on the Desktop
28+# images by dbus-launch). We don't want to use dbus-launch ourselves because
29+# we don't want dbus-x11 on the Touch images.
30+if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
31+ export DBUS_SESSION_BUS_ADDRESS=unix:abstract=$(mktemp -u /tmp/dbus-XXXXXXXXXX)
32+ DBUS_PID=$(dbus-daemon --fork --session --print-pid --address="$DBUS_SESSION_BUS_ADDRESS")
33+fi
34+
35 SUB_SOCKET=$XDG_RUNTIME_DIR/mir_socket
36 rm -f $SUB_SOCKET # clear socket in case we were hard shut down
37
38@@ -54,6 +63,11 @@
39 # will start.
40 export DESKTOP_SESSION=ubuntu-touch
41
42+# We disable ofono using pulse. It causes problems with racing with the user's
43+# pulse. We need to come up with a better long-term fix for this, because we
44+# eventually need the greeter to play ringtones for users that aren't logged in.
45+set_greeter_var PA_DISABLED 1
46+
47 # Normal unity8 sessions are entirely driven by Upstart. But greeters
48 # are special. They need access to the file descriptors that lightdm
49 # creates for them and don't want to start all the services that a normal
50@@ -64,14 +78,6 @@
51 while [ ! -e "$XDG_RUNTIME_DIR/upstart/sessions/$INIT_PID.session" ]; do sleep 0.1; done
52 export UPSTART_SESSION=$(/sbin/initctl list-sessions | grep "^$INIT_PID " | cut -d' ' -f2)
53
54-/sbin/initctl start dbus
55-export DBUS_SESSION_BUS_ADDRESS="$(/sbin/initctl get-env DBUS_SESSION_BUS_ADDRESS)"
56-
57-# We disable ofono using pulse. It causes problems with racing with the user's
58-# pulse. We need to come up with a better long-term fix for this, because we
59-# eventually need the greeter to play ringtones for users that aren't logged in.
60-set_greeter_var PA_DISABLED 1
61-
62 # Start any pre-greeter tasks if needed (like wizard)
63 /sbin/initctl emit unity8-greeter-starting
64
65
66=== modified file 'debian/changelog'
67--- debian/changelog 2014-06-03 10:33:11 +0000
68+++ debian/changelog 2014-06-03 20:29:55 +0000
69@@ -1,3 +1,9 @@
70+unity8 (7.88) UNRELEASED; urgency=medium
71+
72+ * Bump version so ubuntu-touch-session can reference this one
73+
74+ -- Michael Terry <mterry@ubuntu.com> Tue, 03 Jun 2014 10:55:03 -0400
75+
76 unity8 (7.87+14.10.20140603.1-0ubuntu1) utopic; urgency=low
77
78 [ CI bot ]

Subscribers

People subscribed via source and target branches