Merge lp:~xnox/ubiquity/fixup-owner-with-remove into lp:ubiquity

Proposed by Dimitri John Ledkov on 2018-04-26
Status: Merged
Merged at revision: 6635
Proposed branch: lp:~xnox/ubiquity/fixup-owner-with-remove
Merge into: lp:ubiquity
Diff against target: 48 lines (+23/-0)
2 files modified
debian/changelog (+8/-0)
ubiquity/plugins/ubi-language.py (+15/-0)
To merge this branch: bzr merge lp:~xnox/ubiquity/fixup-owner-with-remove
Reviewer Review Type Date Requested Status
Colin Watson 2018-04-26 Approve on 2018-04-26
Review via email: mp+344477@code.launchpad.net

Commit message

Remove dconf/user

To post a comment you must log in.
Colin Watson (cjwatson) wrote :

Everything is terrible, but this is probably about the least bad option for now.

review: Approve
6635. By Dimitri John Ledkov on 2018-04-26

Remove dconf/user before Try Ubuntu. LP: #1767067
Just, in case it has the wrong permissions, i.e. root and thus breaks
user running gnome session / shell / "Try Ubuntu".

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2018-04-25 09:34:00 +0000
3+++ debian/changelog 2018-04-26 14:03:14 +0000
4@@ -1,3 +1,11 @@
5+ubiquity (18.04.13) UNRELEASED; urgency=medium
6+
7+ * Remove dconf/user before Try Ubuntu. LP: #1767067
8+ Just, in case it has the wrong permissions, i.e. root and thus breaks
9+ user running gnome session / shell / "Try Ubuntu".
10+
11+ -- Dimitri John Ledkov <xnox@ubuntu.com> Thu, 26 Apr 2018 06:58:02 -0700
12+
13 ubiquity (18.04.12) bionic; urgency=medium
14
15 [ Didier Roche ]
16
17=== modified file 'ubiquity/plugins/ubi-language.py'
18--- ubiquity/plugins/ubi-language.py 2017-07-18 15:21:41 +0000
19+++ ubiquity/plugins/ubi-language.py 2018-04-26 14:03:14 +0000
20@@ -27,6 +27,7 @@
21
22 from ubiquity import auto_update, i18n, misc, osextras, plugin
23
24+import subprocess
25
26 NAME = 'language'
27 AFTER = None
28@@ -135,6 +136,20 @@
29 # The button's already been clicked once, so stop reacting to it.
30 # LP: #911907.
31 return
32+ # Sometimes dconf/user ends up being written by root, despite being
33+ # written to some user's XDG_RUNTIME_DIRECTORY later breaking
34+ # gnome session/shell/starting desktop
35+ # Thus log the permission of the file, and purge it, to ensure the
36+ # session reliably starts
37+ uid = os.environ.get('PKEXEC_UID', os.environ.get('SUDO_UID'))
38+ if uid:
39+ dconf_user = '/run/user/%s/dconf/user' % uid
40+ if os.path.exists(dconf_user):
41+ subprocess.run(['systemd-run', 'ls', '-latr', dconf_user])
42+ try:
43+ os.remove(dconf_user)
44+ except OSError:
45+ pass
46 # Spinning cursor.
47 self.controller.allow_change_step(False)
48 # Queue quit.

Subscribers

People subscribed via source and target branches

to status/vote changes: