diff options
Diffstat (limited to 'abs/core-testing/LinHES-config/systemconfig.sh')
-rwxr-xr-x | abs/core-testing/LinHES-config/systemconfig.sh | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/abs/core-testing/LinHES-config/systemconfig.sh b/abs/core-testing/LinHES-config/systemconfig.sh index 5b7d65e..695be64 100755 --- a/abs/core-testing/LinHES-config/systemconfig.sh +++ b/abs/core-testing/LinHES-config/systemconfig.sh @@ -996,6 +996,31 @@ function setup_web_auth { } +function mplayer_saver_check () { + if [ ! -f $BASE/etc/mplayer/mplayer.conf ] + then + mkdir -p $BASE/etc/mplayer + touch $BASE/etc/mplayer/mplayer.conf + #cp -f $TEMPLATES/mplayer.conf.template $BASE/etc/mplayer/mplayer.conf + fi + grep -q stop-xscreensaver $BASE/etc/mplayer/mplayer.conf + if [ $? = 0 ] + then + sed -i "s/^.*stop-xscreensaver.*$/stop-xscreensaver = 1 / g" $BASE/etc/mplayer/mplayer.conf + else + echo stop-xscreensaver = 1 >> $BASE/etc/mplayer/mplayer.conf + fi + grep -q heartbeat-cmd $BASE/etc/mplayer/mplayer.conf + if [ $? = 0 ] + then + sed -i '/^.*heartbeat-cmd.*$/d' $BASE/etc/mplayer/mplayer.conf + #sed -i "s/^.*heartbeat-cmd.*$/heartbeat-cmd=\"$1\"/ g" $BASE/etc/mplayer/mplayer.conf + fi + echo "heartbeat-cmd = \"$1\"" >> $BASE/etc/mplayer/mplayer.conf +} + + + function killxscreensaver { xscreensaver-command --exit & killall xscreensaver & @@ -1020,7 +1045,7 @@ case x$Screensavertype in cp -f $TEMPLATES/xscreensaver.template $MYTHHOME/.xscreensaver fi #change the idle - sed -ie "s/^timeout.*$/timeout: 0:$Screensaveridle:00/g" $MYTHHOME/.xscreensaver + sed -i "s/^timeout.*$/timeout: 0:$Screensaveridle:00/g" $MYTHHOME/.xscreensaver #set the mode case x$Screensavertheme in @@ -1039,12 +1064,7 @@ case x$Screensavertype in ;; esac - - - - - - + mplayer_saver_check "/usr/bin/xscreensaver-command -deactivate &" ;; xgscreensaver) gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type bool --set /apps/gnome-screensaver/lock_enabled false @@ -1064,7 +1084,7 @@ case x$Screensavertype in gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --set --type list --list-type=string /apps/gnome-screensaver/themes [screensavers-$Screensavertheme] ;; esac - + mplayer_saver_check "/usr/bin/gnome-screensaver-command -p &" killxscreensaver ;; xnone) killgscreensaver |