Re: [ACPI-sppt] capturing events with acpid

Andy Beals <[email protected]> Mon, 13 Oct 2003 09:23:33 -0700
Newsgroups gmane.linux.acpi.support
Message-ID <[email protected]>
"xhost +" is one way to solve it, but it's a lot like using an atom bomb
to cure an insect infestation - it will work but you've opened the door
to a lot of collateral damage as well.  "xhost +localhost" is much safer
and should still provide the one-command no-programming solution.

Longer-term of course, would be for acpid to change its uid/gid to
whomever is running the x session on the machine, adjusting its
environment variables [e.g. $HOME] appropriately.

On Fri, 2003-10-10 at 21:51, [email protected] wrote:
> Hi all,
> 
> I am attempting to set up my asus so that when I press my email key the 
> event is caught by acpid and launches thunderbird email client.
> 
> everything is going ok, I have set up scripts in /etc/acpi/ and 
> /etc/acpi/events, /var/log/acpid show the event being caught and the 
> program being launched, but attempts to run as root. is there a way I 
> can launch thunderbird as the current user?
> 
> this is what /var/log/acpid gives me at the moment:
> 
> [Sat Oct 11 14:23:27 2003] received event "hotkey ATKD 00000050 00000003"
> [Sat Oct 11 14:23:27 2003] executing action "/etc/acpi/email.sh"
> [Sat Oct 11 14:23:27 2003] BEGIN HANDLER MESSAGES
> Xlib: connection to ":0.0" refused by server
> Xlib: No protocol specified
> 
> 
> (thunderbird-bin:1543): Gtk-WARNING **: cannot open display:
> [Sat Oct 11 14:23:27 2003] END HANDLER MESSAGES
> [Sat Oct 11 14:23:27 2003] action exited with status 1
> [Sat Oct 11 14:23:27 2003] completed event "hotkey ATKD 00000050 00000003"
> 
> The Handler Message is identical to what get when I attempt to start 
> thunderbird when su at the console.
> 
> I am guessing that if thunderbird did start it would be as user root not 
> as user 'fred' (or whatever) if this is not the case, any ideas how I 
> fix my problem with running xprograms as su
> 
> Oh! I am doing all of this from console within KDE if that makes any 
> difference.
> 
> Cheers,
> 
> Ben.
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program.
> SourceForge.net hosts over 70,000 Open Source Projects.
> See the people who have HELPED US provide better services:
> Click here: http://sourceforge.net/supporters.php
> _______________________________________________
> ACPI-support mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/acpi-support



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php