Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jul 2010 14:46:39 +0000
From:      =?UTF-8?B?6KO05Zu95YW0?= <pagxir@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   gnome 2.30 slow startup (Could not ask session manager if shut down is available)
Message-ID:  <AANLkTikNuldmcIC6BTZA_ll2g8s58zMJ48NbZLI9YMCW@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Recently, I update my FreeBSD to 8.1, and Found that gnome 2.30 startup ver=
y
slow. It take one nimus or more to finish startup.
When startup, the gnome-panel will display after nautilus about 30 seconds.

>From the console,  I see that

1=E3=80=81gnome-session[1935]: WARNING: Application 'metacity.desktop' fail=
ed to
register before timeout
--------- after about 30 seconds ----------
2=E3=80=81** (gnome-panel:1966): WARNING **: Could not ask session manager =
if shut
down is available: Did not receive a reply. Possible causes include: the
remote application did not send a reply, the message bus security policy
blocked the reply, the reply timeout expired, or the network connection was
broken.

I recompile metacity, and "WARNING: Application 'metacity.desktop' failed t=
o
register before timeout" disappear.

I try to recompile gnome-session, but not work.
Finally, I do a little change for gnome-session and compile, it work.
the change file is gsm_manager.c
        GsmConsolekit *consolekit;
        gboolean can_suspend =3D 0;
        gboolean can_hibernate =3D 0;

#if 0
        g_object_get (manager->priv->dkp_client,
                      "can-suspend", &can_suspend,
                      "can-hibernate", &can_hibernate,
                      NULL);
#endif

        g_debug ("GsmManager: CanShutdown called");

        g_return_val_if_fail (GSM_IS_MANAGER (manager), FALSE);

        consolekit =3D gsm_get_consolekit ();
        *shutdown_available =3D gsm_consolekit_can_stop (consolekit)
                              || gsm_consolekit_can_restart (consolekit)
                              || can_suspend
                              || can_hibernate;
        g_object_unref (consolekit);
        *shutdown_available =3D 0;

I use following command to start session

setenv GNOME_SESSION "/usr/local/bin/ck-launch-session
/usr/local/bin/gnome-session"
env LC_ALL=3Dzh_CN.UTF-8 XMODIFIERS=3D@im=3Dibus startx $GNOME_SESSION

I also found that if login user is  root, it works very well.

The question is why the g_object_get call will take such a long time on
non-root user.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikNuldmcIC6BTZA_ll2g8s58zMJ48NbZLI9YMCW>