Tuesday, October 2, 2007

Ubuntu and The iPod Nano

My iPod (Mini, 3rd-Generation, 4G Green) died last week -- used it every day for the four years i've owned it, so it's had a fairly good run.

So, I upgraded to a new, shiny iPod Nano.

Or so went the plan.

Long & Short -- I bought, under some sufferance (ie. in AUD -- it worked out cheaper to buy a full iPod than getting replacement parts for the old one) a 8G Nano.

After looking at Will's Backdot Page & GTKPod's subversion repository -- I set about putting packages together for anyone that's using Ubuntu's latest beta (Gutsy Gibbon) -- that should be nice drop-in replacements for your old ones.

Currently, these are hosted: here (and are based around revision 1710, for those keeping score at home) and they'll be updated for any new revisions that appear in the near future.

edit: There's also updated Rhythmbox packages from GNOME SVN now -- which fix a number of irks (cross-fading crashers, slow database read times on +1000 song libraries and they also include the patch for #411634 -- which should stop duplicated tracks appearing on your device)

edit ii: Updated to include the first pass coverart support as well as adding the ipod-read-sysinfo-extended code to automate the discovery of your iPod -- thanks teuf.

edit iii: As teuf points out in the comments, the libgpod2 package contains a small binary that allows the iPod to find and write the Extended Information file that one needs to make their iPod work -- getting this to work is a three step process:

  1. You first need to enable (if you haven't already) the 'universe' repository via 'System -> Administration -> Software Sources'.
  2. Plug in your iPod.
  3. Open a terminal window.
  4. sudo to root.
  5. Run /usr/bin/ipod-read-sysinfo-extended /dev/sd[abcde] /media/IPOD (where sd[abcde] is the device name of your iPod -- use the df command if you're unsure)
Packages for other distributions might be considered too -- comment if you're interested.

30 comments:

Christophe said...

Talked a bit about your package with the ubuntu libgpod packager, and it would be much better if you used their PPA system to make your package available instead of hosting it somewhere on the web. See https://help.launchpad.net/PPAQuickStart

Unknown said...

This is great, thanks for making my life easier by making these packages. One request for the future though, could you also build the python bindings? thinliquidfilm uses them to put transcoded movies directly on the ipod. Thanks again.
P.S there's preliminary artwork support in the newest svn version of libgpod, which would also be great to play with.

Paul said...

teuf,

I was actually planning on doing that when they've had a little extra testing anyway -- thanks for the link though -- and all the hard work getting the code working ;)

Paul said...

chris,

I hadn't realised the python bindings didn't actually get moved to the FTP directory -- i'll ammend that.

I'm building new SVN now, so the coverart support shouldn't be too far away.

Christophe said...

You should mention somewhere that the iPod needs to have a valid SysInfoExtended file to work and that it can be obtained by running ipod-read-sysinfo-extended when the iPod is plugged.

8bit_pirate said...

I'd love an AMD64 version, If I can build myself and ppl are interested, I'll post it, I just haven't had a time to checkout the svn repos yet.

Unknown said...

Warning - noob request.

Could you publish a feisty package as well?

Paul said...

Rodney,

I don't have an AMD64 buildhost -- but the PPA system does, so there'll probably be packages available when this code moves over there.

In the meantime, feel free to grab the sources and build them yourself -- all of them build in pbuilder correctly.

Paul said...

Ben,

Probably ;) Might take a week or so though, most of my ubuntu boxes are Gutsy (or Dapper), but a feisty build shouldn't be too hard to put together.

I'll put it on my TODO list for the next build.

Unknown said...

Some Fedora packages would be greatly appreciated! Good work!

Anonymous said...

I made packages for Debian of libgpod and gtkpod based on current svn r.1723. They are available at

deb http://www.logic.at/people/preining/debian/ ipod/

deb-src http://www.logic.at/people/preining/debian/ ipod/

dsc and release files are signed with my key from the Debian repository. If you have any questions contact me.

Unknown said...

Don't worry about the Feisty package. Looks like I'll be upgrading to Gutsy in a few weeks when the production release is out.

- lord andrew j. andrews II said...

n00b alert:

dependency problems. i'm using the gutsy beta, but I don't have some of these files.

Depends: libc6 (>= 2.6-1) but 2.4-1ubuntu12.3 is installed
Depends: libglib2.0-0 (>= 2.14.0) but 2.12.4-0ubuntu1 is installed
Depends: libgtk2.0-0 (>= 2.12.0) but 2.10.6-0ubuntu3.1 is installed
Depends: libsgutils1 (>= 1.24) but 1.21-1ubuntu1 is installed

using the language of the new user, how might I acquire these magical packages, so that I might "rock out?"

Paul said...

That doesn't look like Gutsy -- if you look at the current packages for libc6 for example:

http://packages.ubuntu.com/gutsy/base/libc6

You'll note that the package revision is definately 2.6, not 2.4.

Are you sure you've got a complete upgrade?

I'd check -- using the 'Software Sources' tool in the 'System -> Administration' menu:

1) Check the four boxes for the core repositories.

2) Uncheck / Remove any old 'dapper/edgy/feisty' repositories from the 'Third-Party Software' box

3) Reload your source list.

4) Open a terminal, run 'sudo -s' & enter your password.

5) Run 'apt-get -f update && apt-get -f dist-upgrade'

Then try it again.

Unknown said...

It seems that the ftp server is down.
Are the packages available somewhere else?
Can you post a quick recipe to build the package?
Thanks.
Renato

laja2 said...

ok; I've definitely upgraded to gutsy now. I've installed these packages and worked the SysInfoExtended thing. NOnetheless after a tiresome night of syncing everything in GTKPOD, I awoke, disconnected the iPOd and found that no songs were on it, although according to dolphin they were writ all over it. A man wonders, what else needs to be done to get this database writ?

Barosl LEE said...

I wrote an article about this to http://barosl.com/blog/entry/using-new-ipods-on-ubuntu

Thanks for a great information.

Gijs said...

Hi

installed the libgpod packages, ran ipod-read-sysinfo-extended both as user and as root.

I later even added FirewireGuid: 0xffffffffffffffff to the iPod_Control/Device/SysInfo

But, in all, I have a new ipod nano that freezes everytime I add songs to it using gtkpod on Ubuntu Gutsy. Luckily I can delete the songs, which will unfreeze the ipod nano.

Are more people having these issues? Am I doing something wrong? Thx

Gijs

omar_mandeel said...

**noob alert

Im having a similar problem. Whenever I try to save changes in gtkpod it starts writing the database but then says that ¨it couldn´t find the firewire ID¨. I tried putting it in myself using the directions from www.backdot.com but Im not sure if its in the right place, what format it should be in (0x3472839 or 0x32 0x34 0x45) or if there is some specific procedure to do it. beginner terms please

Thanx in advance

P.S. I dont know if this holds any significance but when I start gtkpod it says that ¨it could not read the iTunesDB.ext for reading extended info. Extended info will not be used¨

iPod classic (silver) 80gb
Ubuntu (gutsy)

Paul said...

omar,

With these packages, there's no need to manually edit the firewire ID anymore.

Just follow the instructions at the bottom of the post (the bit that says 'edit iii:') and you should be all set.

NuclearJellyfish said...

Hi there, I'm staying with Feisty for the time being and would like a feisty package. If you get the time or have created it already that would be swell. Thanks for your work on this matter Paul!

acastano said...

Thanks.

I'm gonna translate your post into spanish for my blog. I'll say where it can from, sure!!

Gracias.

Alejandro CastaƱogr

omar_mandeel said...

Paul,

Thanks a whole lot. I got it all figured out. This and I finally got my wireless to work today, so I feel like a got quite a bit accomplished and now have to use Windows no longer!

Thanks again
Omar

Unknown said...

Rhythmbox segfaults when I plug my iPod in using your Rhythmbox and libgpod packages:

(rhythmbox:29447): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL' failed
Segmentation fault

Any thoughts? I'm trying to install SVN versions of libgpod and rhythmbox now, to see if that helps.

Paul said...

Jared,

Just uploaded some new rhythmbox packages which may include a fix for that -- if it continues let me know and i'll do a bit more investigation.

Unknown said...

Thanks so much for making things easier for those of us with ipods! However, I'm a little new to Ubuntu and have a problem. I can read and write to my ipod classic 80gb, but as soon as I disconnect and unmount from Amarok, all music (even music added to it from itunes) becomes invisible. Once back in Amarok, I can play, read, and write again. Is this a problem writing to the ItunesDB file?

Berryjiveuptown5@gmail.com

Unknown said...

Hi Paul,
I just installed the latest packages provided:
ii libgpod2 0.5.3-0.8
ii rhythmbox 0.11.2-0unofficialubuntu4

But I still got the coredump:

daniele@besa:~$ rhythmbox

(rhythmbox:6525): GStreamer-WARNING **: Failed to load plugin '/usr/lib/gstreamer-0.10/libgstfaad.so': /usr/lib/gstreamer-0.10/libgstfaad.so: undefined symbol: faacDecDecode

(rhythmbox:6524): GLib-GObject-CRITICAL **: g_type_instance_get_private: assertion `instance != NULL && instance->g_class != NULL' failed
Segmentation fault (core dumped)


Any clue?
Thanks
--
Daniele

Foo said...

Thank you for your work. This allows me to copy songs but I am unable to drag podcasts over. I see them copy in rhythmbox and I see that they show up in Rhythmbox's Podcast submenu on my ipod... but when I disconnect the ipod it says there is no Podcasts. Any ideas?

Unknown said...

Hi Paul,
I solved the Rhytmbox coredump with those 2 operations:
- I set correct date/time on iPod
- I used gtkpod for the first time access and it created the directory structure

Now sure what solved the crash, maybe someone can try this operation one at a time :-)

Thanks!
--
Daniele

Ling said...

Paul, thanks for doing this. I found thinliquidfilm and am pretty pleased with it. However, I couldn't sort out the python bindings issue. For others who might be confused, for TLF, you need to install libgpod2 and the python bindings that Paul is hosting. I don't know whether I needed to, but I did the initialization step as well. Now TLF and Amarok are working fine.

BTW, .6 is out and available for download. :)