# HG changeset patch # User Christophe Lincoln # Date 1334658595 -7200 # Node ID 8e410d8c4dd28cbe36c54727b94b1767c6fe5554 # Parent 6a1c389593aeabbf7695bc3407ad4349df8b4afd jwm,razor-qt,slim: fix sessions diff -r 6a1c389593ae -r 8e410d8c4dd2 jwm/receipt --- a/jwm/receipt Tue Apr 17 12:26:07 2012 +0200 +++ b/jwm/receipt Tue Apr 17 12:29:55 2012 +0200 @@ -38,3 +38,22 @@ cp $stuff/simple.jwmrc $fs/etc/jwm/simple.jwmrc cp $stuff/slitaz.jwmrc $fs/etc/jwm/system.jwmrc } + +post_install() +{ + res=$(cat $1/etc/slim.conf | grep ^session | sed s/"sessions. *"//) + # Adding WM to SLIM available sessions. + if ! echo "$res" | grep -q $PACKAGE; then + echo -n "Adding $PACKAGE to /etc/slim.conf..." + sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" $1/etc/slim.conf + status + fi +} + +post_remove() +{ + # Remove WM from SLIM available sessions. + if grep -q $PACKAGE $1/etc/slim.conf; then + sed -i s/,$PACKAGE// $1/etc/slim.conf + fi +} diff -r 6a1c389593ae -r 8e410d8c4dd2 razor-qt/receipt --- a/razor-qt/receipt Tue Apr 17 12:26:07 2012 +0200 +++ b/razor-qt/receipt Tue Apr 17 12:29:55 2012 +0200 @@ -48,7 +48,7 @@ # Adding WM to SLIM available sessions. if ! echo "$res" | grep -q $PACKAGE; then echo -n "Adding $PACKAGE to /etc/slim.conf..." - sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" /etc/slim.conf + sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" $1/etc/slim.conf status fi } diff -r 6a1c389593ae -r 8e410d8c4dd2 slim/stuff/etc/slim.conf --- a/slim/stuff/etc/slim.conf Tue Apr 17 12:26:07 2012 +0200 +++ b/slim/stuff/etc/slim.conf Tue Apr 17 12:29:55 2012 +0200 @@ -48,7 +48,7 @@ # The current chosen session name is replaced in the login_cmd # above, so your login command can handle different sessions. # see the xinitrc.sample file shipped with slim sources -sessions openbox,e17,jwm +sessions openbox # Executed when pressing F11 (requires imagemagick) #screenshot_cmd mtpaint -s /root/slim-shot.png