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