Use snap wait system seed.loaded to wait for snapd

We cannot use After=snapd.service as user services cannot synchronize
with system services. Using `snap system wait seed.loaded` should work,
except for the fact that it requires polkit authentication to perform
this operation.

Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com>
This commit is contained in:
Zygmunt Krynicki 2025-07-14 11:15:43 +02:00
parent 9fbd9ba71e
commit c4fbaf5d3b

View File

@ -4,14 +4,14 @@
Description=Ubuntu Desktop Installer
PartOf=graphical-session.target
After=graphical-session.target
# Make sure that the system was seeded to access the snap
After=snapd.seeded.service
# Never run in GDM
Conflicts=gnome-session@gnome-login.target
[Service]
Type=oneshot
# Make sure that the system was seeded to access the snap
ExecStartPre=/usr/bin/snap wait system seed.loaded
ExecStart=/snap/bin/ubuntu-desktop-bootstrap --try-or-install
ExecStopPost=sh -c "gsettings set org.gnome.shell.extensions.dash-to-dock dock-fixed true; gsettings set org.gnome.shell.extensions.dash-to-dock intellihide true; gnome-extensions enable ding@rastersoft.com"
Restart=no