diff --git a/debian/kali-themes.postinst b/debian/kali-themes.postinst index 20015316..df427e3f 100644 --- a/debian/kali-themes.postinst +++ b/debian/kali-themes.postinst @@ -103,6 +103,23 @@ if [ "$1" = "configure" ]; then # Install remaining new files install_all fi + # Disable some backgrounds in gnome desktop + mkdir -p /usr/share/gnome-background-properties/disabled/ + while read file; do + dpkg-divert --rename --package kali-themes \ + --divert "$(dirname $file)/disabled/$(basename $file)" \ + --add "$file" + done << EOF +/usr/share/gnome-background-properties/debian-futureprototype.xml +/usr/share/gnome-background-properties/debian-homeworld.xml +/usr/share/gnome-background-properties/debian-joy-inksplat.xml +/usr/share/gnome-background-properties/debian-joy.xml +/usr/share/gnome-background-properties/debian-lines.xml +/usr/share/gnome-background-properties/debian-moonlight.xml +/usr/share/gnome-background-properties/debian-softwaves.xml +/usr/share/gnome-background-properties/debian-spacefun.xml +/usr/share/gnome-background-properties/gnome-backgrounds.xml +EOF # Configure /root/.face to have a red-background avatar if [ ! -e /root/.face ]; then cp /usr/share/kali-themes/.face-root.svg /root/.face diff --git a/debian/kali-themes.postrm b/debian/kali-themes.postrm index 363eeb27..f85634c3 100644 --- a/debian/kali-themes.postrm +++ b/debian/kali-themes.postrm @@ -38,6 +38,13 @@ case "$1" in --divert "$file.original" \ --remove "$file" done + # Recover disabled gnome backgrounds + for file in /usr/share/gnome-background-properties/disabled/*; do + dpkg-divert --rename --package kali-themes \ + --divert "$file" \ + --remove "$(echo $file | sed 's|/disabled||')" + done + rmdir /usr/share/gnome-background-properties/disabled/ ;; esac