{
    "mode": "man",
    "parameter": "dbus-daemon",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/dbus-daemon/1/json",
    "generated": "2026-05-30T06:06:45Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "dbus-daemon - Message bus daemon\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "dbus-daemon",
                    "content": "dbus-daemon [--version] [--session] [--system] [--config-file=FILE]\n[--print-address [=DESCRIPTOR]] [--print-pid [=DESCRIPTOR]] [--fork] [--nosyslog]\n[--syslog] [--syslog-only]\n\n"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "dbus-daemon is the D-Bus message bus daemon. See http://www.freedesktop.org/software/dbus/\nfor more information about the big picture. D-Bus is first a library that provides one-to-one\ncommunication between any two applications; dbus-daemon is an application that uses this\nlibrary to implement a message bus daemon. Multiple programs connect to the message bus\ndaemon and can exchange messages with one another.\n\nThere are two standard message bus instances: the systemwide message bus (installed on many\nsystems as the \"messagebus\" init service) and the per-user-login-session message bus (started\neach time a user logs in).  dbus-daemon is used for both of these instances, but with a\ndifferent configuration file.\n\nThe --session option is equivalent to \"--config-file=/usr/share/dbus-1/session.conf\" and the\n--system option is equivalent to \"--config-file=/usr/share/dbus-1/system.conf\". By creating\nadditional configuration files and using the --config-file option, additional special-purpose\nmessage bus daemons could be created.\n\nThe systemwide daemon is normally launched by an init script, standardly called simply\n\"messagebus\".\n\nThe systemwide daemon is largely used for broadcasting system events, such as changes to the\nprinter queue, or adding/removing devices.\n\nThe per-session daemon is used for various interprocess communication among desktop\napplications (however, it is not tied to X or the GUI in any way).\n\nSIGHUP will cause the D-Bus daemon to PARTIALLY reload its configuration file and to flush\nits user/group information caches. Some configuration changes would require kicking all apps\noff the bus; so they will only take effect if you restart the daemon. Policy changes should\ntake effect with SIGHUP.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "The following options are supported:\n",
            "subsections": [
                {
                    "name": "--config-file=FILE",
                    "content": "Use the given configuration file.\n",
                    "long": "--config-file",
                    "arg": "FILE"
                },
                {
                    "name": "--fork",
                    "content": "Force the message bus to fork and become a daemon, even if the configuration file does\nnot specify that it should. In most contexts the configuration file already gets this\nright, though. This option is not supported on Windows.\n",
                    "long": "--fork"
                },
                {
                    "name": "--nofork",
                    "content": "Force the message bus not to fork and become a daemon, even if the configuration file\nspecifies that it should. On Windows, the dbus-daemon never forks, so this option is\nallowed but does nothing.\n",
                    "long": "--nofork"
                },
                {
                    "name": "--print-address[=DESCRIPTOR]",
                    "content": "Print the address of the message bus to standard output, or to the given file descriptor.\nThis is used by programs that launch the message bus.\n"
                },
                {
                    "name": "--print-pid[=DESCRIPTOR]",
                    "content": "Print the process ID of the message bus to standard output, or to the given file\ndescriptor. This is used by programs that launch the message bus.\n"
                },
                {
                    "name": "--session",
                    "content": "Use the standard configuration file for the per-login-session message bus.\n",
                    "long": "--session"
                },
                {
                    "name": "--system",
                    "content": "Use the standard configuration file for the systemwide message bus.\n",
                    "long": "--system"
                },
                {
                    "name": "--version",
                    "content": "Print the version of the daemon.\n",
                    "long": "--version"
                },
                {
                    "name": "--introspect",
                    "content": "Print the introspection information for all D-Bus internal interfaces.\n",
                    "long": "--introspect"
                },
                {
                    "name": "--address[=ADDRESS]",
                    "content": "Set the address to listen on. This option overrides the address configured in the\nconfiguration file via the <listen> directive. See the documentation of that directive\nfor more details.\n"
                },
                {
                    "name": "--systemd-activation",
                    "content": "Enable systemd-style service activation. Only useful in conjunction with the systemd\nsystem and session manager on Linux.\n",
                    "long": "--systemd-activation"
                },
                {
                    "name": "--nopidfile",
                    "content": "Don't write a PID file even if one is configured in the configuration files.\n",
                    "long": "--nopidfile"
                },
                {
                    "name": "--syslog",
                    "content": "Force the message bus to use the system log for messages, in addition to writing to\nstandard error, even if the configuration file does not specify that it should. On Unix,\nthis uses the syslog; on Windows, this uses OutputDebugString().\n",
                    "long": "--syslog"
                },
                {
                    "name": "--syslog-only",
                    "content": "Force the message bus to use the system log for messages, and not duplicate them to\nstandard error. On Unix, this uses the syslog; on Windows, this uses OutputDebugString().\n",
                    "long": "--syslog-only"
                },
                {
                    "name": "--nosyslog",
                    "content": "Force the message bus to use only standard error for messages, even if the configuration\nfile specifies that it should use the system log.\n",
                    "long": "--nosyslog"
                }
            ]
        },
        "CONFIGURATION FILE": {
            "content": "A message bus daemon has a configuration file that specializes it for a particular\napplication. For example, one configuration file might set up the message bus to be a\nsystemwide message bus, while another might set it up to be a per-user-login-session bus.\n\nThe configuration file also establishes resource limits, security parameters, and so forth.\n\nThe configuration file is not part of any interoperability specification and its backward\ncompatibility is not guaranteed; this document is documentation, not specification.\n\nThe standard systemwide and per-session message bus setups are configured in the files\n\"/usr/share/dbus-1/system.conf\" and \"/usr/share/dbus-1/session.conf\". These files normally\n<include> a system-local.conf or session-local.conf in /etc/dbus-1; you can put local\noverrides in those files to avoid modifying the primary configuration files.\n\nThe configuration file is an XML document. It must have the following doctype declaration:\n\n\n<!DOCTYPE busconfig PUBLIC \"-//freedesktop//DTD D-Bus Bus Configuration 1.0//EN\"\n\"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd\">\n\n\nThe following elements may be present in the configuration file.\n\n•   <busconfig>\n\nRoot element.\n\n•   <type>\n\nThe well-known type of the message bus. Currently known values are \"system\" and \"session\"; if\nother values are set, they should be either added to the D-Bus specification, or namespaced.\nThe last <type> element \"wins\" (previous values are ignored). This element only controls\nwhich message bus specific environment variables are set in activated clients. Most of the\npolicy that distinguishes a session bus from the system bus is controlled from the other\nelements in the configuration file.\n\nIf the well-known type of the message bus is \"session\", then the DBUSSTARTERBUSTYPE\nenvironment variable will be set to \"session\" and the DBUSSESSIONBUSADDRESS environment\nvariable will be set to the address of the session bus. Likewise, if the type of the message\nbus is \"system\", then the DBUSSTARTERBUSTYPE environment variable will be set to \"system\"\nand the DBUSSYSTEMBUSADDRESS environment variable will be set to the address of the system\nbus (which is normally well known anyway).\n\nExample: <type>session</type>\n\n•   <include>\n\nInclude a file <include>filename.conf</include> at this point. If the filename is relative,\nit is located relative to the configuration file doing the including.\n\n<include> has an optional attribute \"ignoremissing=(yes|no)\" which defaults to \"no\" if not\nprovided. This attribute controls whether it's a fatal error for the included file to be\nabsent.\n\n•   <includedir>\n\nInclude all files in <includedir>foo.d</includedir> at this point. Files in the directory are\nincluded in undefined order. Only files ending in \".conf\" are included.\n\nThis is intended to allow extension of the system bus by particular packages. For example, if\nCUPS wants to be able to send out notification of printer queue changes, it could install a\nfile to /usr/share/dbus-1/system.d or /etc/dbus-1/system.d that allowed all apps to receive\nthis message and allowed the printer daemon user to send it.\n\n•   <user>\n\nThe user account the daemon should run as, as either a username or a UID. If the daemon\ncannot change to this UID on startup, it will exit. If this element is not present, the\ndaemon will not change or care about its UID.\n\nThe last <user> entry in the file \"wins\", the others are ignored.\n\nThe user is changed after the bus has completed initialization. So sockets etc. will be\ncreated before changing user, but no data will be read from clients before changing user.\nThis means that sockets and PID files can be created in a location that requires root\nprivileges for writing.\n\n•   <fork>\n\nIf present, the bus daemon becomes a real daemon (forks into the background, etc.). This is\ngenerally used rather than the --fork command line option.\n\n•   <keepumask>\n\nIf present, the bus daemon keeps its original umask when forking. This may be useful to avoid\naffecting the behavior of child processes.\n\n•   <syslog>\n\nIf present, the bus daemon will log to syslog. The --syslog, --syslog-only and --nosyslog\ncommand-line options take precedence over this setting.\n\n•   <pidfile>\n\nIf present, the bus daemon will write its pid to the specified file. The --nopidfile\ncommand-line option takes precedence over this setting.\n\n•   <allowanonymous>\n\nIf present, connections that authenticated using the ANONYMOUS mechanism will be authorized\nto connect. This option has no practical effect unless the ANONYMOUS mechanism has also been\nenabled using the <auth> element, described below.\n\nUsing this directive in the configuration of the well-known system bus or the well-known\nsession bus will make that bus insecure and should never be done. Similarly, on custom bus\ntypes, using this directive will usually make the custom bus insecure, unless its\nconfiguration has been specifically designed to prevent anonymous users from causing damage\nor escalating privileges.\n\n•   <listen>\n\nAdd an address that the bus should listen on. The address is in the standard D-Bus format\nthat contains a transport name plus possible parameters/options.\n\nOn platforms other than Windows, unix-based transports (unix, systemd, launchd) are the\ndefault for both the well-known system bus and the well-known session bus, and are strongly\nrecommended.\n\nOn Windows, unix-based transports are not available, so TCP-based transports must be used.\nSimilar to remote X11, the tcp and nonce-tcp transports have no integrity or confidentiality\nprotection, so they should normally only be used across the local loopback interface, for\nexample using an address like tcp:host=127.0.0.1 or nonce-tcp:host=localhost. In particular,\nconfiguring the well-known system bus or the well-known session bus to listen on a\nnon-loopback TCP address is insecure.\n\nDevelopers are sometimes tempted to use remote TCP as a debugging tool. However, if this\nfunctionality is left enabled in finished products, the result will be dangerously insecure.\nInstead of using remote TCP, developers should relay connections via Secure Shell or a\nsimilar protocol[1].\n\nRemote TCP connections were historically sometimes used to share a single session bus between\nlogin sessions of the same user on different machines within a trusted local area network, in\nconjunction with unencrypted remote X11, a NFS-shared home directory and NIS (YP)\nauthentication. This is insecure against an attacker on the same LAN and should be considered\nstrongly deprecated; more specifically, it is insecure in the same ways and for the same\nreasons as unencrypted remote X11 and NFSv2/NFSv3. The D-Bus maintainers recommend using a\nseparate session bus per (user, machine) pair, only accessible from within that machine.\n\nExample: <listen>unix:path=/tmp/foo</listen>\n\nExample: <listen>tcp:host=localhost,port=1234</listen>\n\nIf there are multiple <listen> elements, then the bus listens on multiple addresses. The bus\nwill pass its address to started services or other interested parties with the last address\ngiven in <listen> first. That is, apps will try to connect to the last <listen> address\nfirst.\n\ntcp sockets can accept IPv4 addresses, IPv6 addresses or hostnames. If a hostname resolves to\nmultiple addresses, the server will bind to all of them. The family=ipv4 or family=ipv6\noptions can be used to force it to bind to a subset of addresses\n\nExample: <listen>tcp:host=localhost,port=0,family=ipv4</listen>\n\nA special case is using a port number of zero (or omitting the port), which means to choose\nan available port selected by the operating system. The port number chosen can be obtained\nwith the --print-address command line parameter and will be present in other cases where the\nserver reports its own address, such as when DBUSSESSIONBUSADDRESS is set.\n\nExample: <listen>tcp:host=localhost,port=0</listen>\n\ntcp/nonce-tcp addresses also allow a bind=hostname option, used in a listenable address to\nconfigure the interface on which the server will listen: either the hostname is the IP\naddress of one of the local machine's interfaces (most commonly 127.0.0.1), a DNS name that\nresolves to one of those IP addresses, '0.0.0.0' to listen on all IPv4 interfaces\nsimultaneously, or '::' to listen on all IPv4 and IPv6 interfaces simultaneously (if\nsupported by the OS). If not specified, the default is the same value as \"host\".\n\nExample: <listen>tcp:host=localhost,bind=0.0.0.0,port=0</listen>\n\n•   <auth>\n\nLists permitted authorization mechanisms. If this element doesn't exist, then all known\nmechanisms are allowed. If there are multiple <auth> elements, all the listed mechanisms are\nallowed. The order in which mechanisms are listed is not meaningful.\n\nOn non-Windows operating systems, allowing only the EXTERNAL authentication mechanism is\nstrongly recommended. This is the default for the well-known system bus and for the\nwell-known session bus.\n\nExample: <auth>EXTERNAL</auth>\n\nExample: <auth>DBUSCOOKIESHA1</auth>\n\n•   <servicedir>\n\nAdds a directory to search for .service files, which tell the dbus-daemon how to start a\nprogram to provide a particular well-known bus name. See the D-Bus Specification for more\ndetails about the contents of .service files.\n\nIf a particular service is found in more than one <servicedir>, the first directory listed in\nthe configuration file takes precedence. If two service files providing the same well-known\nbus name are found in the same directory, it is arbitrary which one will be chosen (this can\nonly happen if at least one of the service files does not have the recommended name, which is\nits well-known bus name followed by \".service\").\n\n•   <standardsessionservicedirs/>\n\n<standardsessionservicedirs/> requests a standard set of session service directories. Its\neffect is similar to specifying a series of <servicedir/> elements for each of the data\ndirectories, in the order given here. It is not exactly equivalent, because there is\ncurrently no way to disable directory monitoring or enforce strict service file naming for a\n<servicedir/>.\n\nAs with <servicedir/> elements, if a particular service is found in more than one service\ndirectory, the first directory takes precedence. If two service files providing the same\nwell-known bus name are found in the same directory, it is arbitrary which one will be chosen\n(this can only happen if at least one of the service files does not have the recommended\nname, which is its well-known bus name followed by \".service\").\n\nOn Unix, the standard session service directories are:\n\n•   $XDGRUNTIMEDIR/dbus-1/services, if XDGRUNTIMEDIR is set (see the XDG Base Directory\nSpecification for details of XDGRUNTIMEDIR): this location is suitable for transient\nservices created at runtime by systemd generators (see systemd.generator(7)), session\nmanagers or other session infrastructure. It is an extension provided by the reference\nimplementation of dbus-daemon, and is not standardized in the D-Bus Specification.\n\nUnlike the other standard session service directories, this directory enforces strict\nnaming for the service files: the filename must be exactly the well-known bus name of the\nservice, followed by \".service\".\n\nAlso unlike the other standard session service directories, this directory is never\nmonitored with inotify(7) or similar APIs. Programs that create service files in this\ndirectory while a dbus-daemon is running are expected to call the dbus-daemon's\nReloadConfig() method after they have made changes.\n\n•   $XDGDATAHOME/dbus-1/services, where XDGDATAHOME defaults to ~/.local/share (see the\nXDG Base Directory Specification): this location is specified by the D-Bus Specification,\nand is suitable for per-user, locally-installed software.\n\n•   directory/dbus-1/services for each directory in XDGDATADIRS, where XDGDATADIRS\ndefaults to /usr/local/share:/usr/share (see the XDG Base Directory Specification): these\nlocations are specified by the D-Bus Specification. The defaults are suitable for\nsoftware installed locally by a system administrator (/usr/local/share) or for software\ninstalled from operating system packages (/usr/share). Per-user or system-wide\nconfiguration that sets the XDGDATADIRS environment variable can extend this search\npath to cover installations in other locations, for example\n~/.local/share/flatpak/exports/share/ and /var/lib/flatpak/exports/share/ when flatpak(1)\nis used.\n\n•   ${datadir}/dbus-1/services for the ${datadir} that was specified when dbus was compiled,\ntypically /usr/share: this location is an extension provided by the reference dbus-daemon\nimplementation, and is suitable for software stacks installed alongside dbus-daemon.\n\nThe \"XDG Base Directory Specification\" can be found at\nhttp://freedesktop.org/wiki/Standards/basedir-spec if it hasn't moved, otherwise try your\nfavorite search engine.\n\nOn Windows, the standard session service directories are:\n\n•   %CommonProgramFiles%/dbus-1/services if %CommonProgramFiles% is set: this location is\nsuitable for system-wide installed software packages\n\n•   A share/dbus-1/services directory found in the same directory hierarchy (prefix) as the\ndbus-daemon: this location is suitable for software stacks installed alongside\ndbus-daemon\n\nThe <standardsessionservicedirs/> option is only relevant to the per-user-session bus\ndaemon defined in /etc/dbus-1/session.conf. Putting it in any other configuration file would\nprobably be nonsense.\n\n•   <standardsystemservicedirs/>\n\n<standardsystemservicedirs/> specifies the standard system-wide activation directories that\nshould be searched for service files. As with session services, the first directory listed\nhas highest precedence.\n\nOn Unix, the standard session service directories are:\n\n•   /usr/local/share/dbus-1/system-services: this location is specified by the D-Bus\nSpecification, and is suitable for software installed locally by the system administrator\n\n•   /usr/share/dbus-1/system-services: this location is specified by the D-Bus Specification,\nand is suitable for software installed by operating system packages\n\n•   ${datadir}/dbus-1/system-services for the ${datadir} that was specified when dbus was\ncompiled, typically /usr/share: this location is an extension provided by the reference\ndbus-daemon implementation, and is suitable for software stacks installed alongside\ndbus-daemon\n\n•   /lib/dbus-1/system-services: this location is specified by the D-Bus Specification, and\nwas intended for software installed by operating system packages and used during early\nboot (but it should be considered deprecated, because the reference dbus-daemon is not\ndesigned to be available during early boot)\n\nOn Windows, there is no standard system bus, so there are no standard system bus directories\neither.\n\nThe <standardsystemservicedirs/> option is only relevant to the per-system bus daemon\ndefined in /usr/share/dbus-1/system.conf. Putting it in any other configuration file would\nprobably be nonsense.\n\n•   <servicehelper/>\n\n<servicehelper/> specifies the setuid helper that is used to launch system daemons with an\nalternate user. Typically this should be the dbus-daemon-launch-helper executable in located\nin libexec.\n\nThe <servicehelper/> option is only relevant to the per-system bus daemon defined in\n/usr/share/dbus-1/system.conf. Putting it in any other configuration file would probably be\nnonsense.\n\n•   <limit>\n\n<limit> establishes a resource limit. For example:\n\n<limit name=\"maxmessagesize\">64</limit>\n<limit name=\"maxcompletedconnections\">512</limit>\n\nThe name attribute is mandatory. Available limit names are:\n\n\"maxincomingbytes\"         : total size in bytes of messages\nincoming from a single connection\n\"maxincomingunixfds\"      : total number of unix fds of messages\nincoming from a single connection\n\"maxoutgoingbytes\"         : total size in bytes of messages\nqueued up for a single connection\n\"maxoutgoingunixfds\"      : total number of unix fds of messages\nqueued up for a single connection\n\"maxmessagesize\"           : max size of a single message in\nbytes\n\"maxmessageunixfds\"       : max unix fds of a single message\n\"servicestarttimeout\"      : milliseconds (thousandths) until\na started service has to connect\n\"authtimeout\"               : milliseconds (thousandths) a\nconnection is given to\nauthenticate\n\"pendingfdtimeout\"         : milliseconds (thousandths) a\nfd is given to be transmitted to\ndbus-daemon before disconnecting the\nconnection\n\"maxcompletedconnections\"  : max number of authenticated connections\n\"maxincompleteconnections\" : max number of unauthenticated\nconnections\n\"maxconnectionsperuser\"   : max number of completed connections from\nthe same user\n\"maxpendingservicestarts\" : max number of service launches in\nprogress at the same time\n\"maxnamesperconnection\"   : max number of names a single\nconnection can own\n\"maxmatchrulesperconnection\": max number of match rules for a single\nconnection\n\"maxrepliesperconnection\" : max number of pending method\nreplies per connection\n(number of calls-in-progress)\n\"replytimeout\"              : milliseconds (thousandths)\nuntil a method call times out\n\nThe max incoming/outgoing queue sizes allow a new message to be queued if one byte remains\nbelow the max. So you can in fact exceed the max by maxmessagesize.\n\nmaxcompletedconnections divided by maxconnectionsperuser is the number of users that can\nwork together to denial-of-service all other users by using up all connections on the\nsystemwide bus.\n\nLimits are normally only of interest on the systemwide bus, not the user session buses.\n\n•   <policy>\n\nThe <policy> element defines a security policy to be applied to a particular set of\nconnections to the bus. A policy is made up of <allow> and <deny> elements. Policies are\nnormally used with the systemwide bus; they are analogous to a firewall in that they allow\nexpected traffic and prevent unexpected traffic.\n\nCurrently, the system bus has a default-deny policy for sending method calls and owning bus\nnames, and a default-allow policy for receiving messages, sending signals, and sending a\nsingle success or error reply for each method call that does not have the NOREPLY flag.\nSending more than the expected number of replies is not allowed.\n\nIn general, it is best to keep system services as small, targeted programs which run in their\nown process and provide a single bus name. Then, all that is needed is an <allow> rule for\nthe \"own\" permission to let the process claim the bus name, and a \"senddestination\" rule to\nallow traffic from some or all uids to your service.\n\nThe <policy> element has one of four attributes:\n\ncontext=\"(default|mandatory)\"\natconsole=\"(true|false)\"\nuser=\"username or userid\"\ngroup=\"group name or gid\"\n\nPolicies are applied to a connection as follows:\n\n- all context=\"default\" policies are applied\n- all group=\"connection's user's group\" policies are applied\nin undefined order\n- all user=\"connection's auth user\" policies are applied\nin undefined order\n- all atconsole=\"true\" policies are applied\n- all atconsole=\"false\" policies are applied\n- all context=\"mandatory\" policies are applied\n\nPolicies applied later will override those applied earlier, when the policies overlap.\nMultiple policies with the same user/group/context are applied in the order they appear in\nthe config file.\n\n<deny>\n<allow>\n\nA <deny> element appears below a <policy> element and prohibits some action. The <allow>\nelement makes an exception to previous <deny> statements, and works just like <deny> but with\nthe inverse meaning.\n\nThe possible attributes of these elements are:\n\nsendinterface=\"interfacename\" | \"*\"\nsendmember=\"methodorsignalname\" | \"*\"\nsenderror=\"errorname\" | \"*\"\nsendbroadcast=\"true\" | \"false\"\nsenddestination=\"name\" | \"*\"\nsendtype=\"methodcall\" | \"methodreturn\" | \"signal\" | \"error\" | \"*\"\nsendpath=\"/path/name\" | \"*\"\n\nreceiveinterface=\"interfacename\" | \"*\"\nreceivemember=\"methodorsignalname\" | \"*\"\nreceiveerror=\"errorname\" | \"*\"\nreceivesender=\"name\" | \"*\"\nreceivetype=\"methodcall\" | \"methodreturn\" | \"signal\" | \"error\" | \"*\"\nreceivepath=\"/path/name\" | \"*\"\n\nsendrequestedreply=\"true\" | \"false\"\nreceiverequestedreply=\"true\" | \"false\"\n\neavesdrop=\"true\" | \"false\"\n\nown=\"name\" | \"*\"\nownprefix=\"name\"\nuser=\"username\" | \"*\"\ngroup=\"groupname\" | \"*\"\n\nExamples:\n\n<deny senddestination=\"org.freedesktop.Service\" sendinterface=\"org.freedesktop.System\" sendmember=\"Reboot\"/>\n<deny senddestination=\"org.freedesktop.System\"/>\n<deny receivesender=\"org.freedesktop.System\"/>\n<deny user=\"john\"/>\n<deny group=\"enemies\"/>\n\nThe <deny> element's attributes determine whether the deny \"matches\" a particular action. If\nit matches, the action is denied (unless later rules in the config file allow it).\n\nRules with one or more of the send* family of attributes are checked in order when a\nconnection attempts to send a message. The last rule that matches the message determines\nwhether it may be sent. The well-known session bus normally allows sending any message. The\nwell-known system bus normally allows sending any signal, selected method calls to the\ndbus-daemon, and exactly one reply to each previously-sent method call (either success or an\nerror). Either of these can be overridden by configuration; on the system bus, services that\nwill receive method calls must install configuration that allows them to do so, usually via\nrules of the form <policy context=\"default\"><allow senddestination=\"...\"/><policy>.\n\nRules with one or more of the receive* family of attributes, or with the eavesdrop attribute\nand no others, are checked for each recipient of a message (there might be more than one\nrecipient if the message is a broadcast or a connection is eavesdropping). The last rule that\nmatches the message determines whether it may be received. The well-known session bus\nnormally allows receiving any message, including eavesdropping. The well-known system bus\nnormally allows receiving any message that was not eavesdropped (any unicast message\naddressed to the recipient, and any broadcast message).\n\nThe eavesdrop, minfds and maxfds attributes are modifiers that can be applied to either\nsend* or receive* rules, and are documented below.\n\nsenddestination and receivesender rules mean that messages may not be sent to or received\nfrom the *owner* of the given name, not that they may not be sent *to that name*. That is, if\na connection owns services A, B, C, and sending to A is denied, sending to B or C will not\nwork either. As a special case, senddestination=\"*\" matches any message (whether it has a\ndestination specified or not), and receivesender=\"*\" similarly matches any message.\n\nRules with sendbroadcast=\"true\" match signal messages with no destination (broadcasts).\nRules with sendbroadcast=\"false\" are the inverse: they match any unicast destination\n(unicast signals, together with all method calls, replies and errors) but do not match\nmessages with no destination (broadcasts). This is not the same as senddestination=\"*\",\nwhich matches any sent message, regardless of whether it has a destination or not.\n\nThe other send* and receive* attributes are purely textual/by-value matches against the\ngiven field in the message header, except that for the attributes where it is allowed, *\nmatches any message (whether it has the relevant header field or not). For example,\nsendinterface=\"*\" matches any sent message, even if it does not contain an interface header\nfield. More complex glob matching such as foo.bar.*  is not allowed.\n\n\"Eavesdropping\" occurs when an application receives a message that was explicitly addressed\nto a name the application does not own, or is a reply to such a message. Eavesdropping thus\nonly applies to messages that are addressed to services and replies to such messages (i.e. it\ndoes not apply to signals).\n\nFor <allow>, eavesdrop=\"true\" indicates that the rule matches even when eavesdropping.\neavesdrop=\"false\" is the default and means that the rule only allows messages to go to their\nspecified recipient. For <deny>, eavesdrop=\"true\" indicates that the rule matches only when\neavesdropping. eavesdrop=\"false\" is the default for <deny> also, but here it means that the\nrule applies always, even when not eavesdropping. The eavesdrop attribute can only be\ncombined with send and receive rules (with send* and receive* attributes).\n\nThe [send|receive]requestedreply attribute works similarly to the eavesdrop attribute. It\ncontrols whether the <deny> or <allow> matches a reply that is expected (corresponds to a\nprevious method call message). This attribute only makes sense for reply messages (errors and\nmethod returns), and is ignored for other message types.\n\nFor <allow>, [send|receive]requestedreply=\"true\" is the default and indicates that only\nrequested replies are allowed by the rule. [send|receive]requestedreply=\"false\" means that\nthe rule allows any reply even if unexpected.\n\nFor <deny>, [send|receive]requestedreply=\"false\" is the default but indicates that the rule\nmatches only when the reply was not requested. [send|receive]requestedreply=\"true\"\nindicates that the rule applies always, regardless of pending reply state.\n\nThe minfds and maxfds attributes modify either send* or receive* rules. A rule with the\nminfds attribute only matches messages if they have at least that many Unix file descriptors\nattached. Conversely, a rule with the maxfds attribute only matches messages if they have no\nmore than that many file descriptors attached. In practice, rules with these attributes will\nmost commonly take the form <allow senddestination=\"...\" maxfds=\"0\"/>, <deny\nsenddestination=\"...\" minfds=\"1\"/> or <deny receivesender=\"*\" minfds=\"1\"/>.\n\nRules with the user or group attribute are checked when a new connection to the message bus\nis established, and control whether the connection can continue. Each of these attributes\ncannot be combined with any other attribute. As a special case, both user=\"*\" and group=\"*\"\nmatch any connection. If there are no rules of this form, the default is to allow connections\nfrom the same user ID that owns the dbus-daemon process. The well-known session bus normally\nuses that default behaviour, while the well-known system bus normally allows any connection.\n\nRules with the own or ownprefix attribute are checked when a connection attempts to own a\nwell-known bus names. As a special case, own=\"*\" matches any well-known bus name. The\nwell-known session bus normally allows any connection to own any name, while the well-known\nsystem bus normally does not allow any connection to own any name, except where allowed by\nfurther configuration. System services that will own a name must install configuration that\nallows them to do so, usually via rules of the form <policy user=\"some-system-user\"><allow\nown=\"...\"/></policy>.\n\n<allow ownprefix=\"a.b\"/> allows you to own the name \"a.b\" or any name whose first\ndot-separated elements are \"a.b\": in particular, you can own \"a.b.c\" or \"a.b.c.d\", but not\n\"a.bc\" or \"a.c\". This is useful when services like Telepathy and ReserveDevice define a\nmeaning for subtrees of well-known names, such as\norg.freedesktop.Telepathy.ConnectionManager.(anything) and\norg.freedesktop.ReserveDevice1.(anything).\n\nIt does not make sense to deny a user or group inside a <policy> for a user or group;\nuser/group denials can only be inside context=\"default\" or context=\"mandatory\" policies.\n\nA single <deny> rule may specify combinations of attributes such as senddestination and\nsendinterface and sendtype. In this case, the denial applies only if both attributes match\nthe message being denied. e.g. <deny sendinterface=\"foo.bar\" senddestination=\"foo.blah\"/>\nwould deny messages with the given interface AND the given bus name. To get an OR effect you\nspecify multiple <deny> rules.\n\nYou can't include both send and receive attributes on the same rule, since \"whether the\nmessage can be sent\" and \"whether it can be received\" are evaluated separately.\n\nBe careful with sendinterface/receiveinterface, because the interface field in messages is\noptional. In particular, do NOT specify <deny sendinterface=\"org.foo.Bar\"/>! This will cause\nno-interface messages to be blocked for all services, which is almost certainly not what you\nintended. Always use rules of the form: <deny sendinterface=\"org.foo.Bar\"\nsenddestination=\"org.foo.Service\"/>\n\n•   <selinux>\n\nThe <selinux> element contains settings related to Security Enhanced Linux. More details\nbelow.\n\n•   <associate>\n\nAn <associate> element appears below an <selinux> element and creates a mapping. Right now\nonly one kind of association is possible:\n\n<associate own=\"org.freedesktop.Foobar\" context=\"foot\"/>\n\nThis means that if a connection asks to own the name \"org.freedesktop.Foobar\" then the source\ncontext will be the context of the connection and the target context will be \"foot\" - see\nthe short discussion of SELinux below.\n\nNote, the context here is the target context when requesting a name, NOT the context of the\nconnection owning the name.\n\nThere's currently no way to set a default for owning any name, if we add this syntax it will\nlook like:\n\n<associate own=\"*\" context=\"foot\"/>\n\nIf you find a reason this is useful, let the developers know. Right now the default will be\nthe security context of the bus itself.\n\nIf two <associate> elements specify the same name, the element appearing later in the\nconfiguration file will be used.\n\n•   <apparmor>\n\nThe <apparmor> element is used to configure AppArmor mediation on the bus. It can contain one\nattribute that specifies the mediation mode:\n\n<apparmor mode=\"(enabled|disabled|required)\"/>\n\nThe default mode is \"enabled\". In \"enabled\" mode, AppArmor mediation will be performed if\nAppArmor support is available in the kernel. If it is not available, dbus-daemon will start\nbut AppArmor mediation will not occur. In \"disabled\" mode, AppArmor mediation is disabled. In\n\"required\" mode, AppArmor mediation will be enabled if AppArmor support is available,\notherwise dbus-daemon will refuse to start.\n\nThe AppArmor mediation mode of the bus cannot be changed after the bus starts. Modifying the\nmode in the configuration file and sending a SIGHUP signal to the daemon has no effect on the\nmediation mode.\n",
            "subsections": []
        },
        "SELINUX": {
            "content": "See http://www.nsa.gov/selinux/ for full details on SELinux. Some useful excerpts:\n\nEvery subject (process) and object (e.g. file, socket, IPC object, etc) in the system is\nassigned a collection of security attributes, known as a security context. A security context\ncontains all of the security attributes associated with a particular subject or object that\nare relevant to the security policy.\n\nIn order to better encapsulate security contexts and to provide greater efficiency, the\npolicy enforcement code of SELinux typically handles security identifiers (SIDs) rather than\nsecurity contexts. A SID is an integer that is mapped by the security server to a security\ncontext at runtime.\n\nWhen a security decision is required, the policy enforcement code passes a pair of SIDs\n(typically the SID of a subject and the SID of an object, but sometimes a pair of subject\nSIDs or a pair of object SIDs), and an object security class to the security server. The\nobject security class indicates the kind of object, e.g. a process, a regular file, a\ndirectory, a TCP socket, etc.\n\nAccess decisions specify whether or not a permission is granted for a given pair of SIDs and\nclass. Each object class has a set of associated permissions defined to control operations on\nobjects with that class.\n\nD-Bus performs SELinux security checks in two places.\n\nFirst, any time a message is routed from one connection to another connection, the bus daemon\nwill check permissions with the security context of the first connection as source, security\ncontext of the second connection as target, object class \"dbus\" and requested permission\n\"sendmsg\".\n\nIf a security context is not available for a connection (impossible when using UNIX domain\nsockets), then the target context used is the context of the bus daemon itself. There is\ncurrently no way to change this default, because we're assuming that only UNIX domain sockets\nwill be used to connect to the systemwide bus. If this changes, we'll probably add a way to\nset the default connection context.\n\nSecond, any time a connection asks to own a name, the bus daemon will check permissions with\nthe security context of the connection as source, the security context specified for the name\nin the config file as target, object class \"dbus\" and requested permission \"acquiresvc\".\n\nThe security context for a bus name is specified with the <associate> element described\nearlier in this document. If a name has no security context associated in the configuration\nfile, the security context of the bus daemon itself will be used.\n",
            "subsections": []
        },
        "APPARMOR": {
            "content": "The AppArmor confinement context is stored when applications connect to the bus. The\nconfinement context consists of a label and a confinement mode. When a security decision is\nrequired, the daemon uses the confinement context to query the AppArmor policy to determine\nif the action should be allowed or denied and if the action should be audited.\n\nThe daemon performs AppArmor security checks in three places.\n\nFirst, any time a message is routed from one connection to another connection, the bus daemon\nwill check permissions with the label of the first connection as source, label and/or\nconnection name of the second connection as target, along with the bus name, the path name,\nthe interface name, and the member name. Reply messages, such as methodreturn and error\nmessages, are implicitly allowed if they are in response to a message that has already been\nallowed.\n\nSecond, any time a connection asks to own a name, the bus daemon will check permissions with\nthe label of the connection as source, the requested name as target, along with the bus name.\n\nThird, any time a connection attempts to eavesdrop, the bus daemon will check permissions\nwith the label of the connection as the source, along with the bus name.\n\nAppArmor rules for bus mediation are not stored in the bus configuration files. They are\nstored in the application's AppArmor profile. Please see apparmor.d(5) for more details.\n",
            "subsections": []
        },
        "DEBUGGING": {
            "content": "If you're trying to figure out where your messages are going or why you aren't getting\nmessages, there are several things you can try.\n\nRemember that the system bus is heavily locked down and if you haven't installed a security\npolicy file to allow your message through, it won't work. For the session bus, this is not a\nconcern.\n\nThe simplest way to figure out what's happening on the bus is to run the dbus-monitor\nprogram, which comes with the D-Bus package. You can also send test messages with dbus-send.\nThese programs have their own man pages.\n\nIf you want to know what the daemon itself is doing, you might consider running a separate\ncopy of the daemon to test against. This will allow you to put the daemon under a debugger,\nor run it with verbose output, without messing up your real session and system daemons.\n\nTo run a separate test copy of the daemon, for example you might open a terminal and type:\n\nDBUSVERBOSE=1 dbus-daemon --session --print-address\n\nThe test daemon address will be printed when the daemon starts. You will need to\ncopy-and-paste this address and use it as the value of the DBUSSESSIONBUSADDRESS\nenvironment variable when you launch the applications you want to test. This will cause those\napplications to connect to your test bus instead of the DBUSSESSIONBUSADDRESS of your real\nsession bus.\n\nDBUSVERBOSE=1 will have NO EFFECT unless your copy of D-Bus was compiled with verbose mode\nenabled. This is not recommended in production builds due to performance impact. You may need\nto rebuild D-Bus if your copy was not built with debugging in mind. (DBUSVERBOSE also\naffects the D-Bus library and thus applications using D-Bus; it may be useful to see verbose\noutput on both the client side and from the daemon.)\n\nIf you want to get fancy, you can create a custom bus configuration for your test bus (see\nthe session.conf and system.conf files that define the two default configurations for\nexample). This would allow you to specify a different directory for .service files, for\nexample.\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "See http://www.freedesktop.org/software/dbus/doc/AUTHORS\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Please send bug reports to the D-Bus mailing list or bug tracker, see",
            "subsections": [
                {
                    "name": "http://www.freedesktop.org/software/dbus/",
                    "content": ""
                }
            ]
        },
        "NOTES": {
            "content": "1. relay connections via Secure Shell or a similar protocol\nhttps://lists.freedesktop.org/archives/dbus/2018-April/017447.html\n\n\n\nD-Bus 1.12.20                                                                         DBUS-DAEMON(1)",
            "subsections": []
        }
    },
    "summary": "dbus-daemon - Message bus daemon",
    "flags": [
        {
            "flag": "",
            "long": "--config-file",
            "arg": "FILE",
            "description": "Use the given configuration file."
        },
        {
            "flag": "",
            "long": "--fork",
            "arg": null,
            "description": "Force the message bus to fork and become a daemon, even if the configuration file does not specify that it should. In most contexts the configuration file already gets this right, though. This option is not supported on Windows."
        },
        {
            "flag": "",
            "long": "--nofork",
            "arg": null,
            "description": "Force the message bus not to fork and become a daemon, even if the configuration file specifies that it should. On Windows, the dbus-daemon never forks, so this option is allowed but does nothing."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Print the address of the message bus to standard output, or to the given file descriptor. This is used by programs that launch the message bus."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Print the process ID of the message bus to standard output, or to the given file descriptor. This is used by programs that launch the message bus."
        },
        {
            "flag": "",
            "long": "--session",
            "arg": null,
            "description": "Use the standard configuration file for the per-login-session message bus."
        },
        {
            "flag": "",
            "long": "--system",
            "arg": null,
            "description": "Use the standard configuration file for the systemwide message bus."
        },
        {
            "flag": "",
            "long": "--version",
            "arg": null,
            "description": "Print the version of the daemon."
        },
        {
            "flag": "",
            "long": "--introspect",
            "arg": null,
            "description": "Print the introspection information for all D-Bus internal interfaces."
        },
        {
            "flag": "",
            "long": null,
            "arg": null,
            "description": "Set the address to listen on. This option overrides the address configured in the configuration file via the <listen> directive. See the documentation of that directive for more details."
        },
        {
            "flag": "",
            "long": "--systemd-activation",
            "arg": null,
            "description": "Enable systemd-style service activation. Only useful in conjunction with the systemd system and session manager on Linux."
        },
        {
            "flag": "",
            "long": "--nopidfile",
            "arg": null,
            "description": "Don't write a PID file even if one is configured in the configuration files."
        },
        {
            "flag": "",
            "long": "--syslog",
            "arg": null,
            "description": "Force the message bus to use the system log for messages, in addition to writing to standard error, even if the configuration file does not specify that it should. On Unix, this uses the syslog; on Windows, this uses OutputDebugString()."
        },
        {
            "flag": "",
            "long": "--syslog-only",
            "arg": null,
            "description": "Force the message bus to use the system log for messages, and not duplicate them to standard error. On Unix, this uses the syslog; on Windows, this uses OutputDebugString()."
        },
        {
            "flag": "",
            "long": "--nosyslog",
            "arg": null,
            "description": "Force the message bus to use only standard error for messages, even if the configuration file specifies that it should use the system log."
        }
    ],
    "examples": [],
    "see_also": []
}