Need an interface to lock the screen

I am working on an app that is able to remotely lock the screen of a user. case: you forgot to lock your desktop when you went for lunch/coffee and want to make sure your laptop is locked.

Different desktop environments have different service names to lock the screen:

on KDE: org.kde.screensaver
on Unity and GNOME: org.gnome.ScreenSaver

Regarding path:

on KDE and GNOME: /ScreenSaver
on Unity: /com/canonical/Unity/Session

The dbus interfaces are:

KDE: org.freedesktop.ScreenSaver
Unity: com.canonical.Unity.Session
GNOME: org.gnome.ScreenSaver

I put more organized info here:

Last updated 1 year, 3 months ago. Help improve this document in the forum.