Menu
MPD (music player daemon) is an audio player that has a server-client architecture. It plays audio files, organizes playlists and maintains a music database, all while using very few resources. In order to interface with it, a separate client is needed.
Play On Linux came before Lutris, and it offers many of the same features. Play On Linux is bare-bones and doesn't include support for Linux games. It takes a general approach, so you may find better office application support here, even though it's probably not as good as something like Crossover. Install Play On Linux. On Ubuntu, Debian,. # dnf install spotify-client Accept when it asks about the install and when it asks about GPG keys. The install will take some time because it needs to download Spotify as a large binary. Run Spotify Now, you can run Spotify! Just search for it in GNOME, and it'll be there with its own Linux-friendly icon and all. Although Spotify is available on Linux, it does not support the feature that other platforms have where it is possible to send the Spotify app to the system tray, out of sight. Sadly, the Spotify developers haven’t added this feature to the Linux version of the app, and there’s no way of knowing if it will ever come.
Installation
Install the mpd package, or mpd-gitAUR for the development version.
Configuration
MPD is able to run in #Per-user configuration or #System-wide configuration mode (settings apply to all users). Also it is possible to run multiple instances of MPD in a #Multi-MPD setup.The way of setting up MPD depends on the way it is intended to be used: a local per-user configuration is easier to setup and may prove more adapted on a desktop system. The system-wide setup might be better suited for a always-on audio server with multiple users but a shared MPD instance.
In order for MPD to be able to playback audio, ALSA, optionally with PulseAudio, must be setup and working. The #Audio configuration section thereafter describes the parameters needed for ALSA or PulseAudio.
MPD is configured in the file mpd.conf(5) which can be located in various paths depending on the setup chosen (system-wide or per-user). In short, the two common locations used are:
These are some of the most commonly used configuration options:
Per-user configuration
MPD can be configured per-user. Running it as a normal user has the benefits of:
Configure the location of files and directories
In user mode, the configuration is read from
$XDG_CONFIG_HOME/mpd/mpd.conf .We will assume here $XDG_CONFIG_HOME equals the default of ~/.config .
To build the user configuration, the MPD configuration example included in the package is a good starting point, copy it using the following lines:
A 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. The user must have read write access to this directory.
Then edit the configuration file in order to specify the required and optional files and directories: Download spotify iphone free.
If playlists are enabled in the configuration, the specified playlist directory must be created:
MPD can now be started (an optional custom location for the configuration file can be specified):
In order to build the database file, MPD must scan into the
music_directory defined above. To request this task, one of the MPD clients must be used. For example with mpc the command is:
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 .
Audio configuration
If ALSA is used, autodetection https://bullrenew988.weebly.com/blog/connect-mac-spotify-to-google-home-speaker. of the default device should work out of the box without any particular setting. If not, the syntax for ALSA audio output definition is provided thereafter; the required
name parameter specifies a unique name for the audio output.The exact device as displayed using aplay --list-pcm from the package alsa-utils can optionally be indicated with the device option.
Users of PulseAudio will need to make the following modification:
Autostart with systemd
The mpd package provides a user service file. 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.
start/enable the user unit
mpd.service (i.e. with the --user flag).
Note: The configuration file is read from
~/.config/mpd/mpd.conf , see systemd#Editing provided units if you would like to indicate a custom configuration file path.
Autostart on tty login
To start MPD on login add the following to
~/.profile or another autostart file:
Scripted configuration
The following tool provides assistance for MPD configuration:
System-wide configuration
Note: Users of PulseAudio with a system-wide MPD configuration have to implement a workaround in order to run MPD as its own user!
The default
/etc/mpd.conf keeps the setup in /var/lib/mpd which is assigned to user as well as primary group MPD.
Music directory
The music directory is defined by the option
music_directory in the configuration file /etc/mpd.conf .
MPD needs to have execute permission on all parent directories of the music collection and also read access to all directories containing music files. This may conflict with the default configuration of the user directory, like
~/Music , where the music is stored.
While there are several solutions to this issue, one of these should be most practical:
The MPD configuration file must define only one music directory. If the music collection is contained under multiple directories, create symbolic links under the main music directory in
/var/lib/mpd . Remember to set permissions accordingly on the directories being linked.
Start with systemd
MPD can be controlled with
mpd.service using systemd. The first startup can take some time as MPD will scan your music directory.
Test everything by starting a client application (ncmpc is a light and easy to use client), and play some music!
Socket activation
mpd provides a
mpd.socket unit. If mpd.socket is enabled (and mpd.service is disabled), systemd will not start MPD immediately, it will just listen to the appropriate sockets. Then, whenever an MPD client attempts to connect to one of these sockets, systemd will start mpd.service and transparently hand over control of these ports to the MPD process.
If you prefer to listen to different UNIX sockets or network ports (even multiple sockets of each type), or if you prefer not to listen to network ports at all, edit the
mpd.socket unit appropriately and modify /etc/mpd.conf to match the configuration (see mpd.conf(5) for details).
User id startup workflow
MPD should never run as root, you may use the
user option in the configuration to make MPD change its user id after initialization. Do not use this option if you start MPD as an unprivileged user.To describe how MPD drops its superuser privileges and switch to those of the user set in the configuration, the steps of a normal MPD startup are listed thereafter:
Multi-MPD setupRunning an Icecast server
For a second MPD (e.g. with Icecast output to share music over the network) using the same music and playlist as the one above, simply copy the above configuration file and make a new file (e.g.,
/home/username/.mpd/config-icecast ), and only change the log_file , error_file , pid_file , and state_file parameters (e.g. mpd-icecast.log , mpd-icecast.error , and so on). Using the same directory paths for the music and playlist directories would ensure that this second MPD uses the same music collection as the first one, e.g. creating and editing a playlist under the first daemon would affect the second daemon as well. Users do not have to create the same playlists all over again for the second daemon. Call this second daemon the same way from ~/.xinitrc above - but be sure to have a different port number, avoiding a conflict with the first MPD daemon.
Satellite setup
The method described in #Running an Icecast server works, but at least in theory could lead to issues with the database, when both MPD instances try to write to the same database file concurrently. MPD has a satellite mode where one instance can receive the database from an already running MPD instance.
In your
config-icecast add this, where host and port reflect your primary MPD server:
Clients
A separate client is needed to control MPD. See a long list of clients at the mpd website. Popular options are:
Command-line
Console
Graphical
![]()
Spotify Linux Arch
See also
Retrieved from 'https://wiki.archlinux.org/index.php?title=Music_Player_Daemon&oldid=635985'
Spotify is a free music streaming service. With Spotify, you can listen to millions of songs for free. In this article, I will show you how to install and use Spotify app on Arch Linux 2018. Let’s get started.
Installing Spotify on Arch Linux:
Spotify is not available in the official package repository of Arch Linux. The official Spotify app can be directly installed through apt package manager on Ubuntu/Debian based operating systems only. For other operating systems like Arch, Spotify is distributed as a snap package.
Arch removed snapd package from its official repository. But it’s still available as a AUR (Arch User Repository) package. Before you can install Spotify app, you must install snapd package from AUR.
To install packages from AUR, Git is required.
First install Git version control system with the following command:
Press ‘y’ and then press <Enter> to continue.
Git should be installed.
Now navigate to any directory. It can be a temporary directory like /tmp as well. I will navigate to the ~/Downloads directory on my user’s home directory.
Now clone the snapd AUR repository with Git with the following command:
snapd AUR Git repository should be cloned.
A new directory snapd/ should be created.
Navigate to the newly created snapd/ directory with the following command:
Now you have to make a pacman package using snapd AUR repository. A utility makepkg is provided by default for this purpose.
To make a pacman package of snapd AUR repository, run the following command:
Press ‘y’ and press <Enter> to continue.
Press ‘y’ and press <Enter> again.
The snapd pacman package compilation process should continue.
The snapd pacman package compilation process.
The snapd package has been compiled for pacman at this point.
By Listing the directory contents with ls command, you should be able to see the following .tar.xz file as marked in the screenshot below. This is the file that you have to install using pacman package manager.
To install the snapd .tar.xz package using pacman, run the following command:
Note that the file name may change by the time you read this article.
Press ‘y’ and then press <Enter> to continue.
snapd should be installed.
Now you add snapd service to the startup of Arch Linux. So it will start automatically when your computer boots.
To add snapd service to the startup, run the following command:
As you can see from the following screenshot, snapd service is added to the startup.
Now restart your computer with the following command:
Once your computer boots, run the following command to check whether snap and snapd is working:
As you can see from the screenshot below, snap and snapd are both working correctly and the version installed as of this writing is 2.30. If you forgot to enable snapd service, then you should see some errors here.
Now you can install Spotify as snap package with the following command:
Spotify should be installed.
Once Spotify is installed, you should be able to find Spotify in the Application Menu as shown in the screenshot below.
Arch Install Spotify
Click on the Spotify.
Spotify should start as shown in the screenshot below.
If you don’t have a Spotify account, you can create one by clicking on the ‘SIGN UP’ button as marked in the screenshot below.
You can also login to Spotify using your Facebook account.
Using Spotify:
In this section, I will show you how to use Spotify.
New spotify deezer download. Once you login to Spotify through the app, it should look like as shown in the screenshot below.
You can search for a music through the search bar as marked in the screenshot below.
For example, I searched for avril I love you music and as you can see from the screenshot below that song is found.
Arch Linux Spotify App Download
Now click on the result.
The album where the song belongs to should be opened.
You should be able to find the song you are looking for in the list. You may need to scroll down a little bit if the list is long. Once you find what you are looking for, you can hover over the song and click on the play button as shown in the screenshot below.
The song should be playing as you can see from the screenshot below.
You can click on the plus icon to add the song to the Library.
Once the song is added to the library, you should see a tick mark icon as marked in the screenshot below.
Once you add a song to the Library, you can click on the Songs Library and find the song you added as marked in the screenshot below.
You can also add the whole Album to the Library. Just click on the Save button as marked in the screenshot below.
The Album should be saved to the Library.
You can click on the Albums Library and you should be able to find the Album you just added as marked in the screenshot below.
You can also create a new playlist in Spotify where you can add all your desired songs. To create a new Playlist, just click on the marked button as shown in the screenshot below.
You should see the following window. Here you can type in a name for your Playlist, a short description and also pick an image as marked in the screenshot below.
Once you’re done, click on Create and your playlist should be created.
Now you can click on the marked icon as shown in the screenshot below.
And add your music to the playlist.
There are a lot more things you can do with Spotify app. But it’s out of the scope of this article.
Anyway, that’s how you install and use Spotify on Arch Linux 2018. Thanks for reading this article.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |