diff --git a/debian/changelog b/debian/changelog index c0141c6..9062eab 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +lubuntu-default-settings (0.21) UNRELEASED; urgency=low + + * debian/postinst,debian/postrm: set lubuntu as the default session and + lightdm-gtk-greeter as the default greeter if they aren't set already. + Remove them on uninstall. (thanks Didier and Lionel !) + + -- Julien Lavergne Tue, 16 Aug 2011 01:11:02 +0200 + lubuntu-default-settings (0.20) oneiric; urgency=low [ Jonathan Marsden ] diff --git a/debian/postinst b/debian/postinst index 40a0d8e..d51147d 100644 --- a/debian/postinst +++ b/debian/postinst @@ -15,6 +15,13 @@ if [ "$1" = configure ]; then lxdm.conf /etc/xdg/lubuntu/lxdm/lxdm.conf 60 fi +if [ "$1" = configure|upgrade ]; then + if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then + /usr/lib/lightdm/lightdm-set-defaults --keep-old --session=lubuntu || true + /usr/lib/lightdm/lightdm-set-defaults --keep-old --greeter=lightdm-gtk-greeter || true + fi +fi + if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then dpkg-maintscript-helper mv_conffile /etc/xdg/pcmanfm/lubuntu.conf /etc/xdg/pcmanfm/lubuntu/pcmanfm.conf 0.15 -- "$@" fi diff --git a/debian/postrm b/debian/postrm index 390e22c..738e214 100644 --- a/debian/postrm +++ b/debian/postrm @@ -6,5 +6,15 @@ if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then dpkg-maintscript-helper mv_conffile /etc/xdg/pcmanfm/lubuntu.conf /etc/xdg/pcmanfm/lubuntu/pcmanfm.conf 0.15 -- "$@" fi +case "$1" in + remove|purge) + if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then + /usr/lib/lightdm/lightdm-set-defaults --remove --session=lubuntu || true + /usr/lib/lightdm/lightdm-set-defaults --remove --greeter=lightdm-gtk-greeter || true + fi + ;; +esac + + #DEBHELPER# exit 0