You are not logged in.
Pages: 1
I've been trying to get my Macbook Pro to suspend and lock when I close the lid. This is the relevant part of my /etc/acpi/handler.sh:
button/lid)
case `grep -c closed /proc/acpi/button/lid/LID0/state` in
0) # opening lid
;;
1) # closing lid
# TODO: run vlock as user on current tty?
/usr/bin/vlock -na
s2ram
;;
esac
;;
I've tried a few variations. I think vlock must come before s2ram (not when opening the lid). Otherwise once you resume you see the screen (and can even type commands) for a bit before the lock applies. But with vlock first, as above, the laptop suspends, but never locks. I've tried "/usr/bin/vlock -na &" and also sleeping between the two.
I need something that works without X, which is why I am using vlock and not xlock, etc.
Any idea how to do this?
Offline
Pages: 1