Plugs for SessionManager like gnome, kde

Currently, there is only a plug to use org.freedesktop.login1 but to logout from the current sessions, I can’t find a better alternative to the org.gnome.SessionManager dbus for Gnome and the similar one for KDE. Now, this slot seems to be similar to the login-session-control, so, I was trying to create one, but failed to find proper docs. Can I get some help on this?

Also if there is a better alternative to logout from the current, it is also requested.

This is for the savedesktop snap, that I am currently working with the upstream, as they are interested to publish it in the store. This is the review I got today from @alexmurray

“The dbus names like org.gnome.SessionManager are provided by system components (like gnome-session on a regular Ubuntu desktop) and so cannot be claimed for use by snaps. Also since only one application can bind to a given dbus name at a time, a snap such as this would not be able to bind to this name either. If your snap requires the ability to talk with org.gnome.SessionManager, then instead perhaps a new snapd interface should be created to support this.” — Alex Murray

Can you shed some light on to this? The upstream repo is https://github.com/vikdevelop/SaveDesktop

As I said in my review, there is no existing interface provided by snapd that grants access to these various dbus endpoints. You suggested login-session-control above - if you are able to use this in the snap then I would suggest you do so, otherwise a new snapd interface will likely be needed (or an existing one will need to be extended to add these additional dbus rules).

1 Like

That’s what I was trying to. I was trying to make a plug by mimicking the login-control-observe. But, can’t found the documentation for org.gnome.SessionManager(official). Should I try to work on it?

The dbus interface for org.gnome.SessionManager is defined in https://github.com/GNOME/gnome-settings-daemon/blob/master/gnome-settings-daemon/org.gnome.SessionManager.xml

So I suggest either adding rules for this to the existing login-control interface, OR creating a new one, but this will need guidance from the snapd team. @pedronis can you advise?

Okay, so, after huge brainstorming yesterday, I was able to come up with this via login-session-control. We’ll need some autoconnects, which I will clarify in a separate post.

But, should I still look into it. Can it be necessary in future?

https://github.com/vikdevelop/SaveDesktop/pull/179