1dbus-run-session(1) General Commands Manual dbus-run-session(1)
2
3
4
6 dbus-run-session - start a process as a new D-Bus session
7
9 dbus-run-session [--config-file FILENAME] [--dbus-daemon BINARY] [--]
10 PROGRAM [ARGUMENTS...]
11
12 dbus-run-session --help
13
14 dbus-run-session --version
15
17 dbus-run-session is used to start a session bus instance of dbus-daemon
18 from a shell script, and start a specified program in that session. The
19 dbus-daemon will run for as long as the program does, after which it
20 will terminate.
21
22 One use is to run a shell with its own dbus-daemon in a text‐mode or
23 SSH session, and have the dbus-daemon terminate automatically on leav‐
24 ing the sub‐shell, like this:
25
26 dbus-run-session -- bash
27
28 or to replace the login shell altogether, by combining dbus-run-session
29 with the exec builtin:
30
31 exec dbus-run-session -- bash
32
33 Another use is to run regression tests and similar things in an iso‐
34 lated D-Bus session, to avoid either interfering with the "real" D-Bus
35 session or relying on there already being a D-Bus session active, for
36 instance:
37
38 dbus-run-session -- make check
39
40 or (in automake(1)):
41
42 TESTS_ENVIRONMENT = MY_DEBUG=all dbus-run-session --
43
45 --config-file=FILENAME, --config-file FILENAME
46 Pass --config-file=FILENAME to the bus daemon, instead of pass‐
47 ing it the --session argument. See dbus-daemon(1).
48
49 --dbus-daemon=BINARY, --dbus-daemon BINARY
50 Run BINARY as dbus-daemon(1), instead of searching the PATH in
51 the usual way for an executable called dbus-daemon.
52
53 --help Print usage information and exit.
54
55 --version
56 Print the version of dbus-run-session and exit.
57
59 dbus-run-session exits with the exit status of PROGRAM, 0 if the --help
60 or --version options were used, 127 on an error within dbus-run-session
61 itself, or 128+n if the PROGRAM was killed by signal n.
62
64 PATH is searched to find PROGRAM, and (if the --dbus-daemon option is
65 not used or its argument does not contain a / character) to find
66 dbus-daemon.
67
68 The session bus' address is made available to PROGRAM in the environ‐
69 ment variable DBUS_SESSION_BUS_ADDRESS.
70
71 The variables DBUS_SESSION_BUS_PID, DBUS_SESSION_BUS_WINDOWID,
72 DBUS_STARTER_BUS_TYPE and DBUS_STARTER_ADDRESS are removed from the
73 environment, if present.
74
76 Please send bug reports to the D-Bus mailing list or bug tracker, see
77 http://www.freedesktop.org/software/dbus/
78
80 dbus-daemon(1), dbus-launch(1)
81
82
83
84 dbus-run-session(1)