Merge ~dilyn-corner/chromium-browser/+git/snap-from-source:daemon into ~chromium-team/chromium-browser/+git/snap-from-source:daemon

Proposed by Dilyn
Status: Merged
Merged at revision: f49727d276f367036bb0e04ba6c4fc9d564b6c49
Proposed branch: ~dilyn-corner/chromium-browser/+git/snap-from-source:daemon
Merge into: ~chromium-team/chromium-browser/+git/snap-from-source:daemon
Diff against target: 18 lines (+9/-0)
1 file modified
launcher/daemon.wrapper (+9/-0)
Reviewer Review Type Date Requested Status
Nathan Teodosio Approve
Review via email: mp+440656@code.launchpad.net

Commit message

Remove the profile lock when the kiosk starts.

Description of the change

Chromium creates a profile lock file to track whether or not a profile is in-use to avoid profile corruption. Chromium has code to safely cleaning this file [1], but part of that handling can involve manual intervention from the user in the form of a pop-up window asking if it is safe to unlock the profile. Manual intervention is undesirable on a device acting as a kiosk, and because the kiosk is managed as a daemon by snapd the profile should not be in-use.

[1] https://chromium.googlesource.com/chromium/src/+/master/chrome/browser/process_singleton_posix.cc

Signed-off-by: Dilyn Corner <email address hidden>

To post a comment you must log in.
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/launcher/daemon.wrapper b/launcher/daemon.wrapper
2index 1724efd..0e4a2a3 100755
3--- a/launcher/daemon.wrapper
4+++ b/launcher/daemon.wrapper
5@@ -14,4 +14,13 @@ ln -sf "${real_wayland}.lock" "$XDG_RUNTIME_DIR"
6
7 unset DISPLAY
8
9+# Chromium creates a file with a unique name which indicates whether or not the
10+# requested profile is in-use by some other chromium process. Chromium is
11+# supposed to clean up after itself, but sometimes this lock file persists.
12+# Because we are running Chromium as a kiosk, it is safe to manually remove this
13+# file - the profile should not be in use.
14+if [ -e "$SNAP_USER_COMMON/chromium/SingletonLock" ]; then
15+ unlink "$SNAP_USER_COMMON/chromium/SingletonLock"
16+fi
17+
18 exec "$@"

Subscribers

People subscribed via source and target branches

to status/vote changes: