summaryrefslogtreecommitdiff
path: root/packaging/debian/70monkeysphere_use-validation-agent
blob: d6758c833220f92f1b9564a9cc0d5bad417d6333 (plain)
  1. # /etc/X11/Xsession.d/70monkeysphere_use-validation-agent
  2. # This is a script to be sourced by Xsession. It wraps the session
  3. # startup argument with a monkeysphere-validation-agent nested
  4. # process, if available and none already exist.
  5. # Enable this system-wide by setting
  6. # MONKEYSPHERE_USE_VALIDATION_AGENT=true in
  7. # /etc/monkeysphere/monkeysphere.conf
  8. # Note that there is some weird interaction between this and
  9. # dbus-session at the moment: dbus-launch can start the msva just
  10. # fine, but if msva tries to start dbus-launch, dbus-launch fails
  11. # with:
  12. # Failed to waitpid() for babysitter intermediate process: No child processes
  13. # So this is placed at position 70 -- *before* the dbus Xsession
  14. # startup script, which is at 75 as of 2010-03-12, when i wrote this.
  15. # this is also good, because it means that the MSVA will learn about
  16. # the dbus session parameters, in case we want the agent to use dbus
  17. # to communicate with the user.
  18. # Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
  19. STARTMSVA=
  20. MSVAGENT=/usr/bin/monkeysphere-validation-agent
  21. MSSYSCONFIG=/etc/monkeysphere/monkeysphere.conf
  22. MSUSERCONFIG="$HOME/.monkeysphere/monkeysphere.conf"
  23. if [ -x "$MSVAGENT" ] ; then
  24. USEMSVAGENT=$(USE_VALIDATION_AGENT=
  25. . "$MSSYSCONFIG" 2>/dev/null
  26. . "$MSUSERCONFIG" 2>/dev/null || :
  27. printf '%s' "$USE_VALIDATION_AGENT")
  28. if [ "$USEMSVAGENT" = "true" ] ; then
  29. STARTUP="$MSVAGENT $STARTUP"
  30. fi
  31. fi