[ltp] Problem with acpi action

Michael Gaber linux-thinkpad@linux-thinkpad.org
Thu, 10 May 2007 16:33:41 +0200


This is a cryptographically signed message in MIME format.

--------------ms010904030809050200040402
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: quoted-printable

try adding a xhost localhost somewhere in your .Xsession or so.=20
somewhere where it will be run when you logon/your xserver starts

Guillermo Ju=C3=A1rez schrieb:
> I have some progress. I think the script is being run but the problem
> comes from xrandr accessing my display.
>=20
> This is what I get from /var/log/acpid:
>=20
> [Thu May 10 13:38:21 2007] received event "ibm/hotkey HKEY 00000080=20
> 00001007"
> [Thu May 10 13:38:21 2007] notifying client 6529[0:0]
> [Thu May 10 13:38:21 2007] notifying client 7321[0:0]
> [Thu May 10 13:38:21 2007] executing action "/etc/acpi/default.sh
> ibm/hotkey HKEY 00000080 00001007"
> [Thu May 10 13:38:21 2007] BEGIN HANDLER MESSAGES
> Can't open display
> Can't open display
> [Thu May 10 13:38:21 2007] END HANDLER MESSAGES
> [Thu May 10 13:38:21 2007] action exited with status 1
> [Thu May 10 13:38:21 2007] completed event "ibm/hotkey HKEY 00000080=20
> 00001007"
>=20
>=20
> You may notice the double "Can't open display". How can I prevent this =

> behavior?
>=20
> My distro is gentoo just in case some of you had the same problem.
>=20
> On 5/10/07, Guillermo Ju=C3=A1rez <guillermo.juarez@gmail.com> wrote:
>> I have tried that already. I thoug it was a permissions problem, but
>> no luck with that either.
>>
>> Any tip?
>>
>> On 5/9/07, Michael Gaber <Michael.Gaber@gmx.net> wrote:
>> > hmm, i think the source-statement is the problem, just kill it and t=
he
>> > scrippt will be run
>> >
>> > Guillermo Ju=C3=A1rez schrieb:
>> > > The following code belongs to my /etc/acpi/defaults.sh that handle=
s
>> > > the acpi events:
>> > >
>> > >
>> > > case "$group" in
>> > >        ibm)
>> > >                case "$action" in
>> > >                        hotkey)
>> > >                                if [ "$3" =3D "00000080" -a "$4" =3D=

>> > > "00001007" ]; then
>> > >                                        source
>> > > /etc/acpi/actions/screen_switch.sh
>> > >                                        logger "Switching screen"
>> > >                                fi
>> > >                                ;;
>> > >                        *)      logger "No conozco la accion $actio=
n"
>> > >                                ;;
>> > >                esac
>> > >                ;;
>> > >
>> > > It should execute a script that swictches my screen to a new monit=
or
>> > > if it's connected to my laptop.
>> > > The problem is the scripts is never runned. If I do it by hand it
>> > > works, but not pressing the Fn+F/ key.
>> > >
>> > > The most surprising thing is that I get the "Switching Screen"=20
>> message
>> > > in my logs, which proves that the case statement is working fine.
>> > >
>> >
>> >
>> >
>>
>>
>> --=20
>> Guillermo Ju=C3=A1rez
>> Research Assistant
>> COLLIDE Research Group
>> University of Duisburg-Essen
>>
>> guillermo.juarez@gmail.com
>>
>=20
>=20


--------------ms010904030809050200040402
Content-Type: application/x-pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIJ8DCC
BPQwggLcoAMCAQICAwJk/zANBgkqhkiG9w0BAQUFADB5MRAwDgYDVQQKEwdSb290IENBMR4w
HAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNBIENlcnQgU2lnbmlu
ZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRAY2FjZXJ0Lm9yZzAeFw0wNjA2
MjQxMzEwNTBaFw0wNzA2MjQxMzEwNTBaMD4xFjAUBgNVBAMTDU1pY2hhZWwgR2FiZXIxJDAi
BgkqhkiG9w0BCQEWFU1pY2hhZWwuR2FiZXJAZ214Lm5ldDCCASIwDQYJKoZIhvcNAQEBBQAD
ggEPADCCAQoCggEBANlvNCEKkhAhmwIpzXamq89nexUPZxbvGR05bN8NlABb/ZkrsUzq56ni
E4uA61Uuwz3stsXXPN5SOV+oJABDWgvgUsk4fZavEMbP7Kk5iJpZf+ZYDc+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