80-dbus 356 B

12345678910111213
  1. #!/bin/bash
  2. # launches a session dbus instance
  3. dbuslaunch="$(which dbus-launch 2>/dev/null)"
  4. if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
  5. if [ -n "$command" ]; then
  6. command="$dbuslaunch --exit-with-session $command"
  7. else
  8. eval $($dbuslaunch --sh-syntax --exit-with-session)
  9. fi
  10. fi