summaryrefslogtreecommitdiff
path: root/sys-apps/dbus/files/80-dbus
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-09 01:25:23 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-09 01:25:23 +0000
commitae92bf200ab037ae73cb22d4a78724b006c71b08 (patch)
treebc7e7643c32f5ab6c5cd4bc588247d908c99a4b6 /sys-apps/dbus/files/80-dbus
parente51474b1a0df70174e725a068f144e83832c7bdf (diff)
sys-apps/dbus : import from gentoo tree
Diffstat (limited to 'sys-apps/dbus/files/80-dbus')
-rw-r--r--sys-apps/dbus/files/80-dbus13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys-apps/dbus/files/80-dbus b/sys-apps/dbus/files/80-dbus
new file mode 100644
index 00000000..5593e2cd
--- /dev/null
+++ b/sys-apps/dbus/files/80-dbus
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# launches a session dbus instance
+
+dbuslaunch="`which dbus-launch 2>/dev/null`"
+if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
+ if [ -n "$command" ]; then
+ command="$dbuslaunch --exit-with-session $command"
+ else
+ eval `$dbuslaunch --sh-syntax --exit-with-session`
+ fi
+fi
+