man-pages/man1/dbus-run-session.1.html
2021-03-31 01:06:50 +01:00

222 lines
4.5 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of DBUS-RUN-SESSION</TITLE>
</HEAD><BODY>
<H1>DBUS-RUN-SESSION</H1>
Section: User Commands (1)<BR>Updated: <BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
dbus-run-session - start a process as a new D-Bus session
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<DL COMPACT>
<DT id="1">
<B>dbus-run-session</B> [--config-file&nbsp;<I>FILENAME</I>] [--dbus-daemon&nbsp;<I>BINARY</I>] [--] <I>PROGRAM</I> [<I>ARGUMENTS</I>...]
<DT id="2">
<B>dbus-run-session</B> --help
<DT id="3">
<B>dbus-run-session</B> --version
</DL>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<P>
<B>dbus-run-session</B>
<DD>is used to start a session bus instance of
<B>dbus-daemon</B>
from a shell script, and start a specified program in that session. The
<B>dbus-daemon</B>
will run for as long as the program does, after which it will terminate.
<P>
One use is to run a shell with its own
<B>dbus-daemon</B>
in a text-mode or SSH session, and have the
<B>dbus-daemon</B>
terminate automatically on leaving the sub-shell, like this:
<P>
dbus-run-session -- bash
<P>
or to replace the login shell altogether, by combining
<B>dbus-run-session</B>
with the
<B>exec</B>
builtin:
<P>
exec dbus-run-session -- bash
<P>
Another use is to run regression tests and similar things in an isolated D-Bus session, to avoid either interfering with the &quot;real&quot; D-Bus session or relying on there already being a D-Bus session active, for instance:
<P>
dbus-run-session -- make check
<P>
or (in
<B><A HREF="/cgi-bin/man/man2html?1+automake">automake</A></B>(1)):
<P>
<DL COMPACT><DT id="4"><DD>
<PRE>
AM_TESTS_ENVIRONMENT = export MY_DEBUG=all;
LOG_COMPILER = dbus-run-session
AM_LOG_FLAGS = --
</PRE>
</DL>
<A NAME="lbAE">&nbsp;</A>
<H2>OPTIONS</H2>
<P>
<B>--config-file=</B><I>FILENAME</I>, <B>--config-file</B> <I>FILENAME</I>
<DL COMPACT><DT id="5"><DD>
Pass
<B>--config-file=</B><I>FILENAME</I>
to the bus daemon, instead of passing it the
<B>--session</B>
argument. See
<B><A HREF="/cgi-bin/man/man2html?1+dbus-daemon">dbus-daemon</A></B>(1).
</DL>
<P>
<B>--dbus-daemon=</B><I>BINARY</I>, <B>--dbus-daemon</B> <I>BINARY</I>
<DL COMPACT><DT id="6"><DD>
Run
<I>BINARY</I>
as
<B><A HREF="/cgi-bin/man/man2html?1+dbus-daemon">dbus-daemon</A></B>(1), instead of searching the
<B>PATH</B>
in the usual way for an executable called
<B>dbus-daemon</B>.
</DL>
<P>
<B>--help</B>
<DL COMPACT><DT id="7"><DD>
Print usage information and exit.
</DL>
<P>
<B>--version</B>
<DL COMPACT><DT id="8"><DD>
Print the version of dbus-run-session and exit.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>EXIT STATUS</H2>
<P>
<B>dbus-run-session</B>
exits with the exit status of
<I>PROGRAM</I>, 0 if the
<B>--help</B>
or
<B>--version</B>
options were used, 127 on an error within
<B>dbus-run-session</B>
itself, or 128+<I>n</I>
if the
<I>PROGRAM</I>
was killed by signal
<I>n</I>.
<A NAME="lbAG">&nbsp;</A>
<H2>ENVIRONMENT</H2>
<P>
<B>PATH</B>
is searched to find
<I>PROGRAM</I>, and (if the --dbus-daemon option is not used or its argument does not contain a
<B>/</B>
character) to find
<B>dbus-daemon</B>.
<P>
The session bus' address is made available to
<I>PROGRAM</I>
in the environment variable
<B>DBUS_SESSION_BUS_ADDRESS</B>.
<P>
The variables
<B>DBUS_SESSION_BUS_PID</B>,
<B>DBUS_SESSION_BUS_WINDOWID</B>,
<B>DBUS_STARTER_BUS_TYPE</B>
and
<B>DBUS_STARTER_ADDRESS</B>
are removed from the environment, if present.
<A NAME="lbAH">&nbsp;</A>
<H2>BUGS</H2>
<P>
Please send bug reports to the D-Bus mailing list or bug tracker, see
m[blue]<B><A HREF="http://www.freedesktop.org/software/dbus/">http://www.freedesktop.org/software/dbus/</A></B>m[]
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<P>
<B><A HREF="/cgi-bin/man/man2html?1+dbus-daemon">dbus-daemon</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?1+dbus-launch">dbus-launch</A></B>(1)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="9"><A HREF="#lbAB">NAME</A><DD>
<DT id="10"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="11"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="12"><A HREF="#lbAE">OPTIONS</A><DD>
<DT id="13"><A HREF="#lbAF">EXIT STATUS</A><DD>
<DT id="14"><A HREF="#lbAG">ENVIRONMENT</A><DD>
<DT id="15"><A HREF="#lbAH">BUGS</A><DD>
<DT id="16"><A HREF="#lbAI">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:09 GMT, March 31, 2021
</BODY>
</HTML>