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

Use a Linux box as an iTunes music server UNIX
My wife and I are slowly running out of hard drive space on our iBooks. We both have huge music libraries (we ripped all our CDs). I decided I would try to setup my Linux server (which serves up files to our Macs via Samba) to also share music. Instead of just moving our files to the server and adding the songs to our library, I wanted to use the built-in iTunes sharing instead. Most of the files for doing this are available for Linux, but almost completely undocumented. Here is my walk through of how I got it working.

First let me state that this is not intended to do illegal music sharing across the internet; this setup is only intended to allow you to share your music with your family on the local network. I'm assuming you have setup a Linux server for Samba sharing or NFS. If you haven't, there are a number of how-to's and other resources on the web you can google.

You will need to download a few files to your Linux server first. Apple uses a protocol called daap to share music libraries. Rendezvous is also used to announce which services are available. You will need to download Apple's Rendezvous multicast DNS advertiser (free registration required) to make your Linux machine broadcast itself. You will then need to go to the daapd page and download all the appropriate files. I'm using Redhat 9 and everything compiled just fine on my computer. There is a sample configuration file included with the daapd server source code that you can edit and copy to /etc/daapd.conf.

Once everything is compiled, create a music folder on your Samba server and copy some music to it. Next you will need to run the multicast DNS advertiser from Apple with the following line as root user:
  mDNSProxyResponderPosix 10.0.1.201 squeal "Music Jukebox" _daap._tcp. 3689 &
10.0.1.201 is the IP address of your server and "Music Jukebox" is the name you will advertise to iTunes. Once that is running, you can edit the /etc/daapd.conf file to match your needs with directory, server name, and share name. Start the daapd daemon by typing this as root:
  daapd &
Once that is complete, you can open iTunes and it should pop up as a shared music library. This software is all in very early development so it doesn't do things like handle Album covers or updates to the library. It has some bugs still, but you can help the developers at the daapd page.
    •    
  • Currently 2.42 / 5
  You rated: 2 / 5 (12 votes cast)
 
[272,353 views]  

Use a Linux box as an iTunes music server | 90 comments | Create New Account
Click here to return to the 'Use a Linux box as an iTunes music server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Why?
Authored by: escowles on Jul 28, '03 10:53:25AM

I've got to ask why you would want to do this. If you can share the files via AppleShare, Samba or NFS, why not just add them to your library? It lets you add/delete files, add album cover info, etc. If the share isn't mounted, double-clicking on a song in iTunes will mount the disk for you. What could be simpler?

I've had lots of problems with NFS (crashes reliably after playing mp3s for a few hours) and a few problems with AppleShare (netatalk doesn't support long filenames very well, at least as of 1.6). But I've been using Samba for a few weeks now, and it works like a charm. Other than feeling a little weird using Samba to network between to Unix machines (OSX and Linux), I don't have any complaints.

-Esme



[ Reply to This | # ]
Why?
Authored by: sweetsdream on Jul 28, '03 12:38:27PM

I didn't know iTunes would auto mount a SMB share, I'll give it a try. I did this mainly to see if I could and I was suprised how easy it was.

I also have freinds that come over and access my Airport network. Setting up samba on Linux for many users or guest users is very insecure.

---
Cheers,

Sweetsdream



[ Reply to This | # ]
Why?
Authored by: zojas on Jul 28, '03 01:31:29PM

I want to be able to plug my ibook into my tv and splash the itunes visualization stuff on the screen while the music plays through my big stereo (also plugged into the ibook). I have 20gb worth of mp3s (all from my cds). I don't have that much space on my ibook's drive.

when I'm away from home, I don't want to see a bunch of songs in my itunes library I can't play.



[ Reply to This | # ]
Why?
Authored by: tcurtin on Aug 26, '03 06:00:30PM

Once again....
<ax grinding>if iTunes supported smart lists based on *file location* this wouldn't be a problem. Just make a smartlist for local files when you're on the road, and a smartlist for your server, your ipod... Allows all kinds of other organizational options as well. Apple... listening?
</ax grinding>

---
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."
- Benjamin Franklin, Historical Review of Pe



[ Reply to This | # ]
Why?
Authored by: brainsik on Oct 22, '03 05:55:27AM

Comments like these remind me of the true reason I rather be using free software.



[ Reply to This | # ]
Why?
Authored by: GaelicWizard on Jul 31, '03 01:40:15AM

The daap protocol is especially designed to stream music. Using any other standard file sharing method would be much less efficient.

---
Pell



[ Reply to This | # ]
Why?
Authored by: imagine on Apr 15, '04 05:43:13PM
I agree. daap'ing your own music is dumb. I tried it a few months ago. It's dumb because the music is not in your library so you can't do any fun stuff like ratings and smart playlists.

Run NFS on the Linux machine and use the iTunes Library Manager script to switch between your Network-library when at home and your laptop's library when traveling.

I come home, hit Cmd-K and double click my Mp3 share. Good to go. I even use mDNS on the Linux machine so I can use a Rendezvous name for the NFS share. With Panther I don't have to necessarily worry about unmounting the share. When I'm out of my home, it times out and lets you autodisconnect the dead share after 30 seconds or whatever.

[ Reply to This | # ]
Why?
Authored by: boostdave on Sep 05, '04 01:04:58PM

Unfortunately my wife's iBook had some problems reading files over a wireless Samba connection without glitching (I realize NFS is supposed to be better, but I have to serve to windows machines too and it looks like I'm having a hard time getting NFS going anyway).

It seems, from what I've been reading, like there are some real limitations with the DAAP approach, like for example that you can't sync parts of your library to an iPod attached to a client machine being served these files.

If I keep the files on a shared disk it seems to me that I'm going to be losing the buffering capability that would help smooth out network bandwidth issues, right? Also, IIUC there's some facility for "pushing" library index updates from the server to clients -- is that right? I guess I'd lose that, too.

Or does it make sense to use both approaches in tandem so that I can sync an iPod, too? I'm a little vague on iTunes' library management capabilities; I don't know if this can be done sanely.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: rickg17 on Jul 28, '03 02:25:06PM

can you sync a portion of this to an iPod?



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: sweetsdream on Jul 28, '03 03:06:54PM

No. It's the same as listening to someone else's Music Library. We didn't move music from our computers that we sync with our iPods.

---
Cheers,

Sweetsdream



[ Reply to This | # ]
Probably violates the DMCA
Authored by: chrisgagne on Jul 28, '03 02:54:34PM

Just a friendly reminder that this hack probably violates the DMCA since it allows more than one person to listen to a particular song at once and bypasses licensing restrictions. Of course I wouldn't take that seriously, but its interesting to see what the RIAA has done to our legal system.



[ Reply to This | # ]
Probably violates the DMCA
Authored by: foo12 on Jul 28, '03 02:59:14PM

First, the DMCA is not pertinent.

Further, it's personal use in one's home. The same effect -- two people listening to the same song -- could be achieved by cranking up the volume.



[ Reply to This | # ]
Probably violates the DMCA
Authored by: io on Jul 29, '03 05:27:32PM

daapd only shares MP3 files. we don't circumvent anything! licenses and restrictions are only present in AAC files from the iTMS and these are not played.

io



[ Reply to This | # ]
Probably violates the DMCA
Authored by: salvo on May 03, '04 05:33:58AM

daapd is an alternative Server which supports the sharing of AAC files too.
There is preliminary support for encoded (iTMS) AACs… the normal restrictions apply, only 5 devices etc.

IANAL, but I don't see why the DCMA would come into conflict with this concept. It doesn't let you share unlicenced music in any way which iTunes doesn't, it just lets you share the music from a Linux Box, rather than a Mac or Windows Box running iTunes.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: cerbero on Jul 28, '03 03:02:06PM

I get this error when trying to start daapd:

daapd: error while loading shared libraries: libid3tag.so.0: cannot open shared object file: No such file or directory

I have installed libid3tag without problems though, so I don't know what's going on. Anyone have any idea?



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: wiley on Jul 28, '03 03:08:52PM

Try adding /usr/local/lib to /etc/ld.so.conf and then running ldconfig.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: sweetsdream on Jul 28, '03 03:12:21PM

I had the same problem. You need to load the libraries for ID3. To do this you will need to edit your /etc/ld.so.conf file and add /usr/local/lib. Once you save the file type ldconfig at the prompt.

---
Cheers,

Sweetsdream



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: edarkarchon on Jul 28, '03 07:25:12PM

or reinstall libid3 with the configure option --prefix=/usr



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: chincotaco on Jul 28, '03 10:01:49PM

I set this up on my G4 server, and it works wonderfully. The only problem is that the program doesn't scan the directory recursively.

I'd really hate to have to give up my iTunes-organized music folder, but if that's what it takes to run this, oh well.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: semios on Jul 28, '03 11:14:54PM
Maybe you could do something like this:

flat_dir=all_mp3s
for file in $(find . -name "*.mpg"); do
     ln -s $file $flat_dir/$(basename $file)
done

Well, if it'll work with symbolic links then that should do it.

[ Reply to This | # ]

Use a Linux box as an iTunes music server
Authored by: sweetsdream on Jul 29, '03 01:09:42AM

I am using an Intel Linux box and it scans the directories recursively. You should send a note to the developer because it sounds like it might be a PPC problem.

---
Cheers,

Sweetsdream



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: pglock on Oct 21, '03 03:02:58PM

I had a similar problem. It turned out that daapd didn't like a space in one of the directory names, escaping with a '\' didn't help. When I renamed the directory everything worked ok.

---
Too lazy to think of an original signoff...



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: io on Jul 29, '03 05:23:10PM

that's strange. it should scan the directory recursively, even on a PPC machine. the only limitation is, that files or folders beginning with a . are ignored. could you please try to examine this problem further and write a report to the daapd developers? thank you!

io



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: wiley on Jul 30, '03 07:10:44PM

I had the same problem when I had the directory set in daapd.conf as /local/Music. I changed it to /local/Music/iTunes/iTunes Music and it started working. I guess if it doesn't find any mp3s in the first couple of levels it gives up.



[ Reply to This | # ]
how did you configure daap on osx?
Authored by: nick on Oct 21, '03 03:37:38PM

i couldn't figure out, how to configure daap wich directory to share on osx. could s.o. please help me with that.

to prevent questions: i don't want to loginto my server and start iTunes.



[ Reply to This | # ]
how did you configure daap on osx?
Authored by: nick on Oct 21, '03 03:52:10PM

i couldn't figure out, how to configure daap wich directory to share on osx. could s.o. please help me with that.

to prevent questions: i don't want to loginto my server and start iTunes.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: inTheKnow on Jul 29, '03 01:07:48AM

This works like a charm. Well thought out and nicely written.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: wiley on Jul 29, '03 02:17:58PM

What version of iTunes are you using? I can't seem to get it working and was wondering if this is broken in 4.0.1.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: sweetsdream on Jul 29, '03 03:38:20PM

I am using 4.01 on two iBooks and it is working great. I did find on problem with multiple IP addresses not working. Do You see the server in your library?

---
Cheers,

Sweetsdream



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: cerbero on Jul 29, '03 12:01:15PM

Thanks! Running ldconfig did the trick.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: cerbero on Jul 29, '03 12:07:50PM

Oh crap, replied in the wrong place :p

Oh well, anyway. iTunes doesn't seem to pick up on the Rendezvous broadcast.. Any way I can check it? Or can I open the daap share manually?



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: sweetsdream on Jul 29, '03 03:43:56PM

Are you runnig the Apple mDNSProxyResponderPosix with the correct arguments? The port number should be the most important part (3689) you also need the squeal and your hostname in quotes.

---
Cheers,

Sweetsdream



[ Reply to This | # ]
Use a WINDOWS box as an iTunes music server?
Authored by: pyrohotdog on Jul 29, '03 03:57:49PM

I see that in the Rendezvous folder, that it can be used on Windows. My PC upstairs has 80GB, would it be possible to convert this hint to Windows, and use it as the server instead?

---
~>=AaRoN



[ Reply to This | # ]
Use a WINDOWS box as an iTunes music server?
Authored by: io on Jul 29, '03 05:12:04PM
the probleme is not rendezvous, it's daapd. it uses a library to become a webserver and it is not that easy to port this to windows. maybe cygwin can get you there.

io

[ Reply to This | # ]
Use a WINDOWS box as an iTunes music server?
Authored by: Appleman on Nov 10, '03 08:12:09AM

If you are going to run it on Windows, why not just install iTunes and turn on sharing?



[ Reply to This | # ]
ERROR
Authored by: sweetsdream on Jul 29, '03 04:01:50PM

Sorry, some of you may have found this problem already. The line to start Rendezvous service is actullay this:

mDNSProxyResponderPosix 10.0.1.201 squeal "Music Jukebox" _daap._tcp. 3689 &

This will allow the service to show up in iTunes.

---
Cheers,

Sweetsdream

[ Reply to This | # ]

ERROR
Authored by: wiley on Jul 30, '03 07:03:27PM

Thanks. It's working now. Very cool.

I wish you could see the album artwork and that iTunes kept up with the last time you played a song.



[ Reply to This | # ]
ERROR
Authored by: lukken on Aug 26, '03 01:03:27AM

This is the same as listed previously. Is it correct. I am not getting anything in my iTunes list once I run this.



[ Reply to This | # ]
Jukebox is visible, but never loads songlist?
Authored by: jac_green on Aug 02, '03 04:06:46PM

The jukebox shows up fine in iTunes, but when it's clicked, the shared music never loads. (Barber pole just spins, then eventually iTunes just gives up and displays the most recent playlist). Is there a maximum number of songs that can be shared or something? Thanks for figuring this out, I've wanted to do this for ages.



[ Reply to This | # ]
Jukebox is visible, but never loads songlist?
Authored by: jac_green on Aug 02, '03 04:25:42PM

skip it, i did something stupid. (used the wrong ip address in the mDNSProxyResponder command.) i hate when that happens.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: zojas on Aug 07, '03 10:31:08PM

Got this working, it's quite cool.

the mp3z don't have to be on a samba or nfs share, right? daapd streams the data out, so the files can live in a plain old directory?



[ Reply to This | # ]
Problem with make daad
Authored by: JcJensen on Aug 24, '03 07:00:57PM

Hi,

i have a problem with make of daad

i type in " make"

the result is:

[...]
dboutput.h:106: request for member `clear' in `out', which is of non-aggregate type `int'
dboutput.h:107: request for member `size' in `this->Dictionary<Song>::map', which is of non-aggregate type `int'
dboutput.h:108: request for member `begin' in `this->Dictionary<Song>::map', which is of non-aggregate type `int'
dboutput.h:108: request for member `end' in `this->Dictionary<Song>::map', which is of non-aggregate type `int'
dboutput.h:109: invalid type argument of `unary *'
dboutput.h: In member function `T* Dictionary<T>::find(...) const [with T = Container]':
types.h:292: instantiated from here
dboutput.h:114: `id' undeclared (first use this function)
dboutput.h:115: invalid type argument of `unary *'
dboutput.h:115: request for member `end' in `this->Dictionary<Container>::map', which is of non-aggregate type `int'
make: *** [daapd.o] Fehler 1


anybody know what to do ?

thx jens



[ Reply to This | # ]
Problem with make daad
Authored by: Shawn Parr on Oct 06, '03 05:20:49PM

Make sure you install daaplib, not the libdaap. I made this same mistake, they are both linked to from the daapd page.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: lukken on Aug 26, '03 01:36:04AM

I am unsure what needs to be in the daapd.conf. Where do I enter the directory, server name and share name? I have compiled everything, but don't think that it is configured right.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: scottwat79 on Oct 17, '03 12:09:26AM

I am wondering if you can use this on OSX as well, particularly OSX server. If so what would you do about the mDNSresponder? And would you have to download the daap program? or would this all built in. Basically my set up now is that I have one large drived computer load up and auto login a user and auto run itunes to set up a share. This is a headless system in the closet out of the way and I use my iBook to access it. But I was looking at getting an xServe and didnt want it to autologin just share out a music directory and be able to do all the other stuff (SMB shares, AFP shares, Authentication, etc) anyone tried this kind of setup?



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: io on Oct 18, '03 11:28:48PM

sure you can! daapd has been developed on an os x box. it has only later been made sure that it works on other platforms.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: alberjo on Oct 22, '03 01:36:35PM

Works like a charm... almost.

daapd seg faults when pulling mp3s off a local ntfs filesystem.
no problems with other fs.

before any major time investment, anyone know this to be a lost cause or simple fix.

thank you for your time,

-unix guy surrounded by apple lovers



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: alberjo on Oct 23, '03 01:19:16PM

hmm....

daapd appears to work with ntfs under 2.6.x kernels, but not 2.4.20-20.9 or 2.4.22. I think a rewrite of ntfs started in 2.5, so maybe this functionality is only available from there on up. Just a guess though.

anyways, sorry to bother you all.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: Lemuel on Oct 22, '03 04:03:22PM

I don't get it working.
It compiles just fine (at least no errors).
My computer is named lacci and has the IP 192.168.0.1
I run Rendezvous with

./mDNSProxyResponderPosix 192.168.0.1 squeal "lacci" _daap._tcp. 3689

and get

Made Service Records for lacci._daap._tcp.local.
Service lacci._daap._tcp.local. now registered and active

On the daapd site I chose to use the default values (with a config file it didn't work either). This gives me

/home/lemuel/src/iTunes/daapd-0.2.1c/daapd
scanning . for mp3s... done.

But by room neighbour with iTunes on his Windows box does not see me there.
I ran both commands as root.
daapd is running, I cannot start it twice.
How can I look if the Rendezvous part is working?

What's wrong?



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: bluehz on Oct 22, '03 06:49:20PM

Sounds like you might have a firewall issue - or your neighbor does. Make sure you have the port 3689 open.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: tjipke on Nov 15, '03 09:17:51AM

That's funny, I'm using a Linux box as a server, but on my windows machine I can see the shared music but not on my OSX machine. They are on the sam swicht and have no firewalls.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: zarqman on Nov 16, '03 05:22:03PM

you're positive that the built in firewall in os x is turned off? that'd be the most likely point for a problem.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: tjipke on Nov 17, '03 07:23:13AM

I'm sure my firewall is off. Strange thing is that I tried it on an other linux box and that one I can see from my windows and OSX machines.



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: bluehz on Oct 22, '03 11:07:11PM

I have this up and running fine - but it seems only able to accept one client at time. Does anyone know if this is true or not? Documentation of daapd is little to none.



[ Reply to This | # ]
Automated start, stop script for daap on Red Hat
Authored by: migurski on Oct 30, '03 01:29:57PM

The following script can be used to start and stop daap service automatically. When placed in /etc/init.d/ (Red Hat), it becomes a service that can be started up at boot time. Modify $musicdir to suit your local configuration.


#!/bin/sh
# chkconfig: 5 99 1
# description: in Soviet Russia, music listens to YOU

musicdir=/usr/local/share/apache/htdocs/music

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
export PATH

mode=$1    # start or stop

case "$mode" in
  'start')
    echo "Starting iTunes music service"

    mDNSProxyResponderPosix 192.168.1.1 squeal "Studio Music" _daap._tcp 3689 &
    sleep 5
    daapd -C $musicdir/daapd.cache $musicdir &
    sleep 5

    ;;

  'stop')
    echo "Stopping iTunes music service"

    for PROG in daapd mDNSProxyResponderPosix; do
        for PID in `ps -C $PROG -o pid`; do
            if [ $PID != 'PID' ]; then
                kill -15 $PID;
                sleep 2;
            fi;
        done;
    done;
    ;;

  'restart')
    $0 stop
    $0 start
    ;;

  'status')
    for PID in `ps -C daapd -o pid`; do
        if [ $PID != 'PID' ]; then
            PID1=$PID;
        fi;
    done;
    for PID in `ps -C mDNSProxyResponderPosix -o pid`; do
        if [ $PID != 'PID' ]; then
            PID2=$PID;
        fi;
    done;
    echo "daap (pids ${PID1}, ${PID2}) is running...";
    ;;

  *)
    # usage
    echo "usage: $0 start|stop|restart"
    exit 1
    ;;
esac


[ Reply to This | # ]
Automated start, stop script for daap on Red Hat
Authored by: nyamuk on Nov 20, '03 05:52:01PM
Thank you for posting your initscript. Im having problems with the following :

    daapd -C $musicdir/daapd.cache $musicdir &
Will not work with the arguments "-C musicdir/daapd.cache $musicdir &" The service shows up on clients but there are no songs. But will work with :

daapd &
My script posted below:

#!/bin/sh
# chkconfig: 5 99 1
# description: in Soviet Russia, music listens to YOU

musicdir=/var/itunz

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/bin
export PATH

mode=$1    # start or stop

case "$mode" in
  'start')
    echo "Starting iTunes music service"

    mDNSProxyResponderPosix 192.168.1.1 squeal "Studio Music" _daap._tcp 3689 &
    sleep 5
    daapd  &
    sleep 5

    ;;

  'stop')
    echo "Stopping iTunz music service"

    for PROG in daapd mDNSProxyResponderPosix; do
        for PID in `ps -C $PROG -o pid`; do
            if [ $PID != 'PID' ]; then
                kill -15 $PID;
                sleep 2;
            fi;
        done;
    done;
    ;;

  'restart')
    $0 stop
    $0 start
    ;;

  'status')
    for PID in `ps -C daapd -o pid`; do
        if [ $PID != 'PID' ]; then
            PID1=$PID;
        fi;
    done;
    for PID in `ps -C mDNSProxyResponderPosix -o pid`; do
        if [ $PID != 'PID' ]; then
            PID2=$PID;
        fi;
    done;
    echo "daap (pids ${PID1}, ${PID2}) is running...";
    ;;

  *)
    # usage
    echo "usage: $0 start|stop|restart"
    exit 1
    ;;
esac


[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: alien8d on Nov 01, '03 08:27:15PM

I've got all of the components compiled and running on RedHat Linux 8.0. seems to work pretty nicely, and I can even access it from 2 machines simultaneously (although since installing i've pretty much just used one of my machines)

what i've noticed is that after awhile (seemingly randomly or if i put the machine to sleep and then wake it up) the responder either stops broadcasting the daapd share or something else is broken.

when this happens, a netstat -an shows a connection from the client machine on port 3689 as ESTABLISHED (although it really isn't)

so far the only way to get iTunes to see the share again is to restart the mDNSProxyResponder.

has anyone else experienced this? any suggestions?

thanks

a8



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: iLoveiTunes on Dec 13, '04 05:18:45PM

I've got the same issue... daapd service fully available in iTunes, but disappears after a while. Any idea meanwhile to get around this?

thanks
Sven



[ Reply to This | # ]
Compiling mDNSResponder on Redhat 7
Authored by: tjipke on Nov 04, '03 05:15:54PM

I want to try touse my Redhat 7 Machine for this, but I can't get mDNSResponder compiled on it. (I'm not a very experienced user.) Are there other people that had succes on RedHat7?

This is what I get when I run make os=linux from the mDNSPosix directory:

if test ! -d objects ; then mkdir objects ; fi
if test ! -d build ; then mkdir build ; fi
cc -c -g -I../mDNSCore -I. -DMDNS_DEBUGMSGS=2 -DNOT_HAVE_SA_LEN -W -Wall ../mDNSCore/mDNS.c -o objects/mDNS.c.o
../mDNSCore/mDNS.c: In function `mDNS_RegisterInterface':
../mDNSCore/mDNS.c:6405: parse error before `*'
../mDNSCore/mDNS.c:6407: `q' undeclared (first use in this function)
../mDNSCore/mDNS.c:6407: (Each undeclared identifier is reported only once
../mDNSCore/mDNS.c:6407: for each function it appears in.)
../mDNSCore/mDNS.c:6418: `rr' undeclared (first use in this function)
make: *** [objects/mDNS.c.o] Error 1

thx,

Tjipke



[ Reply to This | # ]
Same problem with debian
Authored by: prohtex on Nov 30, '03 07:25:00PM

I am having the same problem compiling mDNSResponder on debian linux, does anybody have a fix?



[ Reply to This | # ]
Same problem with debian
Authored by: king_arthur on Dec 16, '03 05:55:58PM

I am also running Debian on my linux box and, if this can cheer you up, after two evenings spent compiling and setting-up the daapd part of the server now I am stuck with the same identical problem as you...
mDNS doesn't compile and give me same error.

Did you make any progress on it?

I guess daapd is useless without the responder or is possible to connect iTunes anyway? if yes how?



[ Reply to This | # ]
Compiling mDNSResponder on Redhat 7
Authored by: king_arthur on Dec 16, '03 06:21:37PM

Hi Tjipke,

have made any progress on this problem?

Are you using the daap server now?



[ Reply to This | # ]
ID3 tags on AAC?
Authored by: nitropowered on Nov 09, '03 10:24:24PM

So I have everything running great except the ID3 tags for my AAC encoded files do not show. They do however for MP3s. I also verified if the tags were stripped by copying the file back into my iTunes library and the tags are still there. I encoded my AAC files using iTunes 4.0.1 using standard settings. Is it just the libid3tag does not support AAC?



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: arcterex on Nov 11, '03 01:13:12PM

I had a silly problem I figured I'd share here in case anyone else gets it. I was having a hell of a time compiling libhttpd-persistant on my gentoo linux box, with all sorts of c++ parsing errors when ever I tried to compile it. Turns out I forgot that the command gcc is not the same as g++. The makefile for libhttpd somehow mis-understood this and inserted the wrong command in the makefile. Changed it from gcc to g++ and it all worked. Just waiting for daapd to finish scanning my mp3s before I can confirm it all worked, but all the files are compiled and running now!



[ Reply to This | # ]
Thank You!
Authored by: RafeDawg on Dec 28, '03 04:37:20PM

I too use gentoo, and had the exact same problem. Thank you so much for posting!



[ Reply to This | # ]
Errors Compiling
Authored by: jakobie on Nov 14, '03 08:51:48PM

All right, I did all of this

daaplib
libhttpd
libid3tab
zlib

When I "make" daapd I get an error

[jakobie:jakobie/Desktop/daapd-0.2.1c] jakobie# make
g++ -Wall -Wno-multichar -I. -c daapd.cc
In file included from daapd.cc:24:
types.h:35:20: id3tag.h: No such file or directory
In file included from daapd.cc:24:
types.h:357: `id3_tag' was not declared in this scope
types.h:357: `tag' was not declared in this scope
types.h:357: parse error before `char'
make: *** [daapd.o] Error 1

Any ideas?



[ Reply to This | # ]
Errors Compiling
Authored by: kodiaksystems on Nov 16, '03 04:13:34PM

i had the same on suse 7.1 ... seems i had an old version of libid3
- i just uninstalled the package, and grab the latest version and was ok... if youve installed the latest version.. .then perhaps you need to uninstall the old version



[ Reply to This | # ]
Anyone done this on a FreeBSD server?
Authored by: surfsofa on Nov 17, '03 12:21:22PM

I'm trying to get this up and running on my FreeBSD server, so far without success. Two questions to anyone else who's done this :

1) How did you compile mDNSproxyresponder? I'm having problems with the makefile - any tips?

2) I've tried using mdnsd which appears to do the same job, but no joy with that either. Have you had tried and succeeded with this?

TIA for any pointers :)



[ Reply to This | # ]
Anyone done this on a FreeBSD server?
Authored by: sandro on Nov 17, '03 03:18:45PM

Near the top in the section on OS's and add the following lines to your Makefile:

ifeq ($(os),freebsd)
CFLAGS_OS = -DHAVE_SOCKADDR_SA_LEN -DHAVE_DAEMON -DHAVE_SOCKLEN_T
else
.
[section on osx & cantbuild]
.
endif



[ Reply to This | # ]
Use a OSX box as an iTunes music server
Authored by: JonnyG on Nov 20, '03 06:20:50PM

So can you do this running OSX 2 or 3? I'm running Jag server on an older box with tons of drive space. Right now, I have it set to automatically log in and launch iTunes so that the whole library is available. However, I can't add new music remotely with out VNC or something similar, and I don't want to do that. I would much rather have this running with no user logged into the GUI. More processor time for the server functions, instead of a GUI that no one is using.

If this is possible, how would new music be added to the lists? I know how to add it to the drive remotely, but would it have to be added to the broadcasted playlists manually through SSH? I'm ok with that. I have SSH running on the server anyway. I just don't want to run VNC or Timbuktu.

THoughts?



[ Reply to This | # ]
Use a OSX box as an iTunes music server
Authored by: beepotato on Feb 01, '04 10:44:25AM

"However, I can't add new music remotely with out VNC or something similar, and I don't want to do that."

To add a music file to your playlist through SSH, you can do it with Applescript (after you put the file on the server disk):

  osascript -e 'tell application "iTunes" to
    add ("/UNIX/path/to/your/file.mp3" as POSIX file) to playlist "Playlist name"'

(all that in one line, which was broken here for readability)

Note that the "to playlist..." part is optional. Without it, the file just gets added to your library.



[ Reply to This | # ]
Use a OSX box as an iTunes music server
Authored by: Velociped on Feb 28, '04 10:55:50PM

The previous respondent does not seem to have answered the question(s) which you have posed.

So can you do this running OSX 2 or 3?

Yes; the software compiles without issue under both of the mentioned releases of OS X. Provided you have installed the three required dependencies beforehand, everything will work quite well.

... how would new music be added to the lists?

The method I use is as follows:

My daapd daemon is running on an old, headless 8600 running 10.2.8. I rip my disks on my iBook and then transfer the directories containing the encoded MP3s (the daapd daemon is only able to serve MP3s — not AAC or other format files) into the desired position within the directory tree. Then, restart the daapd process; no need to kill the mDNSProxyResponder. (I have written a StartupItem for the daapd service which contains a restart branch. So, I simply issue the restart command through the SystemStarter. The same result can be obtained by killing the process and restarting the daemon.) Voila, the new tracks are now available throughout the subnet.

... would it have to be added to the broadcasted playlists manually through SSH?

Well, the current release of the daapd daemon does not support playlists — only the master "Library" is published. Thus you would still be required to make use of the GUI and iTunes if you wanted to create and publish specialized playlists.

The alternate mt-daapd project, mentioned in another thread, does support the creation and publication of playlists. However, I have not used this and cannot comment on the procedure.

I just don't want to run VNC or Timbuktu.

As I mentioned above, if you can live without playlists (or are willing to compile and install mt-daapd), then it is possible to maintain (add, subtract, etc.) tracks and albums within your music database remotely and entirely from the command line.



[ Reply to This | # ]
Use a OSX box as an iTunes music server
Authored by: bluehz on Feb 29, '04 12:18:29AM

I second that vote for mt-daapd. Couple of pluses over daapd:

* multithreaded
* supports static and smart playlists
* self-contained - much fewer dependencies
* Supports most ID3v1 and v2 tags
* Runs as a daemon (no need to keep iTunes open as the server)



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: amnesiac on Dec 08, '03 02:31:15PM

Hi,

this works great for me, except that daapd quits with an 'out of memory' message after about 3 hours of random playing.
My linux server has 384 MB RAM and shares about 13000 songs.

Does anyone experience the same?

bye,
André



[ Reply to This | # ]
daapd will not compile for me.
Authored by: jackal on Jan 12, '04 10:18:45PM

I installed all the libs no problem. make and make install-ed each one of them with no problem.

Then I when to compile daapd and here's the error I'm getting:
[root@jackal daapd-0.2.1d]# make
c++ -Wall -Wno-multichar -L. -L/usr/local/lib -o daapd daapd.o db.o dboutput.o songcache.o parsemp3.o -ldaaplib -lhttpd-persistent -lid3tag -lz
/usr/local/lib/libhttpd-persistent.a(api.o): In function `httpdReadRequest(httpd *)':
/media/tmp/libs/libhttpd-1.3-persistent-f/src/api.c:367: undefined reference to `__ctype_b'
/media/tmp/libs/libhttpd-1.3-persistent-f/src/api.c:475: undefined reference to `__ctype_b'
/usr/local/lib/libhttpd-persistent.a(api.o): In function `httpdOutput(httpd *, char *)':
/media/tmp/libs/libhttpd-1.3-persistent-f/src/api.c:933: undefined reference to `__ctype_b'
collect2: ld returned 1 exit status
make: *** [daapd] Error 1



[ Reply to This | # ]
Anyone using this with Mandrake 9.1/tmdns?
Authored by: frido:mac on Jan 19, '04 06:19:46AM

Hello!

I installed and compiled daapd and the required libs on an old G3/266 running Mandrake Linux 9.1.
There already is a "tmdns" service running and I input the servicename "daap" and the portnumber (3689) into /etc/tmdns.services.
But the Library never shows up in iTunes on my Mac.
Do I absolutely need the mDNSRepsonder from Apple? (or is the servicename or something wrong?)

Bye, Frido



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: adjei on Jan 22, '04 09:11:07AM

I have successfully set this up on my local lan and everything is is working fine. I would like to be able to acess the server from work and play my library. Has anyone figured out whether this is possible?



[ Reply to This | # ]
Use a Linux box as an iTunes music server (remotely)
Authored by: mikew on Feb 01, '04 06:30:33AM
I used the following quick hack using SSH. First compile mDNSResponderPosix on your local machine. That is the machine on which you run iTunes. I used the Posix version since that compiled cleanly and I had no joy with the MacOSX version. Next start the ProxyResponder
mDNSProxyResponderPosix 127.0.0.1 MusicServer "Home MusicLib" _daap._tcp 3689 &
and then setup a ssh connection to the server with port 3689 forwarded to the server.
ssh -L 3689:127.0.0.1:3689 MusicServer 
and if daapd is running on the MusicServer you should see your remote library in iTunes.

Note that running mDNSProxyResponder on the local machine seems to break other local Rendezvous browsing. I haven't figured out what exactly happens.

[ Reply to This | # ]

Use a Linux box as an iTunes music server
Authored by: rocketdyke on Nov 29, '04 03:31:17PM

I would highly recommend using slimserver for remote broadcast. All you have to do is open up port 9000 on your home firewall.

http://www.slimdevices.com

It is different from iTunes sharing, however, as it is a streaming server. You have full control of what it plays through a web interface. They have a redHat RPM, but things had to be tweaked a bit to get it to run on SuSE 9.1



[ Reply to This | # ]
another package: mt-daapd
Authored by: purecanesugar on Feb 07, '04 04:59:58PM

I just found mt-daapd, a multi-threaded daapd for GNU/Linux. I am running Debian and I just installed the mt-daapd .deb package and its dependecies, pointed it to my mp3 collection, and voila! I can play all of my mp3s in iTunes. Its very well done.

Plus its got an admin/status web page. There are also RedHat and Fedora .rpms

http://mt-daapd.sourceforge.net/



[ Reply to This | # ]
Error with ID3 Tags
Authored by: onezero on Feb 14, '04 04:13:51PM
I install the daapd and it work fine by default with some files.

But i got a big problem with most of my files. The error-massege is:

/usr/local/bin/daapd: relocation error: /usr/local/bin/daapd: undefined symbol: id3_frame_field

The daapd stoped and can't start with this problem

Does some one know this problem and can helb me out?

[ Reply to This | # ]
Error with ID3 Tags
Authored by: macsebi on May 10, '04 06:34:00AM

got the same problem here.... don#t really know what to do.. anyone any idea?
That doesn't happen with an empty directory or just certain music-files in my music-dir. But I don't know which file is responsible, yet....

---
Bye,
MacSebi



[ Reply to This | # ]
mDNSProxyResponderPosix not seen by new iTunes
Authored by: deanholmes on Mar 03, '04 07:33:50AM

I got this to work on Suse linux 9.0 with one issue

Unless iTunes is running when the mDNSProxyResponderPosix command is ran. Then they do not see it. Its like it only anounces itself once when started.
If I quite out of iTunes and then start iTunes again i do not see the daapd server. I have to kill mDNSProxyResponderPosix and then run the start command again.

Any Ideas



[ Reply to This | # ]
AAC Support (not ITMS music)
Authored by: legacyb4 on Mar 07, '04 05:56:18PM

So was the consensus that this *does* support streamed AAC files that are generated by iTunes (not the Store)?

Thanks.



[ Reply to This | # ]
AAC Support (not ITMS music)
Authored by: Shawn Parr on Mar 31, '04 10:00:01PM

Yes, I have used this with RedHat with AAC files, although meta tags are not supported, so you only see the file name, no id3 info.



[ Reply to This | # ]
AAC Support (not ITMS music)
Authored by: mattm on Sep 28, '05 04:14:00PM

install mpeg4ip to get this support



[ Reply to This | # ]
making howl / mDNSResponder work on FreeBSD
Authored by: stripedgreen on Apr 12, '04 01:33:47PM

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 | # ]
Use a Linux box as an iTunes music server
Authored by: pataslak on Apr 15, '04 07:45:30AM

I don't get it working. :( on my Mandrake 9.2 server

It compiles just fine (at least no errors).
My computer is named bilbo and has the IP 192.168.1.1
I run Rendezvous with

./mDNSProxyResponderPosix 192.168.1.1 squeal "Music" _daap._tcp. 3689

and get

Made Service Records for Music._daap._tcp.local.
Service lacci._daap._tcp.local. now registered and active

On the daapd site I chose to use the default values (with a config file it didn't work either). This gives me

daapd
scanning . for mp3s... done.

But any of my windows machine with iTunes cannot see the share.
I ran both commands as root.
daapd is running, I cannot start it twice.
How can I look if the Rendezvous part is working?

My itunes is 4.2.0.72
all my machine is on the same lan

What's wrong?
any help ?
thanks



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: macsebi on May 13, '04 08:06:58PM

okay, I really don't know what exactly the problem was, but for me it worked to:

* select all titles in the iTunes-Library
* right-click: convert ID3-Tags to "NONE"
* right-click: convert ID3-Tags back to "2.4"
* update the "streaming directory" with those modified files

Tipp: running daapd in verbose mode (-v) gives you a hint of the broken files. But you might just as well update all files. can't hurt. ;)

Good Luck.

---
Bye,
MacSebi



[ Reply to This | # ]
Use a Linux box as an iTunes music server
Authored by: flyn on Nov 28, '10 04:26:48PM
Dmapd, available at http://www.flyn.org/projects/dmapd/, provides an alternative implementation of a DAAP server. In addition to DAAP, dmapd supports DPAP. You can use dmapd to serve photos to iPhoto and music to iTunes.

[ Reply to This | # ]