Documente Academic
Documente Profesional
Documente Cultură
There are already a lot of nice music players for Linux, from powerhouse players with many
features like Banshee, Rhythmbox, Clementine or Nuvola or lightweight simple music players
like Deadbeef or Quod Libet. However, my favorite is always mpd with ncmpcpp. MPD is an
audio player that has a serverclient architecture. MPD runs in the background as a daemon,
managesplaylistsandamusicdatabase,andusesveryfewresources.Andncmpcppisatext
basedclientforMPDoriginatedfromNcmpc(henceit'scallNcmpcplusplus).Ncmpcpphasan
UIverysimilartoncmpc'sone,butitprovidesnewusefulfeaturessuchassupportforregular
expressions in search engine,ability to sort playlist, local filesystem browser, song lyrics,
extended song format, items filtering, fetching artist's info from last.fm, tag editor, and many
otherminorfunctions.Ncmpcppisverylightweightandeasytouseandhighlycustomizable.
SettingupsmpdwithncmpcppcanbequitechallengingforthosewhoarenewtoLinuxsoIwill
make this guide absolutely newbiefriendly and I guarantee you that will work in every Linux
distro.
1Installingmpd,mpcandncmpcpp
Sincethesepackagesareintherepoofallthepopulardistro,theinstallingprocessisapieceof
cake.
IfyouuseArchLinux,runthefollowingcommand:
sudo pacman -S mpd mpc ncmpcpp
ifyouuseUbuntuorotherDebianbaseddistros,runthiscommand:
sudo apt-get install mpd mpc ncmpcpp
2Configuringmpd
Tomakempdworkwithalocaluser,youneedtocreatea/home/username/.mpdfolderfirst
mkdir .mpd
Thencreateaplaylistsfolder
mkdir -p ~/.mpd/playlists
Thencreatetherequiredfilesthatyouwillneedtoincludeinthempdconfigfile
touch ~/.mpd/{mpd.db,mpd.log,mpd.pid,mpdstate}
Next,youneedtocreatetheconfigfileformpd,usewhatevertexteditoryouprefertocreateit.I
willusevimhere:
vim ~/.mpd/mpd.conf
Ifyouareusingalsaasthesounddevice,hereiswhatyouwillputintothempd.conffile.
music_directory "/your/music/folder"
playlist_directory "/home/username/.mpd/playlists"
db_file
"/home/username/.mpd/mpd.db"
log_file
"/home/username/.mpd/mpd.log"
pid_file
"/home/username/.mpd/mpd.pid"
state_file
"/home/username/.mpd/mpdstate"
audio_output {
type "alsa"
name "whatever name you want"
}
Ifyou'reusingUbuntuorLinuxMint,alsawillbereplacedbypulse,thereforethempd.confwill
belikethat(justchange"alsa"into"pulse"):
music_directory "/your/music/folder"
playlist_directory "/home/username/.mpd/playlists"
db_file
"/home/username/.mpd/mpd.db"
log_file
"/home/username/.mpd/mpd.log"
pid_file
"/home/username/.mpd/mpd.pid"
state_file
"/home/username/.mpd/mpdstate"
audio_output {
type "pulse"
name "whatever name you want"
}
3Configuringncmpcppandrunmpdwithncmpcpp
Tostartmpd,justtype"mpd"intheterminalandmpdwillruninthebackgroundandyoucan
stopmpdbyrunningthecommandmpdkillorpkillmpd.Torunncmpcppformpd,youhaveto
startmpdfirst.HereisasimplescriptIusetostartmpdwithncmpcppinmyarchlinuxmachine(
note:replaceterminatorwithyourpreferedterminalclient)
#!/bin/bash
mpd
terminator -e ncmpcpp
Toconfigurencmpcpp,youneedtocreateaconfigfileforncmpcpp:
vim ~/.ncmpcpp/config
To get ideas about how to customize ncmpcpp, the best place you should visit is this thread
aboutncmpcppconfigsandscreenshotontheArchLinuxforum.
Andhereismyconfigfile,youcancopyitintoyourconfigfileifyoulikeit.Thescreenshotbelow
ishowitlooksinthegnometerminalofLinuxMint12.
Whenyoufirststartncmpcpp,whatyouseeisbutanemptyplaylist.However,youwillseethe
topmenubarshowingyouthedifferentmodesofncmpcpp.Ifyourenewtothekeybindingsor
ncmpcpp,hitF1or1togetintohelppage.Hereisthelistofoptionsofncmpcpp:
Up k
: Move Cursor up
Down j
Page Up
: Home
End
: End
Tab
1 F1
: Help screen
2 F2
: Playlist screen
3 F3
: Browse screen
4 F4
: Search engine
5 F5
: Media library
6 F6
: Playlist editor
7 F7
: Tag editor
0 F10
: Clock screen
Keys - Global
----------------------------------------s
: Stop
: Pause
>
: Next track
<
: Previous track
: Seek forward
: Seek backward
Left -
: Decrease volume
Right +
: Increase volume
: Reverse selection
: Shuffle playlist
: Quit