diff options
Diffstat (limited to 'tools/dbus-launch.1')
-rw-r--r-- | tools/dbus-launch.1 | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/dbus-launch.1 b/tools/dbus-launch.1 index 9342423d..c0fb03f6 100644 --- a/tools/dbus-launch.1 +++ b/tools/dbus-launch.1 @@ -24,14 +24,19 @@ about D-BUS. See also the man page for \fIdbus-daemon-1\fP. .PP Here is an example of how to use \fIdbus-launch\fP with an -sh-compatible shell: +sh-compatible shell to start the per-session bus daemon: .nf - VARIABLES=`dbus-launch` - eval $VARIABLES - echo "D-BUS per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" + ## test for an existing bus daemon, just to be safe + if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then + ## if not found, launch a new one + eval `dbus-launch --exit-with-session` + echo "D-BUS per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" + export DBUS_SESSION_BUS_ADDRESS + fi .fi +You might run something like that in your login scripts. .SH OPTIONS The following options are supported: |