title: In Gnome, what signal on dbus-monitor indicates the user is logging out?
body: <p>I want to write a script that runs in the background and detects when a user logs out. I am having trouble finding documentation on dbus-monitor. The best I can do is that I see a flurry of <code>EndSessionQuery</code>, <code>EndSession</code>, and <code>EndSessionResponse</code> but these all come with booleans so they can't fully be trusted (maybe a program says it doesn't want the user to logout?) and on top of that, what if no programs are open? This is too unreliable.</p>
  
  <p>What I want is to listen for a signal that will always happen when the user is logging out. Can someone provide that signal? Currently I am running this command:</p>
  
  <pre><code>dbus-monitor --session \
      "type='signal',interface='org.gnome.ScreenSaver',member='ActiveChanged'" | \
          myprog
  </code></pre>
  
  <p>which catches the ScreenSaver events. But I also want to catch logout. What I wish for is something like:</p>
  
  <pre><code>dbus-monitor --session \
      "type='signal',interface='org.gnome.Session',member='LogoutSuccess'" \
      "type='signal',interface='org.gnome.ScreenSaver',member='ActiveChanged'" | \
          myprog
  </code></pre>