Thursday, May 5, 2011

Detect enter/exit session under KDE/Gnome with FreePascal

I'm asking this question after I got a very good answer to: How do I detect the 2 states of “Switch User” in Windows

My intention is to find out if the Switch User under KDE/Gnome has a similar API call I can monitor with FreePascal.

If not with FreePascal, at least the respective lib entry used in C/C++

From stackoverflow
  • I'm pretty sure that monitoring DBUS messages you can catch messages about session enter and exit. Actually i don't know if FreePascal provide DBUS apis.

    A dirty solution can be execution and parse /usr/bin/dbus-monitor output.

    Good luck

  • Yes, a dbus package is installed, and afaik I ran the examples end of last year.

    See /packages/dbus/examples/busexample.pp for an example

0 comments:

Post a Comment