1DBUS-RUN-SESSION(1)              User Commands             DBUS-RUN-SESSION(1)
2
3
4

NAME

6       dbus-run-session - start a process as a new D-Bus session
7

SYNOPSIS

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

DESCRIPTION

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
24       leaving 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
34       isolated D-Bus session, to avoid either interfering with the "real"
35       D-Bus session or relying on there already being a D-Bus session active,
36       for instance:
37
38       dbus-run-session -- make check
39
40       or (in automake(1)):
41
42             AM_TESTS_ENVIRONMENT = export MY_DEBUG=all;
43             LOG_COMPILER = dbus-run-session
44             AM_LOG_FLAGS = --
45

OPTIONS

47       --config-file=FILENAME, --config-file FILENAME
48           Pass --config-file=FILENAME to the bus daemon, instead of passing
49           it the --session argument. See dbus-daemon(1).
50
51       --dbus-daemon=BINARY, --dbus-daemon BINARY
52           Run BINARY as dbus-daemon(1), instead of searching the PATH in the
53           usual way for an executable called dbus-daemon.
54
55       --help
56           Print usage information and exit.
57
58       --version
59           Print the version of dbus-run-session and exit.
60

EXIT STATUS

62       dbus-run-session exits with the exit status of PROGRAM, 0 if the --help
63       or --version options were used, 127 on an error within dbus-run-session
64       itself, or 128+n if the PROGRAM was killed by signal n.
65

ENVIRONMENT

67       PATH is searched to find PROGRAM, and (if the --dbus-daemon option is
68       not used or its argument does not contain a / character) to find
69       dbus-daemon.
70
71       The session bus' address is made available to PROGRAM in the
72       environment variable DBUS_SESSION_BUS_ADDRESS.
73
74       The variables DBUS_SESSION_BUS_PID, DBUS_SESSION_BUS_WINDOWID,
75       DBUS_STARTER_BUS_TYPE and DBUS_STARTER_ADDRESS are removed from the
76       environment, if present.
77

BUGS

79       Please send bug reports to the D-Bus mailing list or bug tracker, see
80       http://www.freedesktop.org/software/dbus/
81

SEE ALSO

83       dbus-daemon(1), dbus-launch(1)
84
85
86
87D-Bus 1.12.8                      05/11/2019               DBUS-RUN-SESSION(1)
Impressum