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.
For GNOME we can ask gnome-session whether it's running: SessionManager -o /org/gnome/ SessionManager -m org.gnome. SessionManager. IsSessionRunnin g
gdbus call -e -d org.gnome.
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) SessionManager exists on the bus, but the call fails
- org.gnome.
- calling IsSessionRunning() returns false (being shut down)
I need a reproducer for this, though, to test this theory.