After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 311623 - DBus interface
DBus interface
Status: RESOLVED DUPLICATE of bug 365375
Product: gdm
Classification: Core
Component: general
2.8.x
Other All
: Normal enhancement
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2005-07-26 17:01 UTC by William Jon McCann
Modified: 2006-11-01 15:22 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description William Jon McCann 2005-07-26 17:01:07 UTC
It will be extremely useful to have a DBus interface for display manager.  This
would allow gdm, gnome-screensaver, and fast-user-switch-applet to interoperate
well and to share more code.  James Cape has drafted a possible interface:

DisplayManager {
  Display[] ListDisplays           (void);
  Display   GetDisplayByName       (string name);
  Display   GetDisplayByConsole    (int vtnum);
  Display   GetActiveDisplay       (void);
  Display   GetCurrentDisplay      (void);
  User[]    GetValidUsers          (void);

  bool      Shutdown               (int how, int when);
  bool      ActivateDisplay        (Display display);

  void      "user-added"           (User);
  void      "user-removed"         (User);
  void      "display-added"        (Display);
  void      "display-removed"      (Display);
};

Display {
  string    GetName                (void);
  int       GetConsole             (void);
  bool      GetIsNested            (void);
  User      GetUser                (void);

  bool      StartLogin             (string username);

  void      "user-changed"         (User);
}

User {
  string    GetName                (void);
  uid_t     GetUid                 (void);
  string    GetDisplayName         (void);
  string    GetPhotoUri            (void);
  Display[] GetDisplays            (void);

  void      "name-changed"         (void);
  void      "uid-name-changed"     (void);
  void      "display-name-changed" (void);
  void      "photo-changed"        (void);
  void      "displays-changed"     (void);
}
Comment 1 William Jon McCann 2005-07-26 17:10:59 UTC
I think we might also need an ActiveChanged signal from DisplayManager.  Perhaps
that signal can have an argument that indicates whether the user has been
authenticated already or not.  The use case for this is:

* User starts gdmflexiserver from Display 1 (possibly via fast-user-switch-applet)
* Display 1 is locked (possibly via gnome-screensaver)
* GDM switches to Display 2
* User enters name and password on Display 2
* GDM destroys Display 2
* GDM switches back to Display 1

The problem is that Display 1 is still locked.

I think one way to solve this problem is to have gnome-screensaver listen for an
ActiveChanged(char *name, bool authenticated) signal from the DisplayManager. 
If the current display is active and the user was authenticated then unlock the
screen.

What do you think?
Comment 2 Brian Cameron 2005-07-26 19:05:25 UTC
This seems reasonable.  Could you explain more how this interface will work? 
What are the security ramifications of using this Dbus interface?

The idea of supporting an ActiveChanged signal seems reasonable for me as long
as the user on display 1 and 2 is the same user, and is on the console.
Comment 3 William Jon McCann 2006-11-01 15:22:26 UTC
I think we've solved this in a slightly different way.

*** This bug has been marked as a duplicate of 365375 ***