** Description changed: + [SRU] 2.76 + (https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/2154498) + + [ Impact ] + Snaps that register as URL scheme handlers (e.g., Slack, YouTube Music Desktop, Teams) call the `io.snapcraft.Settings.SetSub` D-Bus method on every launch to request their URL handler be set, without first checking if it's already configured. Since snap-userd in versions prior to 2.76 does not check either, users are presented with an "Allow settings change?" confirmation dialog on every application launch, even though the setting is already correct. This is a significant UX annoyance affecting multiple popular desktop snaps. + + [ Test Plan ] + This is covered by automated testing in https://github.com/canonical/snapd/pull/17031: + - Unit tests in `usersession/userd/settings_test.go` verifying the skip-when-already-set path + - Spread test: `tests/main/xdg-settings` validating end-to-end that redundant set calls are skipped + + Manual verification: + 1. On snapd < 2.76, install a snap that triggers this (e.g., slack): + $ snap install slack + Launch the snap. Observe the "Allow settings change?" dialog appears. + Click "Yes". Close the snap. + Launch the snap again. Observe the dialog appears again. + + 2. Upgrade snapd to 2.76. + Launch the snap. The first launch may still prompt (to establish the setting). + Click "Yes". Close the snap. + Launch the snap again. Verify no dialog appears on subsequent launches + (because userd now checks that the setting is already correct before prompting). + + [ Where problems could occur ] + The fix adds an `xdg-settings check` call before prompting. If `xdg-settings check` is slow, broken, or returns unexpected output on a particular desktop environment, userd could either still prompt unnecessarily (safe fallback) or silently skip a genuine settings change. The risk is low as the check is a standard xdg-utils operation and errors fall through to the original prompt behaviour. + + [ Applicability ] + Classic Ubuntu only (desktop sessions with snap-userd). + + ---original--- + I use a snap application (youtube-music-desktop-app) that wants to handle a particular URL scheme. However, it asks this on every startup of the application, not remembering my selection in between launches. The message it gives is: Allow settings change? Allow snap "youtube-music-desktop-app" to change "default-url-scheme- handler" subproperty "ytmd" to "youtube-music-desktop-app_youtube-music- desktop-app.desktop"? This dialogue will close automatically after 5 minutes of inactivity. ProblemType: Bug DistroRelease: Ubuntu 22.04 Package: snapd 2.55.2+22.04 ProcVersionSignature: Ubuntu 5.15.0-23.23-generic 5.15.27 Uname: Linux 5.15.0-23-generic x86_64 ApportVersion: 2.20.11-0ubuntu79 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Wed Mar 23 13:01:16 2022 InstallationDate: Installed on 2022-03-17 (5 days ago) InstallationMedia: Ubuntu 22.04 LTS "Jammy Jellyfish" - Alpha amd64 (20220313) Snap.Changes: no changes found SourcePackage: snapd UpgradeStatus: No upgrade log present (probably fresh install)
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1966067 Title: Snap application always asks for settings change on startup To manage notifications about this bug go to: https://bugs.launchpad.net/snapd/+bug/1966067/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
