summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2019-02-22 15:22:20 +0100
committerMax Kellermann <max@musicpd.org>2019-02-22 15:22:20 +0100
commit7220a76be0c0cadcca50ad4a23122fbbd72cf629 (patch)
treeb5b2463589b68502a7b2b13b618616e408096ddb
parent83f7610dd14b2fbfdbc2bcd1cda269d055e6148c (diff)
doc/plugins.rst: document udisks2/policykit rule
-rw-r--r--doc/plugins.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/plugins.rst b/doc/plugins.rst
index 3b16096d0..060435537 100644
--- a/doc/plugins.rst
+++ b/doc/plugins.rst
@@ -87,6 +87,22 @@ Mount file systems (e.g. USB sticks or other removable media) using
the udisks2 daemon via D-Bus. To obtain a valid udisks2 URI, consult
:ref:`the according neighbor plugin <neighbor_plugin>`.
+It might be necessary to grant :program:`MPD` privileges to control
+:program:`udisks2` through :program:`policykit`. To do this, create a
+file called :file:`/usr/share/polkit-1/rules.d/mpd-udisks.rules` with
+the following text::
+
+ polkit.addRule(function(action, subject) {
+ if ((action.id == "org.freedesktop.udisks2.filesystem-mount" ||
+ action.id == "org.freedesktop.udisks2.filesystem-mount-other-seat") &&
+ subject.user == "mpd") {
+ return polkit.Result.YES;
+ }
+ });
+
+If you run MPD as a different user, change ``mpd`` to the name of your
+MPD user.
+
.. _neighbor_plugin:
Neighbor plugins