2003-05-16 Havoc Pennington <hp@redhat.com>
[platform/upstream/dbus.git] / tools / dbus-launch.1
1 .\" 
2 .\" dbus-launch manual page.
3 .\" Copyright (C) 2003 Red Hat, Inc.
4 .\"
5 .TH dbus-launch 1
6 .SH NAME
7 dbus-launch \- Utility to start a message bus from a shell script
8 .SH SYNOPSIS
9 .PP
10 .B dbus-launch [\-\-version] [\-\-exit-with-session]
11
12 .SH DESCRIPTION
13
14 The \fIdbus-launch\fP command is used to start \fIdbus-daemon-1\fP
15 from a shell script. It would normally be called from a user's login
16 scripts. Unlike the daemon itself, \fIdbus-launch\fP exits, so
17 backticks or the $() construct can be used to read information from
18 \fIdbus-launch\fP. \fIdbus-launch\fP prints information about the
19 launched daemon in KEY=VALUE format.
20
21 .PP
22 See http://www.freedesktop.org/software/dbus/ for more information
23 about D-BUS. See also the man page for \fIdbus-daemon-1\fP.
24
25 .PP
26 Here is an example of how to use \fIdbus-launch\fP with an 
27 sh-compatible shell to start the per-session bus daemon:
28 .nf
29
30   ## test for an existing bus daemon, just to be safe
31   if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
32       ## if not found, launch a new one
33       eval `dbus-launch --exit-with-session`
34       echo "D-BUS per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
35       export DBUS_SESSION_BUS_ADDRESS
36   fi
37
38 .fi
39 You might run something like that in your login scripts.
40
41 .SH OPTIONS
42 The following options are supported:
43 .TP
44 .I "--exit-with-session"
45 If this option is provided, a persistent "babysitter" process will be 
46 created that watches stdin for HUP and tries to connect to the X
47 server. If this process gets a HUP on stdin or loses its X connection,
48 it kills the message bus daemon.
49
50 .TP
51 .I "--version"
52 Print the version of dbus-launch
53
54 .SH AUTHOR
55 See http://www.freedesktop.org/software/dbus/doc/AUTHORS
56
57 .SH BUGS
58 Please send bug reports to the D-BUS mailing list or bug tracker,
59 see http://www.freedesktop.org/software/dbus/