gdm

FFE: Add user manager dbus interface to gdmserver

Bug #423450 reported by Robert Ancell on 2009-09-02
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gdm
Won't Fix
Wishlist
gdm (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: gdm

There are multiple services that access the list of users able to log in:
1. The GDM greeter
2. The GDM configuration applet
3. The user switch applet

This list can take some time to generate and has duplicated code in all of these services. Make this list collected once in the gdmserver and these services should access it via dbus+polkit.

---

Feature Freeze exception request: This provides a new API to read user information from gdm (no modification of any data), and is requested by the DX team to get back some features which got dropped with the move of the old gdm/fusa to the new gdm/indicator-session.

At the moment, gdm itself does not need it, so the risk for breaking existing functionality is low.

Changed in gdm (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
importance: Undecided → Wishlist
status: New → In Progress

This needs to get done asap so that Dx can complete:
Bug #422052 Menu should list users if fewer than 6 are on the system

Changed in gdm (Ubuntu):
importance: Wishlist → Medium
milestone: none → karmic-alpha-6
Robert Ancell (robert-ancell) wrote :

Ted, do you have the completed API for this change?

summary: - Add login user dbus interface to gdmserver
+ Add user manager dbus interface to gdmserver

In progress patch attached to upstream bug:
http://bugzilla.gnome.org/show_bug.cgi?id=593996

The interface as it stands is:
    <!-- Get the number of known users -->
    <method name="CountUsers">
      <arg name="user_count" direction="out" type="i"/>
    </method>

    <!-- Get the list of known UIDs -->
    <method name="GetUserList">
      <arg name="uids" direction="out" type="ax"/>
    </method>

    <!-- Get user info for a user -->
    <method name="GetUserInfo">
      <arg name="uid" direction="in" type="x"/>
      <arg name="user_name" direction="out" type="s"/>
      <arg name="real_name" direction="out" type="s"/>
      <arg name="shell" direction="out" type="s"/>
      <arg name="icon_url" direction="out" type="s"/>
    </method>

    <!-- Get user info for a list of users -->
    <method name="GetUsersInfo">
      <arg name="uid" direction="in" type="ax"/>
      <!-- (uid, user_name, real_name, shell, icon_url) -->
      <arg name="user_info" direction="out" type="a(xssss)"/>
    </method>

    <!-- Triggered when user information is being reloaded.
         All existing user information is invalid from this signal.
         Wait for the UsersLoaded signal -->
    <!-- Triggered when user information has been reloaded.
         A client should call GetUserList() now -->
    <signal name="UsersLoaded"></signal>

    <!-- Triggered when a user has updated information -->
    <signal name="UserUpdated">
      <arg name="uid" type="x"/>
    </signal>

    <!-- Triggered when a users are added to/removed from the system.
         Clients should monitor these signals as soon as they connect to
         this object -->
    <signal name="UserAdded">
      <arg name="uid" type="x"/>
    </signal>
    <signal name="UserRemoved">
      <arg name="uid" type="x"/>
    </signal>

On Thu, 2009-09-03 at 07:01 +0000, Robert Ancell wrote:
> <!-- Get user info for a user -->
> <method name="GetUserInfo">
> <arg name="uid" direction="in" type="x"/>
> <arg name="user_name" direction="out" type="s"/>
> <arg name="real_name" direction="out" type="s"/>
> <arg name="shell" direction="out" type="s"/>
> <arg name="icon_url" direction="out" type="s"/>
> </method>

Does CK also track the number of logins and last login? Do you already
have that information or is it easy to get?

Also we need to know if the user currently has a session open on the
system.

> <!-- Triggered when user information is being reloaded.
> All existing user information is invalid from this signal.
> Wait for the UsersLoaded signal -->
> <!-- Triggered when user information has been reloaded.
> A client should call GetUserList() now -->
> <signal name="UsersLoaded"></signal>

I think there also needs to be a function "CanHazLoaded" that can check
to see if this signals already been sent. For the most part, this would
probably be the case for the session menu.

How about a function to "SwitchToUser" which would either switch to the
VT that is running for that user or to GDM to get a password on a new
VT? Does that seem like it fits in this API?

Fixing this bug will solve some of the delays in GDM startup due to running ck-history (bug 400863)

Robert Ancell (robert-ancell) wrote :

Ted,

As far as I can tell CK does not have an easy way to get the last login. ck-history is the program that scans the CK logs and is used to get the login count. The information is there for last login count, it is not currently not exposed via gdm. (try ck-history --last to see if this provides useful information).

Don't know about SwitchToUser.

Patch applied for gdm 2.27.90-0ubuntu4.

Robert Ancell (robert-ancell) wrote :
Changed in gdm (Ubuntu):
assignee: Robert Ancell (robert-ancell) → nobody
status: In Progress → New
Martin Pitt (pitti) on 2009-09-11
summary: - Add user manager dbus interface to gdmserver
+ FFE: Add user manager dbus interface to gdmserver
description: updated
Steve Langasek (vorlon) wrote :

FFe granted, please go ahead.

Changed in gdm (Ubuntu):
status: New → Confirmed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdm - 2.27.90-0ubuntu4

---------------
gdm (2.27.90-0ubuntu4) karmic; urgency=low

  * debian/patches/16_gdmserver_user_manager.patch:
    - Add user manager d-bus interface to gdmserver (LP: #423450)

 -- Robert Ancell <email address hidden> Sat, 12 Sep 2009 12:49:48 +0200

Changed in gdm (Ubuntu):
status: Confirmed → Fix Released
Changed in gdm:
importance: Unknown → Wishlist
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.