Tiny Core Extensions > TCE 2.x
mpd
Jason W:
Thanks to Davor Serfez for:
--- Code: ---Title: mpd.tcz
Description: Music Player Daemon.
Version: 0.15.8
Author: Max Kellermann
Original-site: http://mpd.wikia.com/
Copying-policy: GPL
Size: 2.1M
Extension_by: Davor Serfez
Comments: Clients: IPv6, TCP, Unix domain socket
Playback: ALSA, FIFO, HTTP daemon, libao, OSS
Streaming Encoder: Ogg Vorbis
File Format: AAC, FLAC, MAD mp3, MP4 , OggFLAC (FLAC 1.1.3), Ogg Vorbis
Streaming: libcurl, libmms
Other features: ID3 tag, libsamplerate
Change-log:
Current: 2010/03/02 - 1st version: 0.15.8
--- End code ---
yoshi314:
cool. i assume it's supposed to run per-user and keep the song database in home directory, for persistence?
eltheos:
Somehow after installing mpd tcz, it is started automagically. However, that happens before alsa is setup properly. Therefore, mpd needs to be killed (mpd --kill does not work by the way, as we don't have a pid with no config file), and then started after alsa is set up.
do you launch mpd intentionally somewhere, or is this something specific to my setup you presume?
hamsterjam:
Further to the last posting...
I am setting up an old Neoware thin client as a music streamer for a triumphantly non-technical friend. It needs to work as an appliance. At the moment there is one last thing that I haven't been able to figure out.
I have succeeded in:
- automating nfs-mounting of the music on boot-up
- saving/restoring the /etc/mpd.conf file with the correct parameters
Also, I didn't experience the phenomenon mentioned by eltheos. It worked for me immediately.
So everything is in place, except that the "automagic" startup of mpd runs it as root. Right now, in order to make it work I need to sudo kill the mpd process running as root and then restart it as tc.
Both on general principles, and to conform to the best practices listed on the mpd wiki I would prefer mpd not to run as root. How can I change it to run as tc? All help appreciated...
lucky13:
@hamsterjam (and eltheos): I haven't looked at this extension for TC but in other distros you start and stop from /etc/init.d. So as root or via sudo:
--- Code: ---/etc/init.d/mpd stop
--- End code ---
Or whatever the path to ...init.d/mpd in this case. You can stop, start, restart, etc., based on that script so that it behaves as intended. Dittos for other daemons (cupsd, httpd, sshd, hald, etc.; some of these have more options for modifying behavior).
I just looked and saw this extension still has man pages, documentation, etc., included with it so you should be able to read all the setup information online when you load the extension:
--- Code: ---usr/local/bin/mpd
usr/local/share/doc/mpd/AUTHORS
usr/local/share/doc/mpd/COPYING
usr/local/share/doc/mpd/NEWS
usr/local/share/doc/mpd/README
usr/local/share/doc/mpd/UPGRADING
usr/local/share/doc/mpd/mpdconf.example
usr/local/share/man/man1/mpd.1
usr/local/share/man/man5/mpd.conf.5
usr/local/tce.installed/mpd
--- End code ---
Quickly, though, your mpd.conf (whether you set it up in ~/ or in /etc or wherever) includes which user is running the daemon (line with: user "username"; default is: user "mpd"). The recommendation is to set up a separate user mpd to run the service but you could use tc. If you have that set that in your mpd.conf (and that's persistent) and mpd starts after alsa, you shouldn't have any issues with it running. I just restarted mine (Debian Lenny) after changing user from mpd to my-login and now I own it.
Edit: If you have a persistent mpd.conf set up for user "tc" and mpd starts as any other user, you should only need to issue "/etc/init.d/mpd restart" after it's already loaded to change it to user tc. You could add that to /opt/bootlocal.sh and it should be taken care of by the time you'd do anything with it.
Navigation
[0] Message Index
[#] Next page
Go to full version