Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Stream music to iTunes from Gentoo Linux Network
This hint describes how I got my Gentoo box streaming tunes to my Powerbook, having been inspired (but not particularly helped) by this hint, which isn't particularly clear and didn't seem the best way of doing things. NOTE: This stuff will mostly need to be done as root, or using sudo.

First, you need to install DAAPD. This is the server for Apple's Digital Audio Access protocol, and is what tells iTunes what songs are available and streams them. Installation instructions are on the site, but on Gentoo you'll just need to do a variant of emerge daapd. As of this writing, DAAPD was a masked package on Gentoo, so the actual command line I used to install it on my server PC was:
ACCEPT_KEYWORDS="~x86" sudo emerge -D -v daapd
The -D option gets the dependencies, and the -v is for increased verboseness (USE flags info, etc.). Then all I had to do was point the DAAPD server in the direction of my local tunes library on the Gentoo box, by editing /etc/daapd.conf and setting the Root parameter to be /path/to/my/choons. I also changed the ServerName variable. Then I started it up by typing /etc/init.d/daapd start>. I also used Gentoo's rc-update to ensure that the service would be started after a reboot as well:
/sbin/rc-update add daapd default
Next you have to announce your tunes library to your OS X boxes, which will discover them using Rendezvous (which is Apple's name for Zeroconf). The best way to do this is to use Porchdog's Howl. I won't go into the details of installing Howl, suffice to say on my Gentoo box, you just need a variant of emerge howl. Once Howl was installed, all I needed to do was edit /etc/conf.d/mDNSResponder and set the mDNS responder options to this:
MDNSRESPONDER_OPTS="-n `hostname` -t _daap._tcp. -p 3689"
This basically tells the mDNS responder to broadcast to the subnet that it has a DAAP service available on port 3689 (the standard port). Then I started Howl with /etc/init.d/mDNSResponder start. As with DAAPD, I used rc-update to add it to my boot-time startup:
/sbin/rc-update add mDNSResponder default
So, now that DAAPD was ready to serve tunes, and the DAAPD service was being announced via Howl (Rendezvous/Zeroconf), all I did was start iTunes on my Powerbook, and there was my tunes library. Sweet. This is what worked for me. I've only had it running a couple of days, but so far it is rock solid. I can't seem to add tunes to a playlist which is a bit annoying, but presumably an iTunes limitation. Good luck!
    •    
  • Currently 2.40 / 5
  You rated: 3 / 5 (5 votes cast)
 
[14,748 views]  

Stream music to iTunes from Gentoo Linux | 9 comments | Create New Account
Click here to return to the 'Stream music to iTunes from Gentoo Linux' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Stream music to iTunes from Gentoo Linux
Authored by: darrell on Apr 12, '04 12:45:44PM

i found another easier way, without having to install packages.
just NFS mount the directory on the Gentoo(or any other OS) that contains the audio files. the under iTunes go File -> Add to Library and navigate to the mounted directory.



[ Reply to This | # ]
Stream music to iTunes from Gentoo Linux
Authored by: plambert on Apr 12, '04 01:41:42PM

Using NFS is a splendid idea if the library on the server never changes, and if you do not have iTunes configured to keep your library organized. Otherwise, in the first case, you have to add files manually after they've been added to the server, and in the second case, your iTunes app will try to copy every file to your local drive.

So sure, it's a great alternative for people who have completely different needs than this hint addresses. :-)

Unfortunately, DAAPD doesn't work well with very very very large libraries. And it gets pretty large in the process. :-(



[ Reply to This | # ]
Stream music to iTunes from Gentoo Linux
Authored by: atom on Jun 19, '04 12:10:24PM

nfs doesn't work too well with windows. i've used samba to do the same thing though.



[ Reply to This | # ]
mDNSResponder / howl on FreeBSD
Authored by: stripedgreen on Apr 12, '04 01:36:02PM

this rc-script does the trick on FreeBSD:

 

#!/bin/sh

# mDNSResponder
MDNS_RESPONDER_EXEC='/usr/local/bin/mDNSResponder'
MDNS_RESPONDER_CMDLINE='-i fxp0'
MDNS_RESPONDER_LOGFILE='/var/log/mDNSResponder.log'
MDNS_RESPONDER_PIDFILE='/var/run/mDNSResponder.pid'

# mDNSPublish
MDNS_PUBLISH_EXEC='/usr/local/bin/mDNSPublish'
MDNS_PUBLISH_CMDLINE='myMusic _daap_.tcp 3689'
MDNS_PUBLISH_PIDFILE='/var/run/mDNSResponder.pid'


case "$1" in
        start)
                if [ -x "${MDNS_RESPONDER_EXEC}" ]; then
                        ${MDNS_RESPONDER_EXEC} ${MDNS_RESPONDER_CMDLINE} >> ${MDNS_RESPONDER_LOGFILE} 2>&1 && echo -n ' mDNS
Responder'

                        if [ -x "${MDNS_PUBLISH_EXEC}" ]; then
                                ${MDNS_PUBLISH_EXEC} ${MDNS_PUBLISH_CMDLINE} >> ${MDNS_RESPONDER_LOGFILE} 2>&1 &
                                echo -n ' mDNSPublish'
                        fi
                fi
                ;;
        stop)
                killall mDNSResponder 2>/dev/null
                if [ $? -ne 0 ] ; then
                        echo 'mDNSResponder not started'
                fi
                killall mDNSPublish 2>/dev/null
                if [ $? -ne 0 ] ; then
                        echo 'mDNSPublish not started'
                fi
                ;;
        restart)
                $0 stop
                sleep 2
                $0 start
                ;;
        *)
                echo ""
                echo "Usage: `basename $0` { start | stop | restart }"
                echo ""
                exit 64
                ;;
esac


[ Reply to This | # ]
Multithreaded DAAP.... for better performance :)
Authored by: wrzlbrnft on Apr 12, '04 04:01:45PM
Hi Folks...

just wanted to hint over to mt-daapd's homepage...

It's the best daapd I have found out there... works great, is quite fast, has a database backend and is very much alive and in strong development !

The newest in progress package can be downloaded here : Snapshots

Since I found this cool daemon... after having some trouble with this then single threaded daapd, my gentoo box advanced to a music server with now about 25GBs of audiofiles.... it's just sooooo simple !

And for those of us who don't wan't to have there macs running in living rooms : Roku's Soundbridge understands itunes AND has Rendezvous support..... I will be ordering this very soon I guess :)



[ Reply to This | # ]
Multithreaded DAAP.... for better performance :)
Authored by: bluehz on Apr 12, '04 07:07:31PM

mt-daapd is definitely the way to go! Much less dependencies and I especially like the smart playlists and static playlist features.



[ Reply to This | # ]
Stream music to iTunes from Gentoo Linux
Authored by: professor_b on Apr 18, '04 05:46:30PM

nice hint, thanks!

is there any way of making playlists on the server itself so that it serves to iTunes like any other mac-based itunes share with playlists?



[ Reply to This | # ]
Stream music to iTunes from Gentoo Linux
Authored by: bluehz on Apr 19, '04 07:07:05PM

mt-daapd allows you to use static playlists and SmartPlaylists. Teh smart playlists are configured in teh server config file and the static playlists are basic .pls type files that exist within the mp3 dir along with their associated files.

I am working with the developer of mt-daapd to produce a Mac installer pkg and as soon as he gives me the go ahead I will make it available for him.

Also - new feature in mt-daapd (CVS)... you can now get the Album Art from the server. VERY COOL!



[ Reply to This | # ]
Stream music to iTunes from Gentoo Linux
Authored by: mattclare on Nov 10, '04 11:52:44AM

I've been running this for over a year now and it is great!

I did run into a problem at work when we upgraded the linux box I was using to braodcast a mDNSProxyResponderPosix beacon pointed towards my Gentoo box at home. The problem was the rules in our new iptables firewall. Here's the addition to the firewall chain I made:

-A RH-Firewall-1-INPUT -p udp -m udp -s 139.57.49.1/24 --dport 5353:5353 -j ACCEPT 

* All one line, and where I have RH-Firewall-1-INPUT you'll want to put the name of the main chain for your firewall.

So for people trying to Google this answer (as I was) the port number for Apple Rendezvous is 5353, running UDP.

Setting up mDNSProxyResponderPosix is a seperate issue, but if you get the source code from Apple's darwin source code check out the documentation that comes with. Unlike some programs like NetworkBeacon, mDNSProxyResponderPosix doesn't care if you enter a DNS name or an IP.



[ Reply to This | # ]