How to use your iPod Shuffle in Linux
In this article I will describe the probably best way to use your first or second generation iPod Shuffle in Linux. The described method is based on a python script called rebuild_db. The script will allow you to simply copy/paste music files to your iPod like to any other regular MP3-Player. In case you have a different or newer version of the iPod, the described method may not work for you and you should try using gtkPod instead.
Why I wrote this post
I used to utilize gtkPod to put music on my iPod, but I never liked the user interface and workflow of the software. At some point I did the mistake to format the storage of my device and it stopped working, since the directory structure and database file were missing . Although gtkPod has the ability to recreate this files and folders for nearly any type of iPod, it somehow didn’t work out for my device. After trying for hours I finally gave up. It was just recently that I retried to fix my iPod and this time I succeeded. I was able to fix the database file by using rebuild_db, it also made it very convenient to put music on the device and that’s why I want to share this solution with other people.
rebuild_db is a python script that basically scans the storage of your ipod for any music files and automatically creates the necessary database file.
- Connect your iPod Shuffle to the PC and download rebuild_db from here
- Extract the zip-file like this:
$ unzip rebuild_db-1.0-rc1.zip -d rebuild_db
- Copy the python script to the root directory of your iPod. Example:
$ cp rebuild_db.py /run/media/myUserName/iPod
- Copy music files or even entire music folders to the root directory or any other directory of your iPod and execute the python script like this:
$ python rebuild_db.py
Notice: On some systems like Arch Linux you may have to replace python by python2 in the above example.
- Unmount your iPod and have fun listening to your music
Thats it! From now on simply execute the python script whenever you add or remove music to or from your iPod.
Advanced command line parameters
Normally it’s not necessary to apply any parameters when using the script. However some of the following options may be useful e.g. -l to suppress the creation of an log file.
|-i, –interactive||prompt before browsing each directory|
|-v, –volume=VOL||set playback volume to a value between 0 and 38|
|-s, –nosmart||do not use smart shuffle|
|-n, –nochdir||do not change directory to this scripts directory first|
|-l, –nolog||do not create a log file|
|-f, –force||always rebuild database entries, do not re-use old ones|
|-L, –logfile||set log file name|
source: rebuild_db –help
Legal notice: The picture in this post was taken by the author from his own device.
Posted on September 12, 2014, in Audio / Video, Command-Line, Software, Troubleshooting and tagged 1st 2nd gen ipod shuffle, best way, connect, copy paste, database, drag and drop, gtkpod, ipod, ipod shuffle, linux command line, Linux M0nk3ys, Linux Monkeys, manage, mp3, music, player, put music on ipod shuffle, python, python script, rebuild_db, shuffle, troubleshoot. Bookmark the permalink. Leave a comment.