1. Ronoaldo Pereira
  2. desktop-theme-growing


Ulrich Hansen  committed 809ffe5

Some updates to get more than one theme-package to work.
Install diversion of ksplashc only if isn't already there
Clear wallpaper cache
Clear gdm3 wallpaper cache

  • Participants
  • Parent commits 0aba166
  • Branches default

Comments (0)

Files changed (4)

File backgrounds/growing-autostart.desktop

View file
 [Desktop Entry]
 Name=Growing Desktop Theme
-Comment=Installs the wallpaper in Gnome. A small cookie is placed into the homefolder to prevent a double install.
-Exec=/bin/sh -c "/usr/bin/test -f ~/.desktop-theme-growing.id || /usr/bin/gsettings set org.gnome.desktop.background picture-uri file:///usr/share/images/desktop-base/desktop-background; /bin/touch ~/.desktop-theme-growing.id"
+Comment=Installs the wallpaper in Gnome. A small cookie is placed into the homefolder to prevent a double install. Clear cache.
+Exec=/bin/sh -c "/bin/rm ~/.cache/wallpaper/*; /usr/bin/test -f ~/.desktop-theme-growing.id || /usr/bin/gsettings set org.gnome.desktop.background picture-uri file:///usr/share/images/desktop-base/desktop-background; /bin/touch ~/.desktop-theme-growing.id"

File debian/postinst

View file
 update_gdm3_config() {
+    # Reset the gdm3 wallpaper cache
+    rm -f /var/lib/gdm3/.cache/wallpaper/*
     # Reload gdm3 configuration
     if [ -x /usr/sbin/gdm3 ]; then
         invoke-rc.d gdm3 reload || true

File debian/postrm

View file
             invoke-rc.d gdm3 reload || true
-# Remove diversion:
+# Remove diversion - but only if there isn't any other theme package that needs it:
-        dpkg-divert --package desktop-theme-growing --remove --rename \
+/usr/bin/test -f /usr/share/desktop-base/profiles/kde-profile/share/config/.ksplashrc.*.id \
+                    || dpkg-divert --package desktop-theme-growing --remove --rename \
                     --divert /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
+# Remove the small id that signaled the existence of another theme package to this one:
+        find /usr/share/desktop-base/profiles/kde-profile/share/config/ -name ".ksplashrc.growing.id" -delete
 # Remove Gnome wallpaper launcher:
         rm -f /etc/xdg/autostart/growing-autostart.desktop
-# and it's small cookie file in the users home folder
+# and the small id file in the users home folder
         find /home -name "desktop-theme-growing.id" -delete
-# Remove KDM configuration file
-        rm -f /etc/default/kdm.d/15_desktop-theme
+# Reset gdm3 wallpaper cache
+	rm -f /var/lib/gdm3/.cache/wallpaper/*

File debian/preinst

View file
 set -e
-dpkg-divert --package desktop-theme-growing --add --rename \
+# If there is already another theme package (and another ksplashrc diversion)
+# installed, install a small marker file for postrm.
+/usr/bin/test -f /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
+ && /bin/touch /usr/share/desktop-base/profiles/kde-profile/share/config/.ksplashrc.growing.id;
+# desktop-base configures ksplashrc directly to point to it's background svg.
+# So we need a diversion of ksplashrc. But only if there isn't another theme
+# package present that already did that.
+/usr/bin/test -f /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \
+ || dpkg-divert --package desktop-theme-growing --add --rename \
 --divert /usr/share/desktop-base/profiles/kde-profile/share/config/ksplashrc.real \