glib is not aware of snap confinement and this causes the internal logic to decide when to use portals to not work as designed. One important case is the gsettings backend, which should use a keyfile when confined rather than using dconf. When using a fully confined desktop this is required, as dconf is not suitable for sharing between snaps.
1. Install gnome-calculator snap:
$ snap install gnome-calculator
2. Disconnect gsettings interface:
$ snap disconnect gnome-calculator:gsettings
3. Run gnome-calculator
4. Change mode from basic to advanced
5. Close and re-open gnome-calculator
Expected result:
Mode change remembered on second run. gnome-calculator settings written to ~/snap/gnome-calculator/current/.config/glib-2.0/settings/keyfile
Observed result:
Mode change not remembered on second run, errors shown in console about accessing dconf:
(gnome-calculator:1031938): dconf-CRITICAL **: 14:08:56.034: unable to create file '/run/user/1000/snap.gnome-calculator/dconf/user': Permission denied. dconf will not work properly.
[ Where problems could occur ]
- New bug introduced in glib causing a crash.
- Security issue introduced in glib due to accessing snapctl.
- Unexpected behaviour change when running snaps with updated glib.
[ Impact]
glib is not aware of snap confinement and this causes the internal logic to decide when to use portals to not work as designed. One important case is the gsettings backend, which should use a keyfile when confined rather than using dconf. When using a fully confined desktop this is required, as dconf is not suitable for sharing between snaps.
This has been fixed in glib main: https:/ /gitlab. gnome.org/ GNOME/glib/ -/merge_ requests/ 3020
[ Test Plan ]
1. Install gnome-calculator snap: r:gsettings
$ snap install gnome-calculator
2. Disconnect gsettings interface:
$ snap disconnect gnome-calculato
3. Run gnome-calculator
4. Change mode from basic to advanced
5. Close and re-open gnome-calculator
Expected result: gnome-calculato r/current/ .config/ glib-2. 0/settings/ keyfile
Mode change remembered on second run. gnome-calculator settings written to ~/snap/
Observed result: calculator: 1031938) : dconf-CRITICAL **: 14:08:56.034: unable to create file '/run/user/ 1000/snap. gnome-calculato r/dconf/ user': Permission denied. dconf will not work properly.
Mode change not remembered on second run, errors shown in console about accessing dconf:
(gnome-
[ Where problems could occur ]
- New bug introduced in glib causing a crash.
- Security issue introduced in glib due to accessing snapctl.
- Unexpected behaviour change when running snaps with updated glib.