You are not logged in.
Pages: 1
This is driving me nuts. Currently, my Dell C400's display doesn't shut off when the lid is closed. I put "xset dpms force off" in acpi's handler.sh in the area under button/lid. If I run this command from a terminal, it works fine. But when I close my lid, the display flickers but doesn't turn off.
In the log, it says:
xset: unable to open display ""
I modified the command to be "xset -display :0 dpms force off", and now the log says:
button/lid
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
xset: unable to open display ":0"
What on earth am I doing wrong? Both commands work from a terminal.. :?
I am a gated community.
Offline
I just noticed it myself really...
xset can't be run with super user privilegies, but as a normal user. Suggestions anyone? I know super user has no connection to the X server, but in the circumstances where this script is run, this is a bug.
"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."
SETH / Jane Roberts
Offline
acpid runs as superuser, so it is quite easy, try:
XAUTHORITY=/home/$YOURUSER/.Xauthority DISPLAY=:0.0 xset dpms force off
Offline
Wow, talk about an old thread..
And thanks it works perfectly heh. I ended up putting this in my handler.sh:
if grep -q open /proc/acpi/button/lid/LID/state
then
XAUTHORITY=/home/stonecrest/.Xauthority xset -display :0.0 dpms force on
else
XAUTHORITY=/home/stonecrest/.Xauthority xset -display :0.0 dpms force off
fi
I am a gated community.
Offline
[img]http://www.barbarawood.com/guestbook/images/smilies/koolaid.gif[/img]
"Ooooh Yaaaa!"
Offline
I am a gated community.
Offline
Pages: 1