Acpid Can't Run Screen Blank Script in FC4

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

 



Here's some FC4 weirdness.  Maybe someone out there can help...

I've got my Thinkpad T40 almost all teaked out using ACPI goodness.  For
the most part, t's working very nicely (albeit without the stock FC4
kernel).  There's one thing that's bugging me though.  I have a script
that gets run whenever I hit the "turn off screen" key combo (Fn-F3).
When I run this script as root or my normal user from a gnome-termnal,
it runs fine, turning on dpms.  When I use the same script via acpid, I
get a permission denied error.

At first, I thought it was maybe an selinux issue.  Afterall, I had to
lear up a bunch of other denies WRT acpi/apm.  I checked the audit logs
with audit2allow, but there was nothing.

I turned on some command logging with the -x option to /bin/sh.  Here's
what I get in /var/log/acpid when running the script through acpid (IOW,
when hitting Fn-F3):

[Fri Jul  1 15:46:10 2005] received event "ibm/hotkey HKEY 00000080
00001003"
[Fri Jul  1 15:46:10 2005] notifying client 22067[932:932]
[Fri Jul  1 15:46:10 2005] executing action "/etc/acpi/actions/backlight.sh"
[Fri Jul  1 15:46:10 2005] BEGIN HANDLER MESSAGES
++ pidof /usr/X11R6/bin/X
+ PID=2678
+ '[' 0 == 1 ']'
++ perl '-ne/\x00-auth\x00(.*?)\x00.*/&&print$1' /proc/2678/cmdline
+ AUTH=
+ '[' x = x ']'
++ perl '-ne/(^|\x00)XAUTHORITY=(.*?)\x00/&&print$2' /proc/2678/environ
+ AUTH=/v/home/pete/.Xauthority
+ export XAUTHORITY=/v/home/pete/.Xauthority
+ XAUTHORITY=/v/home/pete/.Xauthority
+ /usr/X11R6/bin/xset -display :0 dpms force standby
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

/usr/X11R6/bin/xset:  unable to open display ":0"
[Fri Jul  1 15:46:10 2005] END HANDLER MESSAGES
[Fri Jul  1 15:46:10 2005] action exited with status 1
[Fri Jul  1 15:46:10 2005] completed event "ibm/hotkey HKEY 00000080
00001003"


Running the exact same script from a gnome terminal as either root or
pete gets the sceen to blank just fine.  This worked fine in FC3.

Suggestions?

Thanks,
pete


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux