You are not logged in.
In my /etc/acpi/handler.sh
button/lid)
#echo "LID switched!">/dev/tty5
if [ -n "`grep close /proc/acpi/button/lid/LID0/state`" ]; then
/usr/sbin/pm-suspend
logger -s "ACPI lid closed";
elif [ -n "`grep open /proc/acpi/button/lid/LID0/state`" ]; then
logger -s "ACPI lid opened"
/home/skr/.brightness.sh down
DISPLAY=:0.0 /usr/bin/xlock
else
logger -s "Couldn't detect Lid state"
fi
;;
I am not able to lock my screen after resume. If I enter xlock in terminal, it works, but its not working this way.
What is going wrong here?
Last edited by shadyabhi (2011-09-18 00:47:05)
My blog:-
http://blog.abhijeetr.com
Offline
The first thought is that DISPLAY does not default to 0:0 and even can change after ACPI suspend. If this is not the case try
DISPLAY=:0
Offline
The first thought is that DISPLAY does not default to 0:0 and even can change after ACPI suspend. If this is not the case try
DISPLAY=:0
Note that Barafu is referring to an environmental variable here. To see what it is, try `env | grep DISPLAY` in the command-line.
Offline
Well, he is using it right, the only thing I am questioning is the value.
Offline
Trying changind DISPLAY=:0
Still not able to lock. I ever tried
DISPLAY=:0 /usr/bin/xlock 2>&1 > /tmp/lock_log
Nothing in the log even.
My blog:-
http://blog.abhijeetr.com
Offline
Check if your config is being started at all. try
echo "I'm here!" > /tmp/lock_log.
If is does, remove that /home/skr/.brightness.sh down line. If that script fails to exit, all will hang up.
Offline
Check if your config is being started at all. try
echo "I'm here!" > /tmp/lock_log.
If is does, remove that /home/skr/.brightness.sh down line. If that script fails to exit, all will hang up.
Removed the brightness line. This time the brightness was not changed (reduced) so I can confirm that part is executed.
Still nothing in the log.
My blog:-
http://blog.abhijeetr.com
Offline
Have a look at the following handler.sh if it helps you.
https://wiki.archlinux.org/index.php/Le … handler.sh
Regards
Offline
Oh, how could I miss the wiki.
Changed the line to
DISPLAY=:0 su -c - skr /usr/bin/xlock
and now it works perfectly.
My blog:-
http://blog.abhijeetr.com
Offline