diff --git a/registryd/registry-main.c b/registryd/registry-main.c
index d7556c8..9d3c0e7 100644
--- a/registryd/registry-main.c
+++ b/registryd/registry-main.c
@@ -77,12 +77,34 @@ on_session_signal (GDBusProxy *proxy,
 static gboolean
 session_manager_connect (void)
 {
+        GVariant *res;
+        gboolean is_running;
+        GError *error = NULL;
 
         sm_proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, 0, NULL,
                                               SM_DBUS_NAME,
                                               SM_DBUS_PATH,
                                               SM_DBUS_INTERFACE, NULL, NULL);
 
+        res = g_dbus_proxy_call_sync (sm_proxy,
+                                 "IsSessionRunning", NULL,
+                                  0, 1000, NULL, &error);
+
+        if (! res) {
+                const char *message = (error && error->message ? error->message
+                                       : "no error");
+                g_warning ("Failed to know whether the sesson manager has entered the running phase: %s", message);
+                if (error)
+                        g_error_free (error);
+        } else {
+                g_variant_get (res, "(b)", &is_running);
+                g_variant_unref (res);
+                if (is_running) {
+                        if (!register_client ())
+                                g_warning ("Unable to register client with session manager");
+                }
+        }
+
         g_signal_connect (G_OBJECT (sm_proxy), "g-signal",
                           G_CALLBACK (on_session_signal), NULL);
 
