# HG changeset patch # User Christophe Lincoln # Date 1335620768 -7200 # Node ID b777c584c6f1166ededdfb7bbce7673355499255 # Parent 873a0ed5aab7e67604307fe02e4ea35916996771 lxde: add session in slim diff -r 873a0ed5aab7 -r b777c584c6f1 lxde/receipt --- a/lxde/receipt Sat Apr 28 14:44:50 2012 +0200 +++ b/lxde/receipt Sat Apr 28 15:46:08 2012 +0200 @@ -23,3 +23,22 @@ cp -a $stuff/lxde-logout.desktop $fs/usr/share/applications chown -R 0.0 $fs } + +# Add WM to SLIM available sessions. +post_install() +{ + res=$(cat $root/etc/slim.conf | grep ^session | sed s/"sessions. *"//) + if ! echo "$res" | grep -q $PACKAGE; then + echo -n "Adding $PACKAGE to /etc/slim.conf..." + sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" $root/etc/slim.conf + status + fi +} + +# Remove WM from SLIM available sessions. +post_remove() +{ + if grep -q $PACKAGE $root/etc/slim.conf; then + sed -i s/,$PACKAGE// $root/etc/slim.conf + fi +}