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

Proposed by Dimitri John Ledkov
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 (community) Approve
Review via email: mp+344477@code.launchpad.net

Commit message

Remove dconf/user

To post a comment you must log in.
Revision history for this message
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

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
=== modified file 'debian/changelog'
--- debian/changelog 2018-04-25 09:34:00 +0000
+++ debian/changelog 2018-04-26 14:03:14 +0000
@@ -1,3 +1,11 @@
1ubiquity (18.04.13) UNRELEASED; urgency=medium
2
3 * Remove dconf/user before Try Ubuntu. LP: #1767067
4 Just, in case it has the wrong permissions, i.e. root and thus breaks
5 user running gnome session / shell / "Try Ubuntu".
6
7 -- Dimitri John Ledkov <xnox@ubuntu.com> Thu, 26 Apr 2018 06:58:02 -0700
8
1ubiquity (18.04.12) bionic; urgency=medium9ubiquity (18.04.12) bionic; urgency=medium
210
3 [ Didier Roche ]11 [ Didier Roche ]
412
=== modified file 'ubiquity/plugins/ubi-language.py'
--- ubiquity/plugins/ubi-language.py 2017-07-18 15:21:41 +0000
+++ ubiquity/plugins/ubi-language.py 2018-04-26 14:03:14 +0000
@@ -27,6 +27,7 @@
2727
28from ubiquity import auto_update, i18n, misc, osextras, plugin28from ubiquity import auto_update, i18n, misc, osextras, plugin
2929
30import subprocess
3031
31NAME = 'language'32NAME = 'language'
32AFTER = None33AFTER = None
@@ -135,6 +136,20 @@
135 # The button's already been clicked once, so stop reacting to it.136 # The button's already been clicked once, so stop reacting to it.
136 # LP: #911907.137 # LP: #911907.
137 return138 return
139 # Sometimes dconf/user ends up being written by root, despite being
140 # written to some user's XDG_RUNTIME_DIRECTORY later breaking
141 # gnome session/shell/starting desktop
142 # Thus log the permission of the file, and purge it, to ensure the
143 # session reliably starts
144 uid = os.environ.get('PKEXEC_UID', os.environ.get('SUDO_UID'))
145 if uid:
146 dconf_user = '/run/user/%s/dconf/user' % uid
147 if os.path.exists(dconf_user):
148 subprocess.run(['systemd-run', 'ls', '-latr', dconf_user])
149 try:
150 os.remove(dconf_user)
151 except OSError:
152 pass
138 # Spinning cursor.153 # Spinning cursor.
139 self.controller.allow_change_step(False)154 self.controller.allow_change_step(False)
140 # Queue quit.155 # Queue quit.

Subscribers

People subscribed via source and target branches

to status/vote changes: