Comment 11 for bug 716167

Revision history for this message
Bill Filler (bfiller) wrote :

This bug is related to bug #706248.
After much debugging, it seems the problem is related to how we are registering unity-2d-launcher and unity-2d-panel with gnome-session. We are registering with gnome-session such that these two application can be restarted automatically by the session when they crash.

The registration code is in libunity-2d-private/src/gnomesessionclient.cpp in method connectToSessionManager(). On logout, the method queryEndSession() is called. Note that endSession() and stop() methods NEVER get called which doesn't seem correct.

I was able to make the "Unknown process" dialog go away (at least couldn't make it fail in my testing) by changing the dbus call in queryEndSession() to async instead of sync,
i.e.
    QDBusPendingCall call = iface.asyncCall("EndSessionResponse", true, "");
instead of:
  QDBusReply<void> reply = iface.call("EndSessionResponse", /* is_okay= */ true, /* reason= */ "");

But even in changing call to async, the long delay still occurs on logout (bug 706248) so clearly we are still not doing something correctly. Commenting out the impl in connectToSessionManager() fixes both problems, but then launcher and panel won't restart on crash.

I'm looking at nautilus and metacity, which both get restarted by the session to see how they register/unregister. It's not apparent to me how they do it. I couldn't find any code in either that was responsible for registering, certainly they are not doing it how we are. So my big question is, does anyone know how nautilus/metacity are auto-restarted because I think we should do it the same way as they do not have the problems we have.