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

Subscribers

People subscribed via source and target branches