Add dbus-run-session
[platform/upstream/dbus.git] / doc / dbus-run-session.1
1 .TH dbus\-run\-session 1
2 .SH NAME
3 dbus\-run\-session \- start a process as a new D-Bus session
4 .SH SYNOPSIS
5 .B dbus\-run\-session
6 .RB [ \-\-config\-file
7 .IR FILENAME ]
8 .RB [ \-\-dbus\-daemon
9 .IR BINARY ]
10 .RB [ \-\- ]
11 .IR PROGRAM " [" ARGUMENTS ...]
12 .P
13 .B dbus\-run\-session \-\-help
14 .P
15 .B dbus\-run\-session \-\-version
16 .SH DESCRIPTION
17 .B dbus\-run\-session
18 is used to start a session bus instance of
19 .B dbus\-daemon
20 from a shell script, and start a specified program in that session. The
21 .B dbus\-daemon
22 will run for as long as the program does, after which it will terminate.
23 .P
24 One use is to run a shell with its own
25 .B dbus\-daemon
26 in a text\(hymode or SSH session, and have the
27 .B dbus\-daemon
28 terminate automatically on leaving the sub\(hyshell, like this:
29 .P
30     dbus\-run\-session \-\- bash
31 .P
32 or to replace the login shell altogether, by combining \fBdbus\-run\-session\fR
33 with the \fBexec\fR builtin:
34 .P
35     exec dbus\-run\-session \-\- bash
36 .P
37 Another use is to run regression tests and similar things in an isolated
38 D-Bus session, to avoid either interfering with the "real" D-Bus session
39 or relying on there already being a D-Bus session active, for instance:
40 .P
41     dbus\-run\-session \-\- make check
42 .P
43 or (in
44 .BR automake (1)):
45 .P
46 .nf
47     TESTS_ENVIRONMENT = MY_DEBUG=all dbus\-run\-session \-\-
48 .fi
49 .P
50 .SH OPTIONS
51 .TP
52 \fB\-\-config\-file=\fIFILENAME\fR, \fB\-\-config\-file\fR \fIFILENAME\fR
53 Pass
54 .BI \-\-config-file= FILENAME
55 to the bus daemon, instead of passing it the
56 .B \-\-session
57 argument. See
58 .BR dbus-daemon (1).
59 .TP
60 \fB\-\-dbus\-daemon=\fIBINARY\fR, \fB\-\-dbus\-daemon\fR \fIBINARY\fR
61 Run \fIBINARY\fR as \fBdbus\-daemon\fR(1), instead of searching the \fBPATH\fR
62 in the usual way for an executable called \fBdbus\-daemon\fR.
63 .TP
64 .B \-\-help
65 Print usage information and exit.
66 .TP
67 .B \-\-version
68 Print the version of dbus\-run\-session and exit.
69 .SH EXIT STATUS
70 .B dbus\-run\-session
71 exits with the exit status of
72 .IR PROGRAM ,
73 0 if the
74 .BR \-\-help " or " \-\-version
75 options were used, 127 on an error within
76 .B dbus\-run\-session
77 itself, or
78 .RI 128+ n
79 if the
80 .I PROGRAM
81 was killed by signal
82 .IR n .
83 .SH ENVIRONMENT
84 .B PATH
85 is searched to find
86 .IR PROGRAM ,
87 and (if the \-\-dbus\-daemon option is not used or its argument does not
88 contain a
89 .BR / " character) to find " dbus\-daemon .
90 .P
91 The session bus' address is made available to
92 .I PROGRAM
93 in the environment variable
94 .BR DBUS_SESSION_BUS_ADDRESS .
95 .SH BUGS
96 Please send bug reports to the D\-Bus mailing list or bug tracker,
97 see http://www.freedesktop.org/software/dbus/
98 .SH SEE ALSO
99 .BR dbus\-daemon (1),
100 .BR dbus\-launch (1)