<!-- Creator : groff version 1.18.1 --> <!-- CreationDate: Wed Jun 9 05:01:29 2004 --> <html> <head> <meta name="generator" content="groff -Thtml, see www.gnu.org"> <meta name="Content-Style" content="text/css"> <title>dbus-launch</title> </head> <body> <h1 align=center>dbus-launch</h1> <a href="#NAME">NAME</a><br> <a href="#SYNOPSIS">SYNOPSIS</a><br> <a href="#DESCRIPTION">DESCRIPTION</a><br> <a href="#OPTIONS">OPTIONS</a><br> <a href="#AUTHOR">AUTHOR</a><br> <a href="#BUGS">BUGS</a><br> <hr> <a name="NAME"></a> <h2>NAME</h2> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p>dbus-launch − Utility to start a message bus from a shell script</p> </td> </table> <a name="SYNOPSIS"></a> <h2>SYNOPSIS</h2> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p><b>dbus-launch [−−version] [−−sh-syntax] [−−csh-syntax] [−−auto-syntax] [−−exit-with-session] [−−config-file=FILENAME] [PROGRAM] [ARGS...]</b></p> </td> </table> <a name="DESCRIPTION"></a> <h2>DESCRIPTION</h2> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p>The <i>dbus-launch</i> command is used to start <i>dbus-daemon-1</i> from a shell script. It would normally be called from a user’s login scripts. Unlike the daemon itself, <i>dbus-launch</i> exits, so backticks or the $() construct can be used to read information from <i>dbus-launch</i>.</p> <!-- INDENTATION --> <p>With no arguments, <i>dbus-launch</i> will simply print the values of DBUS_SESSION_BUS_ADDRESS and DBUS_SESSION_BUS_PID.</p> <!-- INDENTATION --> <p>You may specify a program to be run; in this case, <i>dbus-launch</i> will then set the appropriate environment variables and execute the specified program, with the specified arguments. See below for examples.</p> <!-- INDENTATION --> <p>Finally, you may use the −−sh-syntax, −−csh-syntax, or −−auto-syntax commands to cause <i>dbus-launch</i> to emit shell code to set up the environment. This is useful in shell scripts.</p> <!-- INDENTATION --> <p>With the −−auto-syntax option, <i>dbus-launch</i> looks at the value of the SHELL environment variable to determine which shell syntax should be used. If SHELL ends in "csh", then csh-compatible code is emitted; otherwise Bourne shell code is emitted. Instead of passing −−auto-syntax, you may explicity specify a particular one by using −−sh-syntax for Bourne syntax, or −−csh-syntax for csh syntax. In scripts, it’s more robust to avoid −−auto-syntax and you hopefully know which shell your script is written in.</p> <!-- INDENTATION --> <p>See http://www.freedesktop.org/software/dbus/ for more information about D-BUS. See also the man page for <i>dbus-daemon-1</i>.</p> <!-- INDENTATION --> <p>Here is an example of how to use <i>dbus-launch</i> with an sh-compatible shell to start the per-session bus daemon:</p> <!-- INDENTATION --> <pre> ## test for an existing bus daemon, just to be safe if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then ## if not found, launch a new one eval ‘dbus-launch --sh-syntax --exit-with-session‘ echo "D-BUS per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" fi </pre> <!-- INDENTATION --> <p>You might run something like that in your login scripts.</p> <!-- INDENTATION --> <p>Another way to use <i>dbus-launch</i> is to run your main session program, like so:</p> <!-- INDENTATION --> <pre>dbus-launch gnome-session </pre> <!-- INDENTATION --> <p>The above would likely be appropriate for ~/.xsession or ~/.Xclients.</p> </td> </table> <a name="OPTIONS"></a> <h2>OPTIONS</h2> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p>The following options are supported:</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p><i>--auto-syntax</i></p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="21%"></td> <td width="77%"> <p>Choose −−csh-syntax or −−sh-syntax based on the SHELL environment variable.</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p><i>--config-file=FILENAME</i></p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="21%"></td> <td width="77%"> <p>Pass −−config-file=FILENAME to the bus daemon, instead of passing it the −−session argument. See the man page for dbus-daemon-1</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p><i>--csh-syntax</i></p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="21%"></td> <td width="77%"> <p>Emit csh compatible code to set up environment variables.</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p><i>--exit-with-session</i></p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="21%"></td> <td width="77%"> <p>If this option is provided, a persistent "babysitter" process will be created that watches stdin for HUP and tries to connect to the X server. If this process gets a HUP on stdin or loses its X connection, it kills the message bus daemon.</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p><i>--sh-syntax</i></p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="21%"></td> <td width="77%"> <p>Emit Bourne-shell compatible code to set up environment variables.</p> </td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p><i>--version</i></p></td> </table> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="21%"></td> <td width="77%"> <p>Print the version of dbus-launch</p> </td> </table> <a name="AUTHOR"></a> <h2>AUTHOR</h2> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p>See http://www.freedesktop.org/software/dbus/doc/AUTHORS</p> </td> </table> <a name="BUGS"></a> <h2>BUGS</h2> <!-- INDENTATION --> <table width="100%" border=0 rules="none" frame="void" cols="2" cellspacing="0" cellpadding="0"> <tr valign="top" align="left"> <td width="10%"></td> <td width="89%"> <p>Please send bug reports to the D-BUS mailing list or bug tracker, see http://www.freedesktop.org/software/dbus/</p> </td> </table> <hr> </body> </html>