You are not logged in.

#1 2006-05-05 23:30:27

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

turning off display with xset

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

#2 2006-08-05 02:32:47

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: turning off display with xset

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

#3 2006-08-05 09:41:55

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: turning off display with xset

acpid runs as superuser, so it is quite easy, try:

XAUTHORITY=/home/$YOURUSER/.Xauthority DISPLAY=:0.0 xset dpms force off

Offline

#4 2006-08-05 13:51:37

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: turning off display with xset

Wow, talk about an old thread..

And thanks it works perfectly smile 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

#5 2006-08-05 14:43:53

cdhotfire
Member
From: Ocala, Florida
Registered: 2006-02-13
Posts: 151

Re: turning off display with xset

type.gif


[img]http://www.barbarawood.com/guestbook/images/smilies/koolaid.gif[/img]
"Ooooh Yaaaa!"

Offline

#6 2006-08-05 15:23:36

stonecrest
Member
From: Boulder
Registered: 2005-01-22
Posts: 1,190

Re: turning off display with xset

cdhotfire wrote:

type.gif

cop.gif


I am a gated community.

Offline

Board footer

Powered by FluxBB