dbus-launch
TLDR
Start a D-Bus session bus
SYNOPSIS
dbus-launch [options] [program] [args]
DESCRIPTION
dbus-launch starts a session instance of the D-Bus message bus daemon and provides the connection address to client applications. It's typically used to ensure a D-Bus session is available for desktop applications.
When invoked without arguments, it prints environment variables (DBUSSESSIONBUSADDRESS and DBUSSESSIONBUSPID) that clients need to connect. With shell syntax options, the output can be directly evaluated to set these variables.
When a program is specified, dbus-launch starts the D-Bus daemon, sets up the environment, and then executes the program. The --exit-with-session flag ensures the daemon terminates when the program exits.
PARAMETERS
PROGRAM
Program to run with the D-Bus session.--sh-syntax
Output Bourne shell compatible syntax.--csh-syntax
Output C shell compatible syntax.--autolaunch MACHINEID
Enable autolaunch with specified machine ID.--exit-with-session
Exit when launched program terminates.--exit-with-x11
Exit when X11 connection closes.--config-file FILE
Use specified configuration file.--help
Display help information.
CAVEATS
Multiple invocations without proper session management can start multiple daemons. The daemon must be properly terminated to avoid resource leaks. X11 integration requires an active display connection.
HISTORY
dbus-launch is part of the D-Bus reference implementation, created by Red Hat and the freedesktop.org project around 2003. It became essential infrastructure for Linux desktop environments requiring inter-process communication.
SEE ALSO
dbus-daemon(1), dbus-send(1), dbus-cleanup-sockets(1)


