Improvements to kali-desktop-base postinst

* Bump the priority for the new name so that we're sure they are
  correctly used by default and so that the old names are no longer
  active.
This commit is contained in:
Raphaël Hertzog 2020-03-24 11:22:51 +01:00
parent 380c35c31d
commit cf3ef9a6ef

View File

@ -7,7 +7,7 @@ if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remov
update-alternatives --install \
/usr/share/images/vendor-logos \
vendor-logos \
/usr/share/images/kali-logos 200 \
/usr/share/images/kali-logos 210 \
--slave /usr/share/icons/vendor/64x64/emblems/emblem-vendor.png \
emblem-vendor-64 \
/usr/share/icons/desktop-base/64x64/emblems/emblem-kali.png \
@ -25,34 +25,34 @@ if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remov
update-alternatives --install \
/usr/share/desktop-base/active-theme \
desktop-theme \
/usr/share/desktop-base/kali-theme 200
/usr/share/desktop-base/kali-theme 210
# Desktop background alternatives
update-alternatives --install \
/usr/share/images/desktop-base/desktop-background \
desktop-background /usr/share/wallpapers/KaliLogo/contents/images/kali-logo-16x9.png 200
desktop-background /usr/share/wallpapers/KaliLogo/contents/images/kali-logo-16x9.png 210
# Set up an alternative for the XML version of the background
# (for GNOME)
update-alternatives --install \
/usr/share/images/desktop-base/desktop-background.xml \
desktop-background.xml /usr/share/wallpapers/KaliLogo/gnome-background.xml 200
desktop-background.xml /usr/share/wallpapers/KaliLogo/gnome-background.xml 210
# Set up an alternative for the XML version of the lock screen
# (for GNOME)
update-alternatives --install \
/usr/share/images/desktop-base/desktop-lockscreen.xml \
desktop-lockscreen.xml /usr/share/wallpapers/KaliLight/gnome-background.xml 200
desktop-lockscreen.xml /usr/share/wallpapers/KaliLight/gnome-background.xml 210
# Set up an alternative for the wallpaper for Plasma 5/KDE
update-alternatives --install \
/usr/share/wallpapers/DebianTheme \
desktop-plasma5-wallpaper /usr/share/wallpapers/KaliLogo 200
desktop-plasma5-wallpaper /usr/share/wallpapers/KaliLogo 210
# Login theme
# Highest priority for active theme
update-alternatives --install /usr/share/images/desktop-base/login-background.svg \
desktop-login-background /usr/share/wallpapers/KaliLight/contents/kali-light.svg 200
desktop-login-background /usr/share/wallpapers/KaliLight/contents/kali-light.svg 210
# Set up an alternative for the GRUB background/colors config
# Highest priority for active theme
@ -72,7 +72,7 @@ if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-remov
active_grub_second_ratio=/usr/share/grub/themes/kali/grub-${grub_second_ratio}.png
update-alternatives --install \
/usr/share/images/desktop-base/desktop-grub.png \
desktop-grub ${active_grub_first_ratio} 200 \
desktop-grub ${active_grub_first_ratio} 210 \
--slave /usr/share/desktop-base/grub_background.sh \
desktop-grub.sh /usr/share/grub/themes/kali/grub_background.sh
update-alternatives --install \
@ -156,22 +156,19 @@ EOF
/usr/share/desktop-base/kali-theme/grub/grub-16x9.png
elif dpkg --compare-versions "$2" lt-nl "2020.2.1"; then
# Remove desktop background alternatives
# Remove invalid alternatives that moved to /usr/share/wallpapers/*
update-alternatives --remove \
desktop-background \
/usr/share/backgrounds/kali/kali-logo-16x9.png
# Remove XML version of the background alternatives
update-alternatives --remove \
desktop-background.xml \
/usr/share/backgrounds/kali/kali-logo.xml
# Remove login background alternatives
update-alternatives --remove \
desktop-login-background \
/usr/share/backgrounds/kali/kali-light.svg
# Remove XML version of the login background alternatives
update-alternatives --remove \
desktop-lockscreen.xml \
/usr/share/backgrounds/kali/kali-light.xml