moonshot-dbus-launch: script to launch session dbus
authorSam Hartman <hartmans@debian.org>
Tue, 19 Mar 2013 14:42:12 +0000 (10:42 -0400)
committerSam Hartman <hartmans@debian.org>
Tue, 19 Mar 2013 14:42:12 +0000 (10:42 -0400)
Makefile.am
moonshot-dbus-launch [new file with mode: 0755]

index 697676f..2e48271 100644 (file)
@@ -8,6 +8,7 @@ lib_LTLIBRARIES = libmoonshot/libmoonshot.la
 bin_PROGRAMS = \
          src/moonshot \
          src/moonshot-webp
+pkglibexec_PROGRAMS = moonshot-dbus-launch
 
 AM_CFLAGS = -g -O0 -Wall
 
diff --git a/moonshot-dbus-launch b/moonshot-dbus-launch
new file mode 100755 (executable)
index 0000000..6a44a9d
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+eval `dbus-launch --sh-syntax`
+trap "kill $DBUS_SESSION_BUS_PID" hup pipe int term
+echo $DBUS_SESSION_BUS_ADDRESS
+read foo
+kill $DBUS_SESSION_BUS_PID
+