X-Git-Url: https://git.kaliko.me/?a=blobdiff_plain;f=doc%2Fsource%2Fuse.rst;h=f01fd398f0dc2937a2ca99b93393d64a4839f702;hb=3bd852de4b5209ad94f248448c5cb274c50a546e;hp=a213247adaf4c7004d207b5acbeb56ad964dc1fb;hpb=e645adfa14a04168a4d8a892e88569205f868c84;p=python-musicpd.git diff --git a/doc/source/use.rst b/doc/source/use.rst index a213247..f01fd39 100644 --- a/doc/source/use.rst +++ b/doc/source/use.rst @@ -24,6 +24,28 @@ them), and the functions used to parse their responses see :ref:`commands`. See the `MPD protocol documentation`_ for more details. +Environment variables +--------------------- + +The client honors the following environment variables: + + * ``MPD_HOST`` MPD host (:abbr:`FQDN (fully qualified domain name)`, socket path or abstract socket) and password. + + | To define a password set MPD_HOST to "`password@host`" (password only "`password@`") + | For abstract socket use "@" as prefix : "`@socket`" and then with a password "`pass@@socket`" + | Regular unix socket are set with an absolute path: "`/run/mpd/socket`" + * ``MPD_PORT`` MPD port, relevant for TCP socket only, ie with :abbr:`FQDN (fully qualified domain name)` defined host + * ``MPD_TIMEOUT`` timeout for connecting to MPD and for waiting for MPD’s response in seconds + * ``XDG_RUNTIME_DIR`` path to look for potential socket: ``${XDG_RUNTIME_DIR}/mpd/socket`` + +Defaults settings +----------------- + + * If ``MPD_HOST`` is not set, then look for a socket in ``${XDG_RUNTIME_DIR}/mpd/socket`` + * If there is no socket use ``localhost`` + * If ``MPD_PORT`` is not set, then use ``6600`` + * If ``MPD_TIMEOUT`` is not set, then uses :py:obj:`musicpd.CONNECTION_TIMEOUT` + Command lists -------------