Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-04-2007, 11:23 AM   #1
LQ Newbie
Registered: Dec 2007
Location: Chicago, USA
Distribution: Debian, NetBSD
Posts: 25

Rep: Reputation: 15
Arrow Running 'xfce-session-logout' from acpi script

I am trying to run xfce4-session-logout from an acpi script. The script is called, but logs indicate that xfce4-session-logout has a problem: 'no session manager running'. Subsequently, the logout/shutdown dialog does not appear in my Xfce session.

From /var/log/acpid:
[Tue Dec  4 11:11:03 2007] received event "button/power PWRF 00000080 00000002"
[Tue Dec  4 11:11:03 2007] notifying client 2830[105:106]
[Tue Dec  4 11:11:03 2007] notifying client 2999[0:0]
[Tue Dec  4 11:11:03 2007] executing action "/etc/acpi/"
[Tue Dec  4 11:11:03 2007] BEGIN HANDLER MESSAGES
xfce4-session-logout: No session manager running.
[Tue Dec  4 11:11:04 2007] END HANDLER MESSAGES
[Tue Dec  4 11:11:04 2007] action exited with status 0
[Tue Dec  4 11:11:04 2007] completed event "button/power PWRF 00000080 00000002"
I also get no results when running xfce4-session-logout from a shell. Has anyone had luck running xfce4-session-logout from the command line or a script?

Last edited by ewolf; 12-04-2007 at 12:26 PM. Reason: i meant 'xfce4-session-logout', not 'xfce-session-logout'
Old 12-05-2007, 10:57 PM   #2
Registered: Nov 2003
Distribution: Arch
Posts: 31

Rep: Reputation: 16

I just tried the xfce4-session-logout command in xterm, and the logout popup appeared.

I'm going to assume that the logout command only works if xfce4-session is running, as well as dbus. This is just an assumption, not hard fact. Do you have both those processes running?

Judging by the error message, I'd say you are using XFCE4 without the session manager.
Old 12-06-2007, 10:56 AM   #3
LQ Newbie
Registered: Dec 2007
Location: Chicago, USA
Distribution: Debian, NetBSD
Posts: 25

Original Poster
Rep: Reputation: 15
Actually, I now am getting the logout dialog if I type "xfce4-session-logout" from the shell, and I am not sure why this has changed. I can even script it.... but it doesn't work unless I call the script from the command line. The ACPI event handler tries to execute "xfce4-session-logout" when I press my laptop's power power button, but xfce4-session-logout can't seem to find the xfce4-session that I have open, and thus, no window pops up.
Old 12-06-2007, 11:05 AM   #4
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
My guess is that it's trying as the user who runs your ACPI daemon. Offhand I can't think of a way to get around that without running the ACPI as the user who is logged in, but you may be able to instead turn xfce4-session-logout into a wrapper that queries the user who is running XFCE4 and executes it as that user.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Python Script in UBUNTU Session Manager warnetgm Linux - Newbie 2 12-06-2006 03:08 PM
Xfce logout button in FC6 Hitboxx Fedora 1 11-20-2006 06:51 PM
ACPI:; nothing in /proc/acpi/fan; fans not running; problem not seen before. zetabill Linux - Kernel 1 07-30-2006 04:27 PM
How to disable auto-logout when running custom rc.local script? Arodef Linux - General 0 05-17-2006 05:02 PM
KDM+XFCE+Logout/poweroff/reboot menu? r_jensen11 Linux - Software 0 01-04-2004 06:46 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:30 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration