Another update: It seems that polkit-agent has some problems related to DBus. I placed an autostart script in gnome, designed to fire up polkit-agent manually about 70 seconds after login. The agent starts just fine.
The first startup shows these errors in xsession-error: ** (polkit-gnome-authentication-agent-1:2167): WARNING **: Error connecting to bus: org.freedesktop.DBus.Error.NoReply: 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. process 2167: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5797. This is normally a bug in some application using the D-Bus library. process 2167: arguments to dbus_connection_set_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5761. This is normally a bug in some application using the D-Bus library. ** ERROR **: Not enough memory to set up DBusConnection for use with GLib aborting... ** Description changed: Binary package hint: policykit-1-gnome Hi, I would like to (re)open a bug. The behavior is exactly the same as these, but the triggering conditions are different: https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/568748 https://bugs.launchpad.net/ubuntu/+source/dbus/+bug/568748. We're using many Ubuntu 10.04 LTS clients, kerberized to authenticate against a Kerberos Realm. We had to switch to a new kerberos Realm and LDAP directory, thus we overwrote the settings on the clients (ldap.conf, krb5.conf, pam.d files) and rebooted the machines. After the reboot the machines authenticated correctly against the new realm and LDAP directory and everything seemed right. We later discovered it was not possible, for graphical programs requesting root privileges, to prompt for password. The password dialog didn't appear. One of the affected program is ubuntu software center, just to name one. Sudoing via console or gnome-terminal worked fine. We tackled down the problem to the polkit-agent: after we changed the kerberos, ldap and pam settings, it doesn't start anymore at first login, even if the /etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop file is present and correct. The strange behavior is this: the polkit-agent doesn't start at first login but, If the user logs out and in again, the polkit-agent starts just fine. The problem can be easily reproduced: after a reboot, the user must log in, log out, and log in again for the agent to start properly (or start it manually, of course). UPDATE (copied from my own comment): the problem is triggered by the modification of ldap.conf file. Changing other files (namely krb5.conf and pam.d files) does not trigger the problem. The phenomenon disappears when reverting back to the original files, but all of them (changing back the ldap.conf file is not enough to fix the problem). - I can't find any helpful hint on the logs mentioning polkit-gnome- - authentication-agent-1. I'm providing you the .xsession-error and - .xsession-error.old. + UPDATE 2 (copied from my own comment): + Another update: + It seems that polkit-agent has some problems related to DBus. I placed an autostart script in gnome, designed to fire up polkit-agent manually about 70 seconds after login. The agent starts just fine. + + The first startup shows these errors in xsession-error: + + ** (polkit-gnome-authentication-agent-1:2167): WARNING **: Error + connecting to bus: org.freedesktop.DBus.Error.NoReply: 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. + + process 2167: arguments to dbus_connection_get_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5797. + This is normally a bug in some application using the D-Bus library. + process 2167: arguments to dbus_connection_set_data() were incorrect, assertion "connection != NULL" failed in file dbus-connection.c line 5761. + This is normally a bug in some application using the D-Bus library. + + ** ERROR **: Not enough memory to set up DBusConnection for use with GLib + aborting... + + The second startup goes well, so no errors. These are the packages we installed during the change of Kerberos Realm: The following extra packages will be installed: libasn1-8-heimdal libgssapi2-heimdal libheimntlm0-heimdal libhx509-4-heimdal libkrb5-25-heimdal libroken18-heimdal libwind0-heimdal The following packages will be REMOVED: sudo The following NEW packages will be installed: libasn1-8-heimdal libgssapi2-heimdal libheimntlm0-heimdal libhx509-4-heimdal libkrb5-25-heimdal libroken18-heimdal libsasl2-modules-gssapi-heimdal libwind0-heimdal sudo-ldap Further details about OS release and package version: lsb_release -rd Description: Ubuntu 10.04.2 LTS Release: 10.04 apt-cache policy policykit-1-gnome policykit-1-gnome: Installed: 0.96-2ubuntu2 Candidate: 0.96-2ubuntu2 Version table: *** 0.96-2ubuntu2 0 500 http://ownrepo/se.archive.ubuntu.com/ubuntu/ lucid/main Packages 100 /var/lib/dpkg/status Thank you! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/760452 Title: polkit-gnome-authentication-agent-1 not started at first login -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs