! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Xfce4-session: Shutdown/restart without consolekit no longer works in 4.10pre...
Status:
RESOLVED: FIXED
Severity:
critical
Product:
Xfce4-session
Component:
General

Comments

Description Klaus Kusche 2012-04-15 15:54:05 CEST
I had working shutdown/restart buttons in Xfce's logout dialog in 4.8.
I use sudo, I've no consolekit installed at all.

It no longer works in 4.10 pre: The buttons in the logout dialog
(and also in the session menu) are greyed out.

Commenting out all consolekit-related code lines in xfsm-shutdown.c
solves the problem for me: The shutdown/restart buttons are enabled and work.
Comment 1 Klaus Kusche 2012-04-16 18:58:01 CEST
Hmmm, some additional findings:

* "Commenting out all consolekit-related code lines in xfsm-shutdown.c
solves the problem for me: The shutdown/restart buttons are enabled and work."
Not completely true. Works on some systems, not on others, don't know why.

* Xfce's shutdown mechanism works fine: In the keyboard settings, I've bound
"xfce4-session-logout --halt" to a key combination, and that works fine,
in spite of the shutdown and reboot buttons being grey:
Pressing those keys shuts down Xfce and the system cleanly.

So it's just the keys and menu entry enabling which fails,
not the shutdown itself.

* ps *permanently* shows two root-owned processes as soon as Xfce is started:
sudo -H -S -p XFSM_SUDO_PASS  -- /usr/lib64/xfce4/session/xfsm-shutdown-helper
/usr/lib64/xfce4/session/xfsm-shutdown-helper

Is that expected?
At least, it also shows that sudo is working fine!

* If I run the above sudo command in a shell,
I get the response "XFSM_SUDO_DONE", and the command is waiting for input.
If I type something, it says "FAILED" and terminates
(I don't know what it expects).
Comment 2 Nick Schermer editbugs 2012-04-17 11:26:13 CEST
Obvious mistake, the function should look like

---
  if (xfsm_shutdown_sudo_init (shutdown, error))
    {
      *can_shutdown = TRUE;
      return TRUE;
    }

  return FALSE;
---

Same for reboot. Will fix that this evening.
Comment 3 Nick Schermer editbugs 2012-04-17 21:25:27 CEST
Fixed in 732f0b5.

Bug #8708

Reported by:
Klaus Kusche
Reported on: 2012-04-15
Last modified on: 2012-04-17

People

Assignee:
Xfce Bug Triage
CC List:
2 users

Version

Attachments

Additional information