![]() While there are several solutions to this issue, one of these should be most practical: This may conflict with the default configuration of the user directory, like ~/Music, where the music is stored. MPD needs to have execute permission on all parent directories of the music collection and also read access to all directories containing music files. The music directory is defined by the option music_directory in the configuration file /etc/mpd.conf. The default /etc/mpd.conf keeps the setup in /var/lib/mpd which is assigned to user as well as primary group MPD. Note: Users of PulseAudio with a system-wide MPD configuration have to implement a workaround in order to run MPD as its own user! ![]() Start/enable the user unit mpd.service (i.e. The service starts the process as user, there is no need to change permission nor use the user and group variables in the MPD configuration file. The mpd package provides a user service file. Output with PipeWire can also be configured: Users of PulseAudio will need to make the following modification: The exact device as displayed using aplay -list-pcm from the package alsa-utils can optionally be indicated with the device option. If not, the syntax for ALSA audio output definition is provided thereafter the required name parameter specifies a unique name for the audio output. If ALSA is used, autodetection of the default device should work out of the box without any particular setting. Or alternatively one can set the option auto_update to "yes" in the configuration to refresh the database whenever files are changed in music_directory. To request this task, one of the MPD clients must be used. In order to build the database file, MPD must scan into the music_directory defined above. MPD can now be started (an optional custom location for the configuration file can be specified): If playlists are enabled in the configuration, the specified playlist directory must be created: #sticker_file "~/.config/mpd/sticker.sql" #playlist_directory "~/.config/mpd/playlists" # Uncomment to enable the functionalities # Uncomment to refresh the database whenever files in the music_directory are changed # The music directory is by default the XDG directory, uncomment to amend and choose a different directory # If running mpd using systemd, delete this line to log directly to systemd. ~/.config/mpd/mpd.conf # Recommended location for database Then edit the configuration file in order to specify the required and optional files and directories: The user must have read write access to this directory. $ cp /usr/share/doc/mpd/mpdconf.example ~/.config/mpd/mpd.confĪ good practice is to use this newly created ~/.config/mpd/ directory to store, together with the configuration file, other MPD related files like the database or the playlists. To build the user configuration, the MPD configuration example included in the package is a good starting point, copy it using the following lines: We will assume here $XDG_CONFIG_HOME equals the default of ~/.config. In user mode, the configuration is read from $XDG_CONFIG_HOME/mpd/mpd.conf. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |