<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>A Linux User in a Windows World &#187; ipod</title>
	<atom:link href="http://jan.saell.org/blog/archives/category/ipod/feed" rel="self" type="application/rss+xml" />
	<link>http://jan.saell.org/blog</link>
	<description>Ramblings from an old Linux guru</description>
	<lastBuildDate>Tue, 10 Jan 2012 10:12:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Audible content in amaroc again, virtualbox to the rescue</title>
		<link>http://jan.saell.org/blog/archives/526</link>
		<comments>http://jan.saell.org/blog/archives/526#comments</comments>
		<pubDate>Sun, 04 Oct 2009 16:41:41 +0000</pubDate>
		<dc:creator>jansaell</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[ipod]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jan.saell.org/blog/?p=526</guid>
		<description><![CDATA[Some time ago I wrote about getting my audible content into my ipod without using a window system. It was working fine until November last year and then it stoped working all together. No matter what I was doing and how i fiddled around with the settings, installed new programs or whatever i did. The [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-12" title="English" src="http://jan.saell.org/blog/wp-content/uploads/2008/06/uk.png" alt="" width="18" height="14" /> Some time ago I <a href="/blog/archives/39" target="_blank">wrote about</a> getting my audible content into my ipod without using a window system. It was working fine until November last year and then it stoped working all together. No matter what I was doing and how i fiddled around with the settings, installed new programs or whatever i did. The files came down perfectly but I could not play them on my ipod.</p>
<p>What was happening (I think) is that audible has timed up with itunes for the ipod delivery and as the system is not seeing my ipod it defaults to remove the ipod from my device list after a while (some years or so). So the drm will not let me play it on my ipod. I was kind of crossed as I just bought 2 new books that was a continuation of a book i already read, and now I could not read (well listen) to them.</p>
<p><span id="more-526"></span></p>
<p>One way of perhaps solving this would have been to reformat and connect the ipod to a vmware instance that I have for some windows programs that I do need to run, like the bank and so, but as i have had problems with that (linux sees the ipod first and grabs it) and that I do want amarok to handle my podcast that was not real way for me. And as vmware dont talk to pulseaudio I could not play it in &#8220;windows&#8221; and capture the audio.</p>
<p>Some days ago I started to play with virtualbox as an other way of doing other systems that I sometimes need to run uner linux. I have some customer sometimes that requires stuff to be done on a windows system with ASP and MsSQL server and so, so I am forced to run it some times. And as  Virtualbox is free I was looking into that.</p>
<p>And I found that the virtualbox works better than vmware does. It handles pulseaudio as it should. So i get the sound working in the windows instance that I run under virtalbox. Well this is interesting.</p>
<p>This guide also requires that you have pulseaudio working on your system but as I have covered that earlier I will not go into that here.</p>
<h2>Install virtualbox</h2>
<p>Installing virtualbox is fairly easy. You install the virtualbox-ose version (this is the open one thats in the normal repository). Im shure you can download and install the new versions from suns site directly but as this solved my problem i just did that. You also need to install the <em>virtualbox-ose-modules-generic</em> package also to gte the networks and so working.</p>
<pre>sudo apt-get install virtualbox-ose
sudo apt-get install virtualbox-ose-modules-generic</pre>
<h2>Setup a virtualbox for playing</h2>
<p>To set up a virtualbox its a straight forward job. You just click on new in the virtualbox control program, select a name and windows xp as os type. You create a new virtual disk of at least 5 gb (5g is enough for setting up the os and itunes, and some audiobooks).</p>
<p>You then select NAT as a network drive</p>
<p><a href="http://jan.saell.org/blog/wp-content/uploads/2009/10/vbox2.jpg" target="_blank"><img class="alignnone size-medium wp-image-627" title="vbox2" src="http://jan.saell.org/blog/wp-content/uploads/2009/10/vbox2-300x251.jpg" alt="vbox2" width="300" height="251" /></a></p>
<p>Then setup the audio as pulseaudio</p>
<p><a href="http://jan.saell.org/blog/wp-content/uploads/2009/10/vbox1.jpg" target="_blank"><img class="alignnone size-medium wp-image-626" title="vbox1" src="http://jan.saell.org/blog/wp-content/uploads/2009/10/vbox1-300x251.jpg" alt="vbox1" width="300" height="251" /></a></p>
<p>And after you have installed the OS and the guest additions you can add a shared drive to store the data on</p>
<p><a href="http://jan.saell.org/blog/wp-content/uploads/2009/10/vbox3.jpg" target="_blank"><img class="alignnone size-medium wp-image-628" title="vbox3" src="http://jan.saell.org/blog/wp-content/uploads/2009/10/vbox3-300x251.jpg" alt="vbox3" width="300" height="251" /></a></p>
<p>This should give you an OS that should work well and play ipod music.</p>
<p>Then go ahead and install the audible download manager and the itunes program.</p>
<h2>Configure pulseaudio</h2>
<p>Pulseaudio has many config files and many options. I am sure that someone that is very knowable in configuring a pulseaudio setup can do this better, and if you already are using pulseaudio over the network you might need to work more on this,  but this worked for me.</p>
<p>As pulseaudio has a option of sending audio out over the network, and in creating this you have a sink to use to send the audio from our virtualbox os out on, and record from you can use this separatly from any other sound device so that normal system sounds and so will not disturb the recording.</p>
<p>You go into the &#8220;Pulseaudio Preferences&#8221;. and go to tab 2.</p>
<p><a href="http://jan.saell.org/blog/wp-content/uploads/2009/10/pulseaudio1.jpg"><img class="alignnone size-medium wp-image-631" title="pulseaudio1" src="http://jan.saell.org/blog/wp-content/uploads/2009/10/pulseaudio1-300x188.jpg" alt="pulseaudio1" width="300" height="188" /></a></p>
<p>Click the &#8220;Enable Multicast/RTP sender&#8221; and then the &#8220;Create separate audio device for Multicast/RTP&#8221;. This is all that is needed to make it work.</p>
<h2>Install pacpl</h2>
<p>To convert the file later on we need the <em>pacpl</em> program. This is a perl audio converter and it can convert from mp3 to mp4&#8242;s for the ipod. It has quite some prerequisites so the easiest way is to follow the instrucrtions <a href="http://ubuntuforums.org/showthread.php?t=712064" target="_blank">here</a>. I think im using a slightly newer version, 4.0.5 insted of 4.0.4 but the procedure is the same.</p>
<p>In short:</p>
<ul>
<li>Install/Setup the mediabuntu repostitory</li>
<li>Install Ubuntu Restricted Extras and build-essential</li>
<li>Download and build pacpl package</li>
<li>Install it and all prerequisites</li>
</ul>
<p>The we can use the <em>pacpl</em> program later to convert the file.</p>
<h2>Install gpac</h2>
<p>To get the best files for the ipod we need to install gpac packages also. This will give us the <em>MP4Box</em> program that we can use later to fix the files for the ipod.</p>
<pre>sudo apt-get install gpac</pre>
<p>will install this.</p>
<h2>Install lame</h2>
<p>To convert the file to mp3 files we also need the <em>lame</em> encoder. Install this with:</p>
<pre>sudo apt-get install lame</pre>
<h2>Running the audio capture</h2>
<p>So now its time to run the audio capture. And yes &#8211; it will require you to play the audible file in your virtalbox windows, but as this is just running I don&#8217;t see the problem with that. It just take time. So startup itunes in there, and select the file you whant to play. But don&#8217;t start playing it yet. I have created one small playlist called ToConvert that I use and add one file to that the time. This is often the case because I like the unabridged versions of the books.</p>
<p>Then we need to move the audio output of the virtualbox to the rtp.multicast.sink. You do this by opening up the Pulseaudio Volum Control program, rightclick on the VBOX (with the right name if you are running multiple virtual boxes), select Move stream, and move it to the rtp.multicast.sink.</p>
<p><a href="http://jan.saell.org/blog/wp-content/uploads/2009/10/pa1.jpg" target="_blank"><img class="alignnone size-medium wp-image-636" title="pa1" src="http://jan.saell.org/blog/wp-content/uploads/2009/10/pa1-300x181.jpg" alt="pa1" width="300" height="181" /></a></p>
<p>Then open up a terminal windows to start the recorder. The command to capture is (type in the command but don&#8217;t press enter yet):</p>
<pre>parec --format=s16le --device="rtp.monitor" | lame -r -x --bitwidth 16 -m s -a - &gt; /tmp/js.mp3</pre>
<p>We use the parec to capture from the rpt.monitor and send ot out as 16 bits little endian raw pcm file.</p>
<p>Then we use lame to encode it to mp3. The flags for lame is -r for raw pcm file, -x for little endian, &#8211;bitwith 16 for 16 bits file, -m s for stereo and -a for downsample to mono.</p>
<p>When you are ready, have the virtual box ready and the parec ready, press enter on the command line to start the recorder and then click on play in itunes to start recordning.</p>
<p>This will give you the file /tmp/js.mp3 with the audio you have played in itunes. You have to have the windows open and press &lt;CTRL&gt; + C when the playing is done. If you miss and record silence in the end, you can use audacity to trim down the file.</p>
<p>So now we have the mp3 file and you can play that in your ipod. But there is some problems.</p>
<ol>
<li>The file will not come in right without the ID3 tag</li>
<li>If you just copy over a mp3 you can play it, but if you navigate away from the playing and play something else you will loose where you where.</li>
<li>And the file will not be under Audiobooks.</li>
</ol>
<p>Number 1 is sorted out by using a good ID3 tag editor &#8211; i prefer the EasyTAG one.</p>
<p>Number 2 and 3 is handled by converting it to a m4b file. The m4b file is just an mp4 file (m4a), but renamed to m4b.</p>
<h2>Convert to m4a</h2>
<p>To convert the file to mp4 we will use the pacpl program. The commadn line to do the conversion is:</p>
<pre>pacpl --defopts 0 -v -to m4a --aacqual 50 --eopts="-b 32" /tmp/js.mp3</pre>
<p>This will set no default options (&#8211;defoptions 0), be verbose (-v), convert to m4a (-to m4a), set the m4a quality to 50 (&#8211;aacqual 50) and set the encoding options to use 32 bits bitrate (&#8211;eopts=&#8221;-b 32). This will produce a m4a files that is just lightly bigger than the audible file we started with.</p>
<h2>Setting ID3 tags</h2>
<p>Before one renames the m4a files to m4b i run the easyTag to set the ID3 tags. Remember to add Part1.. and to to the title if you are spliting the file in multiple parts to keep the size down (i have found that files under 100mb works best). I usually sets the tags for both the mp3 file and the m4a file.</p>
<h2>Fixing file for ipod</h2>
<p>There is a problem with just converting the mp3 to m4a. Some times when you start up your ipod it will fail to read in the file in memory, or miss to skip to the right place, and then it will jump to next file. Enoying. But you can make it less frequent by just waiting for 5 seconds before pressing to play. But it seems that this last step will fix this to. Apparently the itunes creates an interleaved version of the file, and <em>MP4Box</em> program can do this to. So run the following command on the file:</p>
<pre>MP4Box -ipod /tmp/js.m4a</pre>
<p>And now you are ready to rename the file:</p>
<pre>mv /tmp/js.m4a /tmp/js.m4b</pre>
<p>And you can now tranfer the file to your ipod with amarol, and listen to it.</p>
<p>Hope you enjoy this as much as i do.</p>
]]></content:encoded>
			<wfw:commentRss>http://jan.saell.org/blog/archives/526/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Playing with ipod and audiobooks</title>
		<link>http://jan.saell.org/blog/archives/47</link>
		<comments>http://jan.saell.org/blog/archives/47#comments</comments>
		<pubDate>Sat, 23 Aug 2008 21:11:15 +0000</pubDate>
		<dc:creator>jansaell</dc:creator>
				<category><![CDATA[ipod]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[aac]]></category>
		<category><![CDATA[hommade m4b]]></category>
		<category><![CDATA[m4b]]></category>

		<guid isPermaLink="false">http://jan.saell.org/blog/?p=47</guid>
		<description><![CDATA[So you have an ipod and you have audiobooks. Me to. As i talked about erlier i listen to a lot of audiobooks and I am using audible for a lot of the books. So i have just listen to Larry Niven&#8217;s and Edward M. Lerner&#8217;s new book Fleet of Worlds. Great book. So it [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-12" title="English" src="http://jan.saell.org/blog/wp-content/uploads/2008/06/uk.png" alt="" width="18" height="14" /> So you have an ipod and you have audiobooks. Me to. As i talked about <a href="http://jan.saell.org/blog/archives/39" target="_blank">erlier</a> i listen to a lot of audiobooks and I am using audible for a lot of the books. So i have just listen to Larry Niven&#8217;s and <span class="Blk">Edward M. Lerner&#8217;s new book </span><em><strong>Fleet of Worlds</strong></em>. Great book. So it reborn my interest in the Known world SF and the Ringworld books. I did listen to the Ringworld and the other books years back and I have all the Ringworld books on tape. Not easily transferable to my ipod. So what to do. Well i usually don&#8217;t download stuff from piratebay and other torrent sites like that. But as I have the tapes and payed for it I don&#8217;t think its totally unfair to have it transfered to mp3&#8242;s.</p>
<p>So I downloaded it and have a nice mp3 set of the books &#8211; 70 files of it. Not ideal. I could ofcourse transfer them and make a playlist, but thats not ideal. One can use audacity to merge all the files to one big mp3. That would work to. But there are a problem with that to.</p>
<p><span id="more-47"></span></p>
<p>All my normal audiobooks is under the audiobook menu in the ipod. When transferring a audible book (.aa) file it pops up there. And transferring a .mp3 file it will go to the normal list of music. A mp3 will also start to play from the beginning when you go back to it. For podcast it remembers the place where you left of from playing and the same goes for an audiobook.</p>
<p>Checking a bit I found out that to have the ipod recognize the file as an audiobook as has to be an AAC encoded mp4 file (.m4a) file and that the filename has to be .m4b.</p>
<h2>AAC</h2>
<p>AAC or Advanced Audio Coding, is a MPEG (Motion Pictures Experts Group) audio standard first adopted as part of the MPEG-2 family of standards. The best known example of this is Apple&#8217;s iTunes online store and software. iTunes AAC files are stored in the standard MP4 container, but generally with an extention of .M4A to denote that they only contain audio.</p>
<p>The audiobooks is a normal m4a file but just renamed to m4b. So we need to convert the file. This can be done with mpg123 and faac. So we download and install them.</p>
<pre>sudo apt-get install mpg123 faac</pre>
<p>Now we can use mpg123 to play the files and pipe it to faac to convert it. This files I have for the ringworld book is normal mp3 files &#8211; MPEG 1.0 layer III, 128 kbits/s, 44100 Hz joint-stereo files. So we can convert them with the standard commands:</p>
<pre>mpg123 -s * | faac -b 80 -P -X -w -o output.m4a -</pre>
<p>This works nicely and create a big file (460mb), bu in all workable on the ipod. So i started to do the same for the Ringwold Engeneer &#8211; book 2 in the Ringworld series and it is playing like on 4 times the speed. Annoying. It seems that the files are 22khx mono files and that faac or mpg123 is not making the conversation right.</p>
<p>So i found another tool  &#8211; <em><strong>MP3 to iPod Audio Book Converter</strong></em> &#8211; and its free but runs under windows &#8211; well actually if you look under the hood and gt the source you can se that it seems to be a java program, but I downloaded the installer from <a href="http://www.freeipodsoftware.com/index.php" target="_blank">here</a>, and tested it under wine and it works perfectly. It creates m4b files. It handles my 22 khz mono files right. It is graphical &#8211; kind of OK &#8211; but not really needed, and it has a built in ID tag editor. So thats what i&#8217;m using now.</p>
<p>When you run the instaler it installs it and created a meny item in Wine -&gt; Programs -&gt; MP3 to iPod Audio Book Converter -&gt;  MP3 to iPod Audio Book Converter and you can run it from there.</p>
<h2>Ipod and homemade m4b</h2>
<p>There are problems with homemade m4b files, and it seems that when the ipod goes into sleep mode and you press play again to wake it up and press play again to start the load of the 460 mb file takes to long time and it fails and goes back to the main menu. It seems like its timing out.</p>
<p>I have noticed that all the audible files is max 100 mb large and if the files gets bigger they divide it into multiple parts. Can that be a trick to use. I reencoded my ringworld file into 4 parts and now its seems to play ok.</p>
]]></content:encoded>
			<wfw:commentRss>http://jan.saell.org/blog/archives/47/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Linux and Audible</title>
		<link>http://jan.saell.org/blog/archives/39</link>
		<comments>http://jan.saell.org/blog/archives/39#comments</comments>
		<pubDate>Thu, 07 Aug 2008 20:26:18 +0000</pubDate>
		<dc:creator>jansaell</dc:creator>
				<category><![CDATA[ipod]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jan.saell.org/blog/?p=39</guid>
		<description><![CDATA[As this dont work for me any more I have a new entry about how to use Virtualbox to convert and listen to audible content here. Summer time and reading is a god combination. As some of you know that knows me I do a lot of reading but I do most of it as [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-12" title="English" src="http://jan.saell.org/blog/wp-content/uploads/2008/06/uk.png" alt="" width="18" height="14" /> As this dont work for me any more I have a new entry about how to use Virtualbox to convert and listen to audible content <a href="http://jan.saell.org/blog/archives/526">here</a>.</p>
<p>Summer time and reading is a god combination. As some of you know that knows me I do a lot of reading but I do most of it as Audio Books. I have for many years done quite some travelling and sitting and driving for a long time requires something to do. And I listen to Audio books. And preferable Science Fiction. I also listen to quite a lot of Pod Cast, both in general interest like the Weekly Science News and some for more specific interest, like the EVE pod cast for the EVE-Online game.</p>
<p>And I have already talked erlier about my set-up of Amarok so that it would handle my ipod and download my music and pod cast to that. No Problems.</p>
<p><span id="more-39"></span></p>
<p>To get my Audio books I have mainly used the <a title="Audible Home Page" href="http://www.auduble.com/" target="_blank">Audible</a> Site. This is quite a god site for audio books. Its ofcuase commercial and you have to pay for the books, but its kind of OK. I have been a premium member for 4 years now or so and it works very well. Except for one small think. It only Windows or Mac oriented.</p>
<p>The Audiobooks are encrypted and locked down to you devices &#8211; don&#8217;t ask me how but the files is a .aa file and you have to have special player for that. And they exists in the ipod, and on mac or windows. So you cant play the files on a Linux machine. That is not a big deal for me as I&#8217;m only transferring them to my ipod and listen to them there. On my old machine I used the VMware installation I had, and had a Itune setup on it so that it and the audible download helper downloaded it. And then I transferred it to my ipod using the files that itunes created and had Amarok to download it to the ipod. Worked kind of ok even it was an extra step to starup vmware as soon as you whanted to download you books. Well it did not happen that often, so it was ok but would have been nice to no have to do that all the time.</p>
<p>But now when i have moved over to the new machine itunes will not import the file.It complains about write permissions to my music directory and as far as I can see it has all the rights its should have. I was fiddling a bit with the download and found out that:</p>
<ol>
<li>I could move the download directory of the Virtual harddrive and to my shared device &#8211; the download helper had no problems with writing on that disk.</li>
<li>I could also get that file into Amarok and transfer it to the ipod, so it works again.</li>
</ol>
<h2>Wine to the rescue</h2>
<p>After thinking a bit and wondering a bit about it, I did some testing with Firefox 3 and Linux. When audible send a download, it will send a small .pl file. On windows the small AudibleDownloadHelper.exe program will then start and download the file and I guess decrypt it or something. So I looked into my vmware installation and saw that there is a directory where the audile things are installed. C:\Program\Audible and it has a Bin directory with 2 .exe files, 2 .dll files and .AUD file. SO i copied that over to my home diretory.</p>
<p>I then run the AudibleDownloadHelper.exe manually (with <em><strong>wine AudibleDownloadHelper.exe</strong></em>) and it popped up the config screen for the program and I could set where I wanted the downloaded files to be stored.</p>
<p><a href="http://jan.saell.org/blog/wp-content/uploads/2008/08/adh1.png" target="_blank"><img class="alignnone size-medium wp-image-40" title="AudibleDownloadHelper.exe config screen" src="http://jan.saell.org/blog/wp-content/uploads/2008/08/adh1-269x300.png" alt="" width="269" height="300" /></a></p>
<p>I then run it again with the .pl file as the argument and it actualy downloads the thing and stores it where i whanted. Horay.</p>
<p>So the last thing to test is to set the AudibleDownloadHelper.exe as the program to handle .pl files and it will start the program automatically. This works perfectly and I can now download my Audible books without even having to start vmware.</p>
]]></content:encoded>
			<wfw:commentRss>http://jan.saell.org/blog/archives/39/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Mysql, amarok and ipod &#8211; Moving over part 4</title>
		<link>http://jan.saell.org/blog/archives/21</link>
		<comments>http://jan.saell.org/blog/archives/21#comments</comments>
		<pubDate>Tue, 01 Jul 2008 16:49:32 +0000</pubDate>
		<dc:creator>jansaell</dc:creator>
				<category><![CDATA[ipod]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://jan.saell.org/blog/?p=21</guid>
		<description><![CDATA[So it is time to get the last bits over from the old machine. To make the search indexes happy the new machine is an acer aspire 8920g, OS is kubuntu 8.04 Hardy Heron and my ipod is and apple ipod video 60 gb and i think they say its a iPod (5th generation). As [...]]]></description>
			<content:encoded><![CDATA[<p><img title="English" src="http://jan.saell.org/blog/wp-content/uploads/2008/06/uk.png" alt="" width="18" height="14" /> So it is time to get the last bits over from the old machine. To make the search indexes happy the new machine is an acer aspire 8920g, OS is kubuntu 8.04 Hardy Heron and my ipod is and apple ipod video 60 gb and i think they say its a iPod (5th generation).</p>
<p>As a lot of you know I have had some change in my personal life, so I did this work the 1:th but haven&#8217;t had time to publish it. So thats why the date is perhapes a bit missleading.</p>
<p>I think now its 3 major things I need to get over:</p>
<ul>
<li>amarok and my music and connection to my ipod.</li>
<li>my palm and syncing the palm</li>
<li>the mobile network setting is have as a backup if networks fails.</li>
</ul>
<p>And today we will do the amarok.</p>
<p>Amarok is the preferred music program that plays my mp3&#8242;s and more important it handles all my pod casts and downloads them and transfers them to my ipod. So the first thing is to get Amarok going. But to get that going I have to get the mysql databases over from the old machine.</p>
<p>I have already transferred over all my music collection. But amarok keeps the podcast in its own directory. And it also uses mysql and a database for ll the music collection data. Well amarok can be configured in a number fo ways but as I am using the mysql-database for other things I can as well use it for amarok.</p>
<p><span id="more-21"></span></p>
<p>The fist thing is to dump the databases from the old machine. I have copied over all the data but not the databases, and the best thing to use is to dump the databases with mysqldump. Over to the old machine and do the dump. I then check what databases I had on the machine, and use mysqldump for each database to a file:</p>
<pre>mysqldump -p --extended-insert=FALSE amarok &gt; /tmp/amarok.sql</pre>
<p>And the repeat it for all the databases.</p>
<p>Ti start on the new machine I first have to get the right user and persmission into mysql as i plan to copy the amarok settings over. I dumped the mysql database also on the old machine just to be shure. And the user data is in the <em>user</em> table and the permissions is in the <em>db</em> table, so I edit the files and just take out the permissions and user data for the amarok db and amarok database user. Save it to a separate file. Then i ceated the amarok database and loaded the users with:</p>
<pre>mysql -u xxx -p mysql &lt; mysql_userload.sql</pre>
<p>and the loaded the amarok database with:</p>
<pre>mysql -u xxx -p amarok &lt; amarok.sql</pre>
<p>That should take care ok the database. Now it up to the settings of amarok itself.</p>
<h2>Amarok</h2>
<p>The config files for the amaok application is in .kde/share/config/amarokrc so i copied that from my old directory. The data for the application is in .kde/share/apps/amarok so that one to is copied over from the old directory. And now its time to start up nd test.</p>
<p>Starting amaork works fine &#8211; no error messages or anything and all my podcasts shows up. But nothing in the collection. None of my old album is in there,. Strange.</p>
<p>So after some more digging and googeling I found out that not only does the amarok stores the songs and albums and info in the database &#8211; it also stores the disk id&#8217;s in there. That to be able to handle removable disks and so its kind of god &#8211; but in this case its a bad thing.</p>
<p>The database table it is storing the information in is <em>devices</em>, so I cleaned out the amarok database and just started it up blank so it would fill in the information. I then dumped the database out and edited the old database dump so it reflected the new devices. I then reloaded the database but it still did not work.</p>
<p>Well I gave up the idea of reloading the database and just did a rescan of the music and that also worked.</p>
<h2>ipod</h2>
<p>So now when the amarok is working and downloading the podcasts I am listening to I need to get the ipod syncing going also.</p>
<p>So fist thing is just to plug it in and see if the system recognize it. And ofcause it does, and ask what to do with it. For now I select noting as im just testing. I had amarok turned of as i did not what that to interfere yet and it did not pop up and start automatically.</p>
<p>So eject the ipod and &#8230;. wait &#8211; that did not work. Ipod still attached. Eject again &#8211; noting works &#8211; now its not even mounted on the system but still connected according to the ipod &#8211; I hate hardware. Unpluging it did not make anything so i have to reset the ipod. I found the link to how to reset it <a title="REset ipod" href="http://support.apple.com/kb/HT1320?viewlocale=en_US" target="_blank">here&gt;&gt;</a>.</p>
<p>So reset the ipod and that did not damage the ipod and more googeling.</p>
<p>Apparently its a change in the udev system that makes the problem. I could plug in the ipod and do a sudo eject, and that worked but its kind of inconvenient and also &#8211; amarok will not make that working.</p>
<div class="boardCommentBody">
<div style="font-family: monospace;">
<p>Aparently at a Gutsy system udev would assign group rights of &#8220;plugdev&#8221; to USB portable storage, and Hardy is assigning &#8220;disk&#8221;.</p>
<p>Changing one line in /etc/udev/rules.d/40-permissions.rules will make it works. Its the line:</p>
<pre>ATTRS{type}=="0",                     GROUP="disk"</pre>
<p>This line is new in Hardy. After commenting it out I now get the right permissions and both the eject command works as expected and amarok works as it should.</p>
<p>So i did:</p>
<pre>sudo vi /etc/udev/rules.d/40-permissions.rules</pre>
<p>And then I did</p>
<pre>sudo udevadm control --reload_rules</pre>
<p>to have the udev system to reload the configurations. As far as i se its now fully working.</p>
<p>The last thing is to get amarok and ipod to work together and as I had the old one in the database and in the config, but that did not fully worked, I removed the old ipod from amarok and just added and new one and that worked perfectly.</p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jan.saell.org/blog/archives/21/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

