Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mpd/ncmpcpp setup tutorial - made by an anonymous user on /g/
- ____________________
- --INTRODUCTION--
- Getting mpd with ncmpcpp set up can seem like a daunting task. Seriously, it took me a while before it was firmly rooted into my head that the player is called "ncmpcpp" because it's just so unnatural. Anyway, mpd with ncmpcpp is currently one of the best audio players on *nix. It works on a server/client connection - ncmpcpp works as a front end, or controller, for mpd, that actual music player. Basically, ncmpcpp provides a nice looking, easy to use interface for mpd, the actual music player.
- It is not uncommon for a person new to mpd to think that mpd/ncmpcpp is hard to set up. In reality, most confusion over setting up mpd with ncmpcpp comes from bad explanation - one person may say to do this, another may say to do that, and in the end, the user still does not understand what they are doing and gives up even more confused than they intially were.
- It is because of this that this text file was made as a guide to the setup of mpd and ncmpcpp themselves - this is not about advanced configuration (although this guide does detail the most basic configuration for ncmpcpp), this is about getting it working.
- --SETTING IT UP--
- 1. Install "mpd", "mpc" and "ncmpcpp" from package manager (apt if ubuntu/debian, yum if fedora, etc.)
- 2. Use "sudo mpd" to launch mpd
- *mpd will continue to run unless you use "mpd --kill" or "killall mpd". If you get a message that "address is already in use" when trying to "sudo mpd", this just means that mpd is already running. You don't need to mess with it.
- 3. Go into /etc/mpd.conf (open with text editor of your choice) to set your "music_directory". This is a path, determining where mpd looks to find your music. The default is /var/lib/mpd/music, but you can change it to anything you like, for example, home/yourusername/Music (your "Music" folder on Ubuntu).
- 4. If you are on a modern distro, you probably use pulse audio (Ubuntu users, this means you), but you might use alsa. If you use pulse, make sure your mpd.conf contains these lines, and that they are not commented out with a #:
- audio_output {
- type "pulse"
- name "whatever name you want"
- }
- If you use alsa, instead, use:
- audio_output {
- type "alsa"
- name "whatever name you want"
- 5. You are now ready to use ncmpcpp. Just type in "ncmpcpp" in the terminal, and ncmpcpp is launched. Ncmpcpp contains instructions on how to access your music, which you can get to by pressing "1" on the keyboard. Before you do this, however, you must make sure your music library is updated. To update your library, simply press "u".
- If you want to make sure you have the right audio_output in your mpd.conf file,add an object to your playlist and try to play it. If it plays normally, you have the right audio_output. If it does not play. you can check and see if the problem is the audio_output by going back to the command line (open a new terminal window or press "q") and typing in "mpc". This will tell you if there is an audio_output error. If it is working properly, you will not see an error message, and the problem may be solveable simply by restarting mpd.
- --CONFIGURATION--
- 1. Inside the hidden directory in your home folder ".ncmpcpp", create a file called "config" with vim/nano/emacs or whatever other text editor you use.
- 2. A template which guides you through configuration and can be modified/used as a config file can be found at the end of this text file, under "--CONFIG TEMPLATE--". Paste this into the newly created "config" file. This will guide you through configuration of ncmpcpp
- --GETTING VISUALIZATIONS WORKING--
- 1. To your mpd.conf file, add these lines:
- audio_output {
- type "fifo"
- name "whatever you want the name to be"
- path "/tmp/mpd.fifo" #This is the path to the fifo file, it can be whatever you want as long as "mpd.fifo" is present.
- format "44100:16:1"
- }
- 2. For our example to work, you will use the "mkfifo" command to create file "mpd.fifo" inside of "/tmp".
- 3. To your .ncmpcpp/config, add:
- visualizer_fifo_path = "/tmp/mpd.fifo"
- visualizer_type = "spectrum" (spectrum/wave)
- visualizer_color = "default" # can be any color you like
- --CONFIG TEMPLATE--
- ####################################################
- ## this is example configuration file, copy it to ##
- ## ~/.ncmpcpp/config and set up your preferences ##
- ####################################################
- #
- ##### connection settings #####
- #
- ## set it in order to make tag editor and renaming files work properly
- #
- mpd_host = "localhost"
- #
- mpd_port = "6600"
- #
- mpd_music_dir = "/home/sash/music"
- #
- #mpd_connection_timeout = "5"
- #
- #mpd_crossfade_time = "5"
- #
- ##### delays #####
- #
- ## delay after playlist highlighting will be disabled (0 = don't disable)
- #
- #playlist_disable_highlight_delay = "5"
- #
- ## defines how long various messages are supposed to be visible
- #
- #message_delay_time = "4"
- #
- ##### song format #####
- ##
- ## for song format you can use:
- ##
- ## %l - length
- ## %f - short filename
- ## %F - full filename
- ## %a - artist
- ## %t - title
- ## %b - album
- ## %y - year
- ## %n - track number
- ## %g - genre
- ## %c - composer
- ## %p - performer
- ## %d - disc
- ## %C - comment
- ## %r - begin right align
- ##
- ## you can also put them in { } and then it will be displayed
- ## only if all requested values are available and/or define alternate
- ## value with { }|{ } eg. {%a - %t}|{%f}
- ##
- ## text can also have different color than the main window has,
- ## eg. if you want length to be green, write $3%l$9
- ##
- ## available values:
- ##
- ## - 0 - default window color
- ## - 1 - black
- ## - 2 - red
- ## - 3 - green
- ## - 4 - yellow
- ## - 5 - blue
- ## - 6 - magenta
- ## - 7 - cyan
- ## - 8 - white
- ## - 9 - end of current color
- ##
- ## Note: colors can be nested.
- ##
- #
- song_list_format = "{%a - }{%t}|{$8%f$9}%r{$3(%l)$9}"
- #
- #song_library_format = "{%n - }{%t}|{%f}"
- #
- #media_library_album_format = "{(%y) }%b"
- #
- #tag_editor_album_format = "{(%y) }%b"
- #
- #browser_playlist_prefix = "$2playlist$9 "
- #
- #selected_item_prefix = "$6"
- #
- #selected_item_suffix = "$9"
- #
- ## colors are not supported for below veriables
- #
- song_status_format = "{(%l) }{%a - }{%t}|{%f}"
- #
- #song_window_title_format = "{%a - }{%t}|{%f}"
- #
- ##### columns settings #####
- ##
- ## syntax of song columns list format is "column column etc."
- ##
- ## - syntax for each column is:
- ##
- ## (width of column in %)[column's color]{displayed tag}
- ##
- ## - color is optional (if you want the default one, type [])
- ##
- #
- #song_columns_list_format = "(7)[green]{l} (28)[cyan]{a} (28)[]{b} (50)[red]{t}"
- #
- ##### various settings #####
- #
- #playlist_display_mode = "classic" (classic/columns)
- #
- #incremental_seeking = "yes"
- #
- #seek_time = "1"
- #
- #autocenter_mode = "no"
- #
- #repeat_one_mode = "no"
- #
- #default_place_to_search_in = "database" (database/playlist)
- #
- #media_library_left_column = "a" (possible values: a,y,g,c,p, legend above)
- #
- #default_find_mode = "wrapped" (wrapped/normal)
- #
- #default_space_mode = "add" (add/select)
- #
- #default_tag_editor_left_col = "albums" (albums/dirs)
- #
- #default_tag_editor_pattern = "%n - %t"
- #
- #header_visibility = "yes"
- #
- #statusbar_visibility = "yes"
- #
- fancy_scrolling = "yes"
- #
- #follow_now_playing_lyrics = "no"
- #
- #ncmpc_like_songs_adding = "no" (enabled - add/remove, disabled - always add)
- #
- #display_screens_numbers_on_start = "yes"
- #
- #clock_display_seconds = "no"
- #
- #enable_window_title = "yes"
- #
- ##### colors definitions #####
- #
- #colors_enabled = "yes"
- #
- #empty_tag_color = "cyan"
- #
- #header_window_color = "default"
- #
- #volume_color = "default"
- #
- #state_line_color = "default"
- #
- #state_flags_color = "default"
- #
- #main_window_color = "yellow"
- #
- #color1 = "white"
- #
- #color2 = "green"
- #
- #main_window_highlight_color = "yellow"
- #
- #progressbar_color = "default"
- #
- #statusbar_color = "default"
- #
- #active_column_color = "red"
- #
- #window_border_color = "green"
- #
- #active_window_border = "red"
- #
Add Comment
Please, Sign In to add comment