unowned /usr/share/glib-2.0/schemas/20_ubuntu-desktop-installer-interface.gschema.override after desktop install

Bug #2033117 reported by Steve Langasek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-desktop-provision
Triaged
Medium
Unassigned

Bug Description

After a classic install (no tpm fde) using the 20230825.2 canary image, I have a file
/usr/share/glib-2.0/schemas/20_ubuntu-desktop-installer-interface.gschema.override on the target system which according to dpkg has no owner.

The contents of the file are:

$ cat /mnt/2/usr/share/glib-2.0/schemas/20_ubuntu-desktop-installer-interface.gschema.override
[org.gnome.desktop.interface:ubuntu]
color-scheme='prefer-light'
gtk-theme='Yaru'
$

I do not remember if the non-canary image prompted me for a theme preference, or if I made the same selection on the non-canary image. However, the installer should not be writing files under /usr to the target system; /usr is owned by the package manager. Overrides need to be written somewhere else, one of /home, /var, /etc in decreasing order of preference (the theme selection should IMHO only apply to the initial user and not to further users on the system who are added post-install).

On both canary and daily-live, I also see a file /usr/share/glib-2.0/schemas/20_ubuntu-desktop-installer-wm.gschema.override which is identical between the two installs.

$ cat /mnt/2/usr/share/glib-2.0/schemas/20_ubuntu-desktop-installer-wm.gschema.override
[org.gnome.desktop.wm.keybindings:ubuntu]
maximize=@as []
unmaximize=@as []
$

I have no idea what this file is for.

Steve Langasek (vorlon)
tags: added: fde
description: updated
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

This is done by ubuntu-desktop-installer/snap/local/postinst.d/10_override_desktop_settings and four files are created this way:

```
#!/bin/sh
set -e

user=ubuntu
target=/target
source_schemas=/usr/share/glib-2.0/schemas
target_schemas=$target/$source_schemas

if [ ! -d $source_schemas ] || [ ! -d $target_schemas ] || ! id $user >/dev/null 2>&1; then
    exit
fi

dconf_dump() {
    target_schema=$target_schemas/20_ubuntu-desktop-installer-$1.gschema.override
    sudo -u $user dconf dump /org/gnome/desktop/$1/ > $target_schema
    # - [foo] -> [org.gnome.desktop.$1.foo:ubuntu]
    sed -i -E "s/^\[([^/]*)\]/\[org.gnome.desktop.$1.\1:ubuntu\]/g" $target_schema
    # - [/] -> [org.gnome.desktop.$1:ubuntu]
    sed -i -E "s/^\[\/\]$/\[org.gnome.desktop.$1:ubuntu\]/g" $target_schema
    [ -s $target_schema ] || rm $target_schema
}

dconf_dump a11y
dconf_dump interface
dconf_dump peripherals
dconf_dump wm

glib-compile-schemas $target_schemas
```

Changed in ubuntu-desktop-installer:
importance: Undecided → Critical
status: New → Triaged
importance: Critical → High
Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

I reported https://github.com/canonical/ubuntu-desktop-installer/issues/2315 and will untag this issue since it is not specific to FDE.

Changed in ubuntu-desktop-installer:
importance: High → Medium
tags: removed: fde
affects: ubuntu-desktop-installer → ubuntu-desktop-provision
summary: unowned /usr/share/glib-2.0/schemas/20_ubuntu-desktop-installer-
- interface.gschema.override after canary install
+ interface.gschema.override after desktop install
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.