summaryrefslogtreecommitdiff
path: root/packaging/debian/70monkeysphere_use-validation-agent
diff options
context:
space:
mode:
authorMatthew James Goins <mjgoins@openflows.com>2010-03-14 17:40:46 -0400
committerMatthew James Goins <mjgoins@openflows.com>2010-03-14 17:40:46 -0400
commitdd71f5ec4a69c58f894f4f6961ca3786a192bc62 (patch)
tree1e5bb5331837afcf9f77187daaaebf15c93606d7 /packaging/debian/70monkeysphere_use-validation-agent
parent970c7500631f46b5aa6279bf607c7d11ede7549e (diff)
parent3d46f5954da2bc9a2dd8d2ce35713136149c2983 (diff)
Merge remote branch 'dkg/master'
Diffstat (limited to 'packaging/debian/70monkeysphere_use-validation-agent')
-rw-r--r--packaging/debian/70monkeysphere_use-validation-agent38
1 files changed, 38 insertions, 0 deletions
diff --git a/packaging/debian/70monkeysphere_use-validation-agent b/packaging/debian/70monkeysphere_use-validation-agent
new file mode 100644
index 0000000..c3135a8
--- /dev/null
+++ b/packaging/debian/70monkeysphere_use-validation-agent
@@ -0,0 +1,38 @@
+# /etc/X11/Xsession.d/70monkeysphere_use-validation-agent
+
+# This is a script to be sourced by Xsession. It wraps the session
+# startup argument with a monkeysphere-validation-agent nested
+# process, if available and none already exist.
+
+# Enable this system-wide by setting
+# MONKEYSPHERE_USE_VALIDATION_AGENT=true in
+# /etc/monkeysphere/monkeysphere.conf
+
+# Note that there is some weird interaction between this and
+# dbus-session at the moment: dbus-launch can start the msva just
+# fine, but if msva tries to start dbus-launch, dbus-launch fails
+# with:
+
+# Failed to waitpid() for babysitter intermediate process: No child processes
+
+# So this is placed at position 70 -- *before* the dbus Xsession
+# startup script, which is at 75 as of 2010-03-12, when i wrote this.
+
+# this is also good, because it means that the MSVA will learn about
+# the dbus session parameters, in case we want the agent to use dbus
+# to communicate with the user.
+
+# Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
+
+MSVAGENT=/usr/bin/monkeysphere-validation-agent
+MSSYSCONFIG=/etc/monkeysphere/monkeysphere.conf
+MSUSERCONFIG="$HOME/.monkeysphere/monkeysphere.conf"
+
+if [ -x "$MSVAGENT" ] ; then
+ if [ "$(USE_VALIDATION_AGENT=
+. "$MSSYSCONFIG" 2>/dev/null
+. "$MSUSERCONFIG" 2>/dev/null || :
+printf '%s' "$USE_VALIDATION_AGENT")" = "true" ] ; then
+ STARTUP="$MSVAGENT $STARTUP"
+ fi
+fi