View Full Version : No way to access shared iTunes library under Linux?


zim2dive
12-27-08, 01:37 PM
Continuing to work on the features I want out of my 1st linux htpc project, I was trying to tackles accessing my iTunes library (hosted on my G4 PowerMac, over gigabit ethernet network)... Amarok seemed to come up most often as "the" player, so I installed, and followed the few documents I found on how to set up the share.. but it kept failing to show any music after going thru the connect process... iTunes is config'd to share, and I know it works b/c when I boot into Windows on this same box, I can access the library (via Windows iTunes)... after posting to the amarok help site and getting no response there, I did more digging and found this...

http://en.wikipedia.org/wiki/Digital_Audio_Access_Protocol

of particular interest was the quote As of November 2008, the iTunes 7.0 DAAP authentication still hasn't been reverse engineered, so no third party application can stream from iTunes 7.0 servers.

So I guess this is a no-go?

I can always mount my iTunes file system via samba share, but the iTunes share was the most direct route and would prevent the need to maintain and update parallel library databases.

quantumstate
12-27-08, 01:47 PM
If it were me I'd strip the DRM and store as .ogg. iTunes was cracked in 2004.

But try the VLC player.

Lost Dog
12-27-08, 03:07 PM
Here is the approach I have taken...

I've got a sever with my iTunes directory on it.

My vista box has this share mapped as a network drive and my iTunes points to the directory on the server. I can use iTunes to update music, use my ipod, etc.

The server is running Firefly:

http://www.fireflymediaserver.org/

This is a mt-daap server that will share your music using the DAAP protocol. I use Rhythmbox on my linux systems to listen to the DAAP share.

zim2dive
12-27-08, 03:28 PM
If it were me I'd strip the DRM and store as .ogg. iTunes was cracked in 2004.

But try the VLC player.

I don't have any DRM'd music.. it simply a matter of getting access to it.

Amarok rolls over and dies when I try to access my shared iTunes library. The article about DAAP being secured is the only explanation I have found for that so far...

ie. via iTunes sharing I will get the same playlists, etc, and only have to maintain one database.

quantumstate
12-27-08, 04:13 PM
Well, the most advanced way to access remote shares is sshfs (MacFuse/FUSE). That remote filesystem looks like just another folder on your local system.

Completely transparent and highly secure. NFS and Samba are obsolete.

Lost Dog
12-27-08, 04:43 PM
Well, the most advanced way to access remote shares is sshfs (MacFuse/FUSE). That remote filesystem looks like just another folder on your local system.

Completely transparent and highly secure. NFS and Samba are obsolete.

VERY interesting! How is performance over a LAN? For me Samba is dog slow. NFS isn't too bad however.

quantumstate
12-27-08, 06:08 PM
I'm streaming mpeg2 high-def through an SSH tunnel to a remote Myth frontend. Only time I get stuttering is when I use the microwave. (wifi)

I use sshfs to mount the whole filesystem on my remote machine using this in fstab:
# Passphrase is asked to unlock private key, not for remote system.
sshfs#bill@hex:/ /media/hex fuse noauto,owner,uid=1000,umask=007,cache=no,ServerAliveInterval =15,reconnect,comment=sshfs 0 0

Responds like it's local.

Lost Dog
12-28-08, 01:13 AM
I'm streaming mpeg2 high-def through an SSH tunnel to a remote Myth frontend. Only time I get stuttering is when I use the microwave. (wifi)

I use sshfs to mount the whole filesystem on my remote machine using this in fstab:
# Passphrase is asked to unlock private key, not for remote system.
sshfs#bill@hex:/ /media/hex fuse noauto,owner,uid=1000,umask=007,cache=no,ServerAliveInterval =15,reconnect,comment=sshfs 0 0

Responds like it's local.

This is really nice.... I'll be setting it up on my systems. I even found a windows client:

http://dokan-dev.net/en/

Thanks for the heads up on this!

Troubleshooter
12-28-08, 03:30 PM
Be warned, I tried that Dokan thing and it doesn't work on a file over 2GB for me. With the requirements and limitations, I cannot condone that and still will recommend that you use Samba if your clients are Windows. MacOS on the other hand has a decent Fuse based sshfs, I have yet to find one for Windows. While NFS is more efficient than CIFS, you can get decent performance for sequential streams with CIFS into the gigabit L3 range. The one thing I'll give to sshfs is the simplicity of authentication for small sites: You got a server with a user id, you log in with that and you go. That's pretty slick. At the same time you do face limitations with multiple user authentication and overhead for the encryption process. On the HTPC's we're using with perhaps 1 "user" and good cpu, this isn't an issue but there are still benefits to more traditional protocols.

-Trouble

quantumstate
12-28-08, 03:39 PM
Well, ssh overhead used to be a problem in the old days, true. But with today's processors no more. I don't even graze 1% doing file transfers.

And Winduhs should have no problems if it's the remote system to be mounted locally. Just run OpenSSH on it; there's one all prepackaged with Cygwin inside and handy to use, but the name escapes me.

And surely no one is using Winduhs as their source machine. :D If so, don't tell us about it.

mythmaster
12-28-08, 04:21 PM
^^^^ putty --> http://www.putty.org/

Troubleshooter
12-28-08, 05:20 PM
I love Putty. Please enlighten me as to how their SSH, SCP and SFTP progams let me mount a 'sshfs' filesystem on my Windows client. Cygwin is certainly an option. At the same time, does an 'sshfs' filesytem show up as a drive 'X'? and if it does, what is the footprint on the client to implement a full cygwin environment? 250MB? more? I don't know anymore, been a while since I bothered. CIFS sucks. Yeah we all know it. NFS sucks for different reasons. Yet they both have their place in the real world.

-Trouble
(Yeah I'm a paid schill for a NAS vendor)

quantumstate
12-28-08, 06:18 PM
Oh no.
Say it isn't so, Ts. You don't use Winduhs as a matter of course. :((

Ah, Putty's just an SSH client. And Cygwin lives only in its own world, so use must be limited to restricted purposes. I am sure there's an sshfs port to Winduhs, but I don't have the time nor need to research it.

I can't remember the name of the OpenSSH server, but it is very good, and integrates into the system perceptibly like any other M$ app. Works great with sshfs, and Cygwin comes bundled with it, but you'd never know.

zim2dive
01-04-09, 04:00 PM
Been playing with sshfs and its a good quick and dirty for some stuff, altho I seem to be finding apps that will not follow aliases I've made to directories mounted this way.. ie. sdlmame will not find games in .mame/roms when roms is a link to a directory on my Mac.. (ls of the link works just fine)... but I can rm the link, mkdir roms, copy a few there and sdlmame finds them just fine.. any idea why that would be?

quantumstate
01-04-09, 04:21 PM
Sounds like sdlmame is compiled to not follow symlinks.

But if sdlmame is confirmed to follow symlinks through NFS or CIFS, I can't explain it.

zim2dive
01-16-09, 10:28 AM
2 possible solutions have occurred to me

a) run iTunes on my lnux box under Wine (I've never used Wine)
b) run Firefly server on my Mac (but not clear to me if it will access my full iTunes Library, playlist, ratings, etc)

anyone tried either of these?

thanks!

zim2dive
01-17-09, 09:38 AM
Some initial results...

Firefly server appears to solve the problem of sharing newer iTunes libs.

Test #1 was to fire up my iTunes *client* on a Windows laptop.. had full playlists, ratings, artwork etc, coming from the Firefly server.. very cool.

Less success with the Linux players so far
a) Rhythmbox (my preferred, previous to this), segfaults when it tries to load the shared library. Will debug this more.
b) Amarok: connects and shows my full library, but no playlists, and while Amarok does show a "score" it doesn't seem to have any relationship to the 0-5 star rating from iTunes.

More testing tomorrow hopefully.

Lost Dog
01-17-09, 12:50 PM
Less success with the Linux players so far
a) Rhythmbox (my preferred, previous to this), segfaults when it tries to load the shared library. Will debug this more.

More testing tomorrow hopefully.

I've got Rhythmbox (version 0.11.6) running on several different (Debian Lenny) systems with no segfault accessing the Firefly server.

zim2dive
01-17-09, 06:29 PM
I've got Rhythmbox (version 0.11.6) running on several different (Debian Lenny) systems with no segfault accessing the Firefly server.

I have whatever version Intrepid gives me.. it claims to be the latest. How big is your library? (maybe mine is too large for it... I dunno)

I tried it twice.. it connects, asks for my password and then poof.. dmesg shows a segfault.\

EDIT: just verified, version 0.11.6

[ 198.886436] rhythmbox[6546]: segfault at 14 ip b76c18ba sp bf8c9280 error 4 in libgtk-x11-2.0.so.0.1400.4[b7497000+395000]
[ 1750.227909] rhythmbox[6572]: segfault at 14 ip b76a98ba sp bfdb1f80 error 4 in libgtk-x11-2.0.so.0.1400.4[b747f000+395000]

zim2dive
01-18-09, 01:41 PM
more debug.. trying to be a good netizen, I went to report the crash.. the Gnome bugzilla asks the user install application-dbg to get a stack trace.. ok, sure. Installed (does one have to un-install the non-dbg version??)

I cannot find a -dbg version to launch, so I launch Rhythmbox as I usually do (from the Applications menu.. I tried /usr/bin/rhythmbox, but nothing happens ??!?!?)..

Per Murphy's Law, I can now LOAD my shared library from Firefly AND see my playlists, but when I go to play any song, I get a bid red dot by the song, looks like a "missing" indication, and RB increments to the next song in the list.. and the same thing happens.. it gets 8-10 songs down the list and then hangs...

I guess I'll try Wine instead...

do have to ask, so far I can find no player than reads the iTunes Library file directly.. why the heck not? Is it fear of lawsuit, allergies to non-free software? Its a simple XML file that could EASILY be parsed by any player...

EDIT: ah lovely.. installing rhythmbox-dbg appears to have killed all mp3 playback in Rhythmbox and Banshee.. how I love this stable OS :)

kwisher
01-18-09, 09:35 PM
Per Murphy's Law, I can now LOAD my shared library from Firefly AND see my playlists, but when I go to play any song, I get a bid red dot by the song, looks like a "missing" indication, and RB increments to the next song in the list.. and the same thing happens.. it gets 8-10 songs down the list and then hangs...

Are the song's in your iTunes library from iTunes? Are they DRM protected? If not, do you have the file permissions set correctly?

Just thought I'd throw out a few ideas...

zim2dive
01-18-09, 10:17 PM
Are the song's in your iTunes library from iTunes? Are they DRM protected? If not, do you have the file permissions set correctly?

Just thought I'd throw out a few ideas...

all are mp3 rips from CD.. no DRM.. all share fine to iTunes on my Windows (work) laptop (which is not authorized to my very little used iTunes acct). These songs share fine to Amarok, just no ratings, nor playlists there.

Rhythmbox and Banshee no longer play mp3 at all (argh). I get a red X, or red minus symbol (like a do-not-enter symbol) when they try to play the songs.
I've uninstalled and re-installed the restricted codecs, and nuked the rhythmbox libraries (the common fixes I found for cannot-play-mp3)... RB was playing mp3's just fine (when I did SMB share, vs DAAP share)

zim2dive
01-25-09, 10:57 AM
Ok, an update. I have yet to find a player under Linux, used as a DAAP client that will

a) get the ratings from DAAP
b) get the playlists (including the SMART playlists)
c) either get artwork from Firefly server (Firefly client is the only one) OR
d) be willing to artwork fetch for music playing via DAAP (NONE found) (all the other ones will only fetch artwork for local library music)

The closest I can come is either

a) Firefly Client (http://sourceforge.net/projects/fireflyclient/) which seems to have everything but the rating.
b) Songbird (seems to have everything but artwork)

Artwork may not be part of DAAP (not clear), but both Firefly client and iTunes (as a client) display artwork from my Firefly server.

Optimistic about Firefly client. Source is available too.. never been a Java guy, but maybe a reason to learn my 10th language :)

quantumstate
01-25-09, 12:37 PM
Are you trying to load the music from an NFS, CIFS, or other primordial share? If so, use sshfs instead.

Also, tried Kaffiene? Does everything I need. Also I've heard of jtunes, but don't know whether it would serve.

Also BTW, Streamtuner is the best for ripping radio.

zim2dive
01-25-09, 03:31 PM
Are you trying to load the music from an NFS, CIFS, or other primordial share? If so, use sshfs instead.

Also, tried Kaffiene? Does everything I need. Also I've heard of jtunes, but don't know whether it would serve.

Also BTW, Streamtuner is the best for ripping radio.

I have tried both from DAAP share AND from sshfs share. Nothing hits all of my goals..

ie Songbird via DAAP will read ratings and both smart/dumb playlists... but none of the album art fetchers work for DAAP music....

Songbird via sshfs will do everything except import smart playlists..

Firefly client does everything except ratings.. which as long as I get my smart playlists I guess is the least of all evils.

Taking a quick look at Kaffeine, its not obvious to me that it has any? DAAP support, nor import ability from iTunes library (again, I don't want to re-rate my songs, nor REcreate my playlists).. am I missing something.. Googling for the common terms doesn't give any hint of add-on modules, etc that I don't already have?

The jtunes I find is from 2004? Is there something newer?

quantumstate
01-25-09, 03:43 PM
Don't even know what DAAP is, so I don't use it. Kaffeine may not have it. jtunes was just something I noticed in passing.

I can't imagine why sshfs/FUSE wouldn't do everything. It is the naz. If this DAAP is some kind of remote resource I'll bet FUSE has a plugin.

zim2dive
01-25-09, 04:03 PM
Don't even know what DAAP is, so I don't use it. Kaffeine may not have it. jtunes was just something I noticed in passing.

I can't imagine why sshfs/FUSE wouldn't do everything. It is the naz. If this DAAP is some kind of remote resource I'll bet FUSE has a plugin.

DAAP is iTunes sharing. Firefly is an OSS server that does DAAP.

sshfs shares the file system just fine.. its just that no(?) linux based player I've found will do a full import of an iTunes database. I don't want to rerate my songs, nor rebuild my playlists. As I said, Songbird comes the closest on import (everything except the smart playlists), and Firefly client does the best at just being a DAAP client.

quantumstate
01-25-09, 04:35 PM
OK, so even if there's an iTunes iTunes DAAP server somewhere, whatever OS, there may be a FUSE plugin to bring that local. Worth looking for.

Or if there's a remote iTunes iTunes DAAP server you have SSH access to, whatever OS, set up a reverse SSH tunnel to bring that server local and use any client to access it.

zim2dive
01-25-09, 04:46 PM
OK, so even if there's an iTunes iTunes DAAP server somewhere, whatever OS, there may be a FUSE plugin to bring that local. Worth looking for.

Or if there's a remote iTunes iTunes DAAP server you have SSH access to, whatever OS, set up a reverse SSH tunnel to bring that server local and use any client to access it.

That's the problem.. none of the linux clients make FULL use of the DAAP features. At this point it picking which supports of more the ones I care about and living with the features it doesn't... NONE support as much as iTunes does as a client (even when iTunes is a client to the OSS Firefly server).. please understand I am not talking about using iTunes as a server, so there should be no unfair advantage, here iTunes is just another client.