xfce4-session-logout from acpi script

Tino Keitel tino.keitel+xfce at tikei.de
Tue Feb 12 14:18:59 CET 2008


On Tue, Feb 12, 2008 at 13:45:14 +0100, Joost Kremers wrote:
> hi all,
> 
> another question regarding my eeepc... pressing the power button on this
> machine triggers an event that's registered by the acpi daemon. so i
> thought i could have a script run xfce4-session-logout, but this doesn't
> work because it cannot connect to the display. i'm guessing because it's
> not running as the correct user.
> 
> i tried a couple of things (using su, setting DISPLAY, xhost) but nothing
> works. is there a way to make this possible?

Why didn't it work? What error message did you get?

If you want to connect to X as a different user, you should set the
XAUTHORITY variable to point to the .Xauthority file of the X user
(home/<user>/.Xauthority), and make sure that the user has access
permissions (which is usually the case in acpi scripts, as they are run
as root).

Regards,
Tino




More information about the Xfce mailing list