[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

using ACPID question



Dear list,

I have been trying to use ACPID sleep for my laptop for quite a while and
finally have stumbled across a page which deails with my situation (on a laptop
Dell Latitude C840). 

http://winterwolf.co.uk/dellpm

As it stands, there is a script there as follows: (further down)

#!/bin/bash

XUSER=`ps -C startx -o user h`
[[ 0$XUSER == 0 ]] && XUSER=none

if [[ 0`cat /proc/acpi/button/lid/LID/state|cut -c 13-16` == 0open ]]
then
        # Lid has been opened
        
        if [[ $XUSER != none ]]
        then
                su - $XUSER -c DISPLAY=:0.0 xset dpms force on
                su - $XUSER -c "/bin/sed -i 's/^dpmsOff:.*$/dpmsOff:       
0:30:00/' ~$XUSER/.xscreensaver"
                su - $XUSER -c "DISPLAY=:0.0 /usr/bin/xscreensaver-command
-restart"
                su - $XUSER -c "DISPLAY=:0.0 /usr/bin/xscreensaver-command
-cycle"
        fi
else
        # Lid has been closed

        if [[ $XUSER != none ]]
        then
                su - $XUSER -c "/bin/sed -i 's/^dpmsOff:.*$/dpmsOff:       
0:00:10/' ~$XUSER/.xscreensaver"
                su - $XUSER -c "DISPLAY=:0.0 /usr/bin/xscreensaver-command
-restart"
                su - $XUSER -c DISPLAY=:0.0 xset dpms force off
                su - $XUSER -c "DISPLAY=:0.0 /usr/bin/xscreensaver-command
-lock"
        fi
fi

Btw, do I use startx? How do I tell?

What I don't understand is where to put this....and how to run it. Also, I
don't use xscreensaver, but xlock (and that also not in the laptop, but I can
do that). Can I just change that?

By the way software suspend does not work on my laptop: it simply starts all
over again when it is powered on.

Any suggestions, please?

Many thanks in advance and best wishes!


		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]