![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Quad Shot of Ubuntu
![]() Join Date: Nov 2004
My beans are hidden!
Ubuntu 7.10 Gutsy Gibbon
|
What is Music Player Daemon ?
Quote:
MPD is light on your resources, and high on extensibility. The daemon is easy to interact with, develop front ends for, and configure with intuitive configuration scripts. If that doesn't convince you, perhaps the pretty screenshots and features coming later in this thread will. Where can I get Ubuntu compatible packages? I took the liberty of tarring up the files needed to set MPD up in Ubuntu as I have it set up. You can get them here. (You could also get them from the Debian unstable repos but I think the Ubuntu devs here would eat my face if I gave a HOWTO on that. Once you have that, untar it and cd into the dir. You will then need to install the three debs. Be sure you are in the dir containing mpd-ubuntu.tar.gz and execute these commands: Code:
tar xvfz mpd-ubuntu.tar.gz cd mpd-ubuntu dpkg -i mpd_0.11.5-1_i386.deb dpkg -i mpc_0.11.1-2.1_i386.deb dpkg -i gmpc_0.11.2-2_i386.deb nano mpd.conf Code:
sudo cp mpd.conf /etc Next, you will want to look at the help text for mpd. Code:
zenwhen@sunball:~ $ mpd --help usage: mpd [options] <port> <music dir> <playlist dir> <log file> <error file> mpd [options] <conf file> mpd [options] (searches for ~/.mpdconf then /etc/mpd.conf) options: --help this usage statement --no-daemon don't detach from console --stdout print msgs to stdout and stderr --create-db force (re)creation database and exit --update-db create database and exit --no-create-db don't create database --verbose verbose logging --version prints version information The command we were looking for was "--create-db". So run: Code:
mpd --create-db This is what your nice GTK themed front end looks like: ![]() Using this to manage MPD and update your database will make using MPD effortless, and its playlist options are as as good as any, though not as complicated. You may have noticed a set of panel luanchers there on that screenshot that look like media player controls. Those are custom application launchers added to the gnome panel with a right click that point to some of these commands that can be sent to MPC (the command line media player daemon client) : Code:
mpc Displays status mpc add <filename> Add a song to the current playlist mpc del <playlist #> Remove a song from the current playlist mpc play <number> Start playing at <number> (default: 1) mpc next Play the next song in the current playlist mpc prev Play the previous song in the current playlist mpc pause Pauses the currently playing song mpc stop Stop the currently playing playlists mpc seek <0-100> Seeks to the position specified in percent mpc clear Clear the current playlist mpc shuffle Shuffle the current playlist mpc move <from> <to> Move song in playlist mpc playlist Print the current playlist mpc listall [<song>] List all songs in the music dir mpc ls [<dir>] List the contents of <dir> mpc lsplaylists Lists currently available playlists mpc load <file> Load <file> as a playlist mpc save <file> Saves a playlist as <file> mpc rm <file> Removes a playlist mpc volume [+-]<num> Sets volume to <num> or adjusts by [+-]<num> mpc repeat <on|off> Toggle repeat mode, or specify state mpc random <on|off> Toggle random mode, or specify state mpc search <type> <queries> Search for a song mpc crossfade [sec] Set and display crossfade settings mpc update Scans music directory for updates mpc version Reports version of MPD You will have to start mpd with the "mpd" command before this system for music playing works. You can either add a launcher to run that command, run it from the terminal whenever you start up, or you can add it to "gnome-session-properties" as a startup command. After that, you will be able to run GMPC, have a nice pop-up window whenever the song changes, control it in a winamp like fashion with he GUI, and control it from your taskbar. You can control it from the terminal without booting into X with the mpc commands listed above, and can control it with FoxyTunes. If you noticed that I said the word "control" a lot in that last paragraph, you are right. MPD gives you total control over your music library, and gives you the ability to control it from wherever you wish, however you wish, access it how you wish, and from any OS you wish using any desktop environment you wish. There are also clients for all of the major desktop environments; including KDE and even Windows. I will answer any questions you raise to the best of my ability. Enjoy! Edit: Made a change thanks to MPD dev shank. Hey shank.
__________________
Ubuntu Member Kentucky LoCo Team Member Join #ubuntuforums on Freenode! Check Out My Blog Last edited by zenwhen; November 16th, 2004 at 01:49 PM.. |
|
|
|
|
|
|
#2 |
|
Cloned
![]() |
Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu
Looks pretty slick! If I get bored with rhythmbox I'll try this out
__________________
This is where my nickname comes from! faq | search | wiki Twitter: @panickedthumb |
|
|
|
|
|
#3 |
|
5 Cups of Ubuntu
![]() Join Date: Nov 2004
Beans: 28
|
Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu
I got interested in mpd and downloaded the files, but i doesnt work. Cant even do:
mpd --create-db without getting an error message. There are also problems with the channels. What do I do wrong? |
|
|
|
|
|
#4 |
|
Quad Shot of Ubuntu
![]() Join Date: Nov 2004
My beans are hidden!
Ubuntu 7.10 Gutsy Gibbon
|
Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu
What was the error you got when you ran the command?
Did you point the conf file to your music dir? Could you describe your "channels" problem in more detail?
__________________
Ubuntu Member Kentucky LoCo Team Member Join #ubuntuforums on Freenode! Check Out My Blog |
|
|
|
|
|
#5 |
|
5 Cups of Ubuntu
![]() Join Date: Nov 2004
Beans: 28
|
Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu
It couldn't create playlists
The problem with the channels seems to be, that mpc couldn't "connect" or what you call it. |
|
|
|
|
|
#6 |
|
Quad Shot of Ubuntu
![]() Join Date: Nov 2004
My beans are hidden!
Ubuntu 7.10 Gutsy Gibbon
|
Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu
Erikhh, come into #mpd on irc.freenode.org sometime. Your issue could likely be handled easier there.
__________________
Ubuntu Member Kentucky LoCo Team Member Join #ubuntuforums on Freenode! Check Out My Blog |
|
|
|
|
|
#7 |
|
5 Cups of Ubuntu
![]() Join Date: Nov 2004
Beans: 28
|
Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu
Thanks for your concern. At the moment I have given up, because it got too complicated, but I'll try and go to the adress you mention.
|
|
|
|
|
|
#8 |
|
First Cup of Ubuntu
![]() Join Date: Dec 2004
Beans: 1
|
Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu
Thank you for you very nice How to. I finally got mpd with gmpc running
|
|
|
|
|
|
#9 |
|
Just Give Me the Beans!
![]() Join Date: Oct 2004
Location: Alkmaar, The Netherlands
Beans: 44
Ubuntu 7.10 Gutsy Gibbon
|
Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu
Hi Zenwhen. I really like the way MPD works so far, a great new way to organize your playlists.
Concerning the install howto: when the .mpd dir gets created, the subdirectory "playlists" isn't included. This causes an error when running "mpd --create-db". I created the dir with $ cd .mpd $ mkdir playlists $ chmod -R 700 playlists and then moved the whole .mpd dir to my home folder. After this, "mpd --create-db" runs fine. Once again, thanks for a great program |
|
|
|
|
|
#10 |
|
First Cup of Ubuntu
![]() Join Date: Dec 2004
Beans: 7
|
Re: HOWTO: Install and Customize Music Player Daemon in Ubuntu
I like to use the init scripts that come with MPD so I get music as soon as I turn on my computer. Under Ubuntu, my home directory and all my folders automatically have o+r permissions set, so having all my music in /home/tom/media/audio/music/ is fine. In /etc/mpd.conf I change the following variables from their defaults:
Code:
music_directory "/home/tom/media/audio/music" playlist_directory "/etc/mpd/playlists" log_file "/etc/mpd/mpd.log" error_file "/etc/mpd/mpd.error" db_file "/etc/mpd/mpd.db" state_file "/etc/mpd/mpdstate" user "mpd" Code:
# useradd -G audio mpd # mkdir /etc/mpd # mkdir /etc/mpd/playlists # chown -R mpd:audio /etc/mpd # /etc/init.d/mpd start-create-db |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|