Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QDBusInterface>
- #include <QDebug>
- int main()
- {
- QDBusInterface kde("org.kde.ksmserver", "/KSMServer", "org.kde.KSMServerInterface");
- kde.call("logout", 0, 3, 3);
- qDebug() << "KDE: " << kde.isValid();
- QDBusInterface gnome("org.gnome.SessionManager", "/org/gnome/SessionManager", "org.gnome.SessionManager");
- gnome.call("Logout", 1);
- qDebug() << "Gnome: " << gnome.isValid();
- QDBusInterface xfce("org.xfce.SessionManager", "/org/xfce/SessionManager", "org.xfce.Session.Manager");
- xfce.call("Logout", false, true);
- qDebug() << "XFCE: " << xfce.isValid();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement