Class SessionManagerDBus


  • public class SessionManagerDBus
    extends java.lang.Object
    Communicates with session manager to receive logoff/shutdown events. GTK also has an implementation (see gtk_application_impl_dbus_startup) However, it requires GtkApplication, and SWT doesn't use that. Current session manager clients can be seen in: Gnome: dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.GetClients XFCE: dbus-send --print-reply --dest=org.xfce.SessionManager /org/xfce/SessionManager org.xfce.Session.Manager.ListClients If you know clientObjectPath, you can send Stop signal with: dbus-send --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager/ClientXX org.gnome.SessionManager.Client.Stop
    • Constructor Detail

      • SessionManagerDBus

        public SessionManagerDBus()
    • Method Detail

      • dispose

        public void dispose()
      • addListener

        public void addListener​(SessionManagerDBus.IListener listener)
        Subscribes display for session manager events. Display will receive SWT.Close and will be able to hint that the session should not end. Please note that time limit imposed by session manager is 1 second. Final cleanup should happen at Display.dispose(). Display will be disposed before session ends, allowing final cleanup to happen. Please note that time limit imposed by session manager is 10 seconds.