Comment 4 for bug 460932

Revision history for this message
Martin Pitt (pitti) wrote :

For GNOME we can ask gnome-session whether it's running:
  gdbus call -e -d org.gnome.SessionManager -o /org/gnome/SessionManager -m org.gnome.SessionManager.IsSessionRunning

so we reject a crash if:

- $DBUS_SESSION_BUS_ADDRESS exists, but we get a d-bus error when trying to connect to it (shutting down session bus)
- org.gnome.SessionManager exists on the bus, but the call fails
- calling IsSessionRunning() returns false (being shut down)

I need a reproducer for this, though, to test this theory.