From 7220a76be0c0cadcca50ad4a23122fbbd72cf629 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 22 Feb 2019 15:22:20 +0100 Subject: doc/plugins.rst: document udisks2/policykit rule --- doc/plugins.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 `. +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 -- cgit v1.2.3