Disable unwanted backgrounds in gnome-background-properties

This commit is contained in:
Daniel Ruiz de Alegría 2021-10-27 12:10:25 +02:00
parent e4d3c4bfd7
commit de194a02a1
No known key found for this signature in database
GPG Key ID: 59667A77E8BFCB6C
2 changed files with 24 additions and 0 deletions

View File

@ -103,6 +103,23 @@ if [ "$1" = "configure" ]; then
# Install remaining new files # Install remaining new files
install_all install_all
fi 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 # Configure /root/.face to have a red-background avatar
if [ ! -e /root/.face ]; then if [ ! -e /root/.face ]; then
cp /usr/share/kali-themes/.face-root.svg /root/.face cp /usr/share/kali-themes/.face-root.svg /root/.face

View File

@ -38,6 +38,13 @@ case "$1" in
--divert "$file.original" \ --divert "$file.original" \
--remove "$file" --remove "$file"
done 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 esac