xfce4-session-logout from acpi script
Joost Kremers
joostkremers at fastmail.fm
Tue Feb 12 18:09:38 CET 2008
On Tue, Feb 12, 2008 at 02:18:59PM +0100, Tino Keitel wrote:
> > 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?
(xfce4-session-logout:pid): Gtk-WARNING **: cannot open display:
> 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).
i tried the following in /etc/acpi/powerbtn.sh:
XAUTHORITY=/home/<user>/.Xauthority /usr/bin/xfce4-session-logout
but i get the same display error. when i do:
DISPLAY=:0.0 /usr/bin/xfce4-session-logout
OR
XAUTHORITY=/home/<user>/.Xauthority DISPLAY=:0.0 /usr/bin/xfce4-session-logout
i get the error:
xfce4-session-logout: No session manager running.
even though ps shows that the session manager *is* running.
--
Joost Kremers
Life has its moments
More information about the Xfce
mailing list