xfce4-session-logout from acpi script

Yves-Alexis Perez corsac at debian.org
Tue Feb 12 14:23:18 CET 2008


On Tue, Feb 12, 2008 at 12:45:14PM +0000, 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?

In powersaved they use a shell function called run_on_x_server wich gets the
user running x server, then using its DISPLAY, it runs the command.

Maybe you could look at this.
-- 
Yves-Alexis



More information about the Xfce mailing list