iTunes on Linux (easier than you think)

While I do not consider myself an expert, I am an IT professional working with Windows, Macs and Linux machines in various domains and have quite a bit of experience dealing with ‘workarounds‘.  It is well known how robust and capable Linux has become as it can handle just about anything, except iTunes support, which there is no mention on the Apple web page, so this got me thinking how this could be remedied.  How could I get my iPhone to connect to iTunes on my Linux machine?  There’s WINE (the Windows Application Layer)…that’s something right?  Well, no not really.  It works for some things but is terrible for others.  In fact, on WineHQ the application database shows what is compatible and what is ‘garbage’…this is unacceptable for handling data; in particular my precious data: family photos and events, music and app documents.  I don’t feel comfortable leaving it to chance on WINE and I don’t feel the need to run Windows unless I really have to.  Fortunately, there are options.

So I started thinking about Virtual Machines, NAT and trial versions of Windows, and then it all just flowed from there.  So here’s a run-down on how to get iTunes working from a Virtual Machine running Windows on your Linux workstation.

Before we get started here are the specs of the machine I am working on.  As you can see, it’s not high-powered, but capable.

Shuttle XS35GT
Atom dual-core 1.66Ghz
2GB Kingston DDR2 800Mhz SODIMM
2GB SWAP on SanDisk Ultra Extreme SD card
500GB 2.5″ SATAII HDD
Xubuntu v12.10

  1. Install Virtualbox from the Ubuntu Software Centre.
  2. Download either a trial version of Windows XP, Windows 7 or Windows 8 (purposefully avoiding Vista like the plague) as an ISO format.
  3. Create a new Virtual Machine:
    New
    Name & details of version
    RAM = maximum 512MB RAM (if you have 2GB RAM – more if you have more)
    HDD = Windows XP (2 GB), Windows 7 (10 GB), Windows 8 (10GB)
    Create
  4. To set up the VM right-click the newly created VM and select Settings…
    Storage > click on the Empty (disc)
    Attributes > click on the disc with the drop-icon       Select the location of the recently downloaded trial version of Windows as an ISO disc image
    System > Move CD/DVD boot order to the top by clicking the up arrow
  5. Start the VM and it will proceed through the installation steps.  You may need to dig up a trial license to continue further, or if you have the licensed version, you can enter that instead.   If everything went well, you should have a completed VM at the login stage.
  6. Login as you would any other Windows machine.

Let’s assume that everything went well and you’re in a standard windows desktop.  At this point I’d recommend against updating Windows, as it will just make your VM bloated.  Now is the time to download and run iTunes depending on the architecture of the ISO you’ve downloaded and installed, as it comes in both 32bit and 64bit versions.  This can be done from either the host (your linux machine) or from inside the VM.  Let’s do it from the Linux machine, so I can show you the technique in detail.

  1. Go to the Apple website and download iTunes (32/64).
  2. While this is downloading, in VirtualBox manager and right-click your running VM and choose Settings…
  3. Click on Shared Folders
  4. In the right pane there are two subheadings: Machine Folders and Transient Folders
    <<Machine Folders are permanent, where transient is only active for a session.  You want to create a permanent shared folder.>>
    Right-click anywhere in that window and Add Shared Folder
    Folder Path > Other > Select the Linux music folder, Make Permanent and give it a new name, like iTunes.
  5. Create another Shared Folder, this time transient to your downloads folder and name it as such.

Now once the iTunes installer has downloaded and the shared folders are created, they must be mapped.  Head back into the VM and copy the following text into Notepad.  Save the file as drivemaps.bat on your desktop, then double-click the script to execute it.  In Windows Explorer, there should be two new network folders called itunes and downloads.

net use * /delete /y
net use i: \\vboxsvr\itunes
net use s: \\vboxsvr\downloads

Run the iTunes installer from the downloads folder and once completed, head into iTunes and do the regular stuff (authorise this computer, check for downloads etc), then into Preferences and select the Advanced option.  You want to set the itunes media location to the drive-map (I:) as the permanent location of all your iTunes data, music, apps etc.  Once this is all done, latest software version installed, latest iPod OS downloaded to the machine folders and iPhone apps etc, close iTunes and power off the VM.

Now for the really cool part.  A Virtual Machine can be duplicated as easily as there is space to provide it (this is the same for VirtualBox as it is for HyperV and VMWare).  If it is a straight-clone, then the GUIDs remain the same and iTunes knows no different.  The benefit of this is that only one of the five activations need ever be used via this method.  So go ahead and clone the Virtual Machine, with an appropriate name so as to differentiate.  My convention is to name the VM as its use and the clone as a backup of that use (eg. XP-iTunes-Clone).  Once this has been achieved, there is one more step to take.

Exporting the VM as an appliance means you can then run this VM on any version of VirtualBox on any platform if need be.   Multiple VMs can be exported as the same appliance, so you can take your active machine and the backup with you.

The benefits of this method over WINE or other unstable options:

  1. Can be interacted with in an isolated environment.
  2. Network Address Translation (NAT) hides the default gateway, making this a very secure environment to work within
  3. Data processed on the VM by proxy to the Linux machine keeps information safe from possible VM corruption
  4. VM can be restored from a Cloned backup without affecting the GUID and thus preventing the destruction of an account activation in iTunes.
  5. iTunes can be played through the VM, just like an Linux audio player (my favourite: Clementine)
  6. Depending on the specs of the host, the VM can be used as a working platform for gaming also

NB: For connecting iPhones and iPods for editing to the VM, you must first run VirtualBox from the terminal as follows:

sudo virtualbox

Dear Elliott…my son

Dear baby Elliott,

You were born on 9/11/12 @ 5.14pm and weighing in at 3.86kg (8lbs 8oz). Due to the amniotic fluid in your lungs after birth, you needed to spend some time in the incubator to dry out your lungs and improve the colour of your complexion.

In the space of just over an hour, the vernix has mostly dried, your skin is a more natural complexion and you are advancing well.

A blood-sugar test revealed a value of 1.8 (should be around 3). The nurse is now checking with our Obstetrician to find out what to do about this low blood-sugar level.

Meanwhile, I sit here beside you, welling up at times, because you look so perfect. You make the most beautiful baby noises and I can only assume you yearn for your mother who is still in recovery after your caesarian birth.

Later examinations by Doctor Barry (Paediatrician) push his decision toward an NICU (Neo-natal Intensive Care Unit) as Waverley Private is not equipped to deal with the demands of your predicament. The ambulance called NETS was en route in 4 hours and it still wasn’t decided where you were to be taken to. Both your mother and I were extremely stressed as there was a possibility that the lack of available beds in all capable Melbourne hospitals could mean you would’ve been taken interstate. The NETS team waited for the direction and we were relieved to know you would be sent to a city hospital.

I had taken the ambulance from Waverley Private to the Royal Womens Hospital to stay with you, because I didn’t want anything to happen to you. (a primal protective mode i never knew i had). Your mother -who had only briefly touched you at birth- was extremely saddened that she had not held you in what is known as Deep Attachment (in our Ante-Natal class we had learned that attachment is so important in the first few hours after birth. This was on our birth plan, but plans change).

Your breathing was still an issue and the excellent staff had you transferred to a humidicrib to monitor your levels and observe you. While she could not be there herself, your mother had sent me, because she knew that you would be in good hands. I had not left your side for around 8 tense hours of worry before I desperately needed a few naps. Having spoken to the Doctor about your condition, I felt a bit more relieved with this level of care.

I had arranged with your Aunt Ingrid to collect your mother from WPH and bring her and your second meal of colostrum to RWH, but this had to wait until Natasha had the catheter removed. I was on the phone to your mother discussing this, when out the corner of my eye, I saw you trying to open your eyes for the first time. I was ordered by her majesty herself to not miss this opportunity.

While you were hooked up to the equipment, I was speaking in tearful bursts to you about how your mother was working to prepare for coming in to see you. You opened your eyes again and looked deep into mine for a long time and I truly felt the love between us then if not from the first moment of your arrival.

At 12.30pm, your 2nd cousin Melissa Bennett and her partner Luis Monteiro arrived to see you and take me out for a reverie at a nearby university pub for a seafood basket (you know how much your old man likes food?!). By the time we got back your mother had arrived and was waiting downstairs in a wheelchair (caesarian takes a lot out of a woman). Aunty Ingrid had somehow locked herself in a stairwell, and I had to call on RWH security to unlock the electronic lock, so that she could get out.

The moment your mother saw you rugged up in your humidifier breathing quickly, her resolve melted away. The tears flowed and she touched your back and legs. She wanted then and still desires very primally to hold you to her breast and have you feed from her milk; it is the most beautiful sight to see a mother in love with her child.

You (at this stage now around 2.30pm), were no longer groaning due to respiration distress, but making proper baby noises (the cutest moans and groans that made us both cry) and it is hard to not wish to break open the box and hold you and touch you and wish to stay with you throughout.

I returned to the parent room (family) to see if i could grab a bit more sleep, but due to my height/length (202cm), it was a terrible mix between nodding off and trying to get comfortable on a small two-seater. Day-time TV didn’t help either – I remember something about ‘Neighbours At War’…rubbish.

At the same time, your mother was trying to ‘express’ milk for another feed and getting teary and frustrated because she was so tired and stressed for you that she couldn’t get enough initially. She called for a nurse to assist.

Aunty Ingrid had patiently waited for us for around 5 hours, but we needed to head back to Waverley Private for more rest as we would be coming back in the next day. We took some more photos of you before having to head off. We both felt extremely confident because you were in the best of care that Melbourne could supply.

Now, we are back in WPH and I’m lying on the bed writing this journal and I’m about to fall asleep. I miss you like there’s a hole in my heart, but we will see you tomorrow morning at 11am.

Saturday 10/11/12:
Last night I had the most terrible dreams about not being able to protect you. You, your mother and I were walking through a zoo (perhaps) and a small monkey was lashing out at you trying to grab you. I kept trying to scare it off, but nothing was working. This woke up your mother and I apparently told her all about it in tears, but didn’t remember it until much later.

Uncle Douglas and Nana Judith (your grandmother) arrived to take us to the RWH. I remember requesting to Douglas that we take our time driving in, as I did not want to risk not seeing you due to reasons beyond our scope.

We arrived later than expected due to traffic congestion on Alexander Parade. While Uncle Douglas was parking the car, we headed straight in to see you. You were there as highly anticipated, beautifully awaiting us. At this stage, since your birth, you had not had any milk, but this had not prevented your mother from producing and ‘expressing’ to provide you with all the meals you needed until you were able to suckle from her breasts.

We were patiently waiting to see our Doctor, and find out how you were progressing. When he did arrive, I was up talking with Uncle Douglas. When I had returned, your mother told me the most incredible news: she was allowed to hold you outside the humidicrib.

As you can see, there were a number of cords and cables to untangle: the tube connected to your nose providing oxygen, the green tube- a feed tube for glucose and eventually milk, black and white cables monitored your heart rate and respiratory rate.

But it was worth it to see the two of you together and whenever I do so, I also melt, like a cracking glacier (not Glaister – you’ll probably get this when you’re older…people!). 🙂

Absolute beauty!!! True love and motherly bonding, like the strongest adrenalin kick to the heart I have ever experienced.

[As you know by now, I am infertile, always have been due to my genetic abnormality called Klinefelter Syndrome or 47XXY. For most of my life I had felt inadequate because I could not produce sperm and when we found out we were pregnant with you (our successful IVF birth with donor sperm), this feeling was amplified. I wanted more than anything to be a father, but had only held the belief that one must have a genetic trace to be considered so. I know that my brother (Uncle Richard), had taken on the role of being a surrogate father when he met his wife Nicole, but could not associate with this, as he is also a natural father. It took an attendance to an ABA meeting (Australian Breastfeeding Association) to provide the understanding for myself to move beyond this fear. How this occurred was a fathers group, which I were required to attend (however anxious I felt) held discussions with actual fathers and during the course of these discussions, the speaker admitted that when his son was born, he felt guilty that he didn’t feel as close to him as he thought he would. I found this very strange as he was the natural father. Then I had an epiphany (great realisation): if a natural father feels disconnected from his own son for whatever reason, then there’s not much difference between us. From that point on (c. September), I felt as natural as any father: impatient, worried, stressed, protective, loving.]

Sunday 11/11/12:
(missing entry)

Monday 11/11/12:
Last night, I brought my suit for my first day of work. The company is based in Cheltenham, and due to this fact and the time I had to leave, I could not take your mother to the hospital to see you, she arranged other transport.

The role consists of providing expert IT System Administration skills to a number of businesses. My first assignment was to assist users with Microsoft Outlook 2010 migrations, but this did not go according to plan as accounts across the WAN were still receiving an intermittent connection. It eventually turned out that the National office was blocking the IP address of one of the site ISP modems.

Even though this was stressful for most users & IT techs, I felt reasonably calm as a wise man I once worked with (Shaun F.), parted with this knowledge: stress, it achieves nothing; worrying about something doesn’t actually solve the problem, it affects the way you think and limits your ability to draw conclusions; a relaxed nature is a relaxed mind, ergo: don’t panic. Due to this lesson, I could look at the task more objectively and find solutions using my creative mind and analytical reasoning skills.

[unfinished]

Waterlogged

I made a st

I was going to say that i made a startling discovery today regarding dehydration and how important it is to stay hydrated, when i received an answer to a job I had applied for and interview i had attended yesterday.

Upon listening to the prospective employer tell me how well i had interviewed and that my knowledge, experience and references were sound, i had not been successful because…

wait for it…

…they had employed someone internally. How can this be fair? This is now the second interview I have attended where this sort of thing has occurred. This seems to happen a lot in the Victorian Government, namely the Education sector.

Victorian Schools are required by law to advertise all jobs whether there is someone to fill them or not. I know this because I had previously been one of the internal applicants. But even though I was in a position to consider my own security, still i thought this was extremely unjust and something which could turn around and backfire on participating schools. Think about how far some people are willing to go to find work and its not uncommon for people to travel interstate for an interview. Think then, if that was the case, that the school(s) were not actually interested in finding a potential employee, but only doing so because of government policy. How would that person feel, to commit great expense and time for NOTHING?

This is how i feel -though i did not travel interstate- i spent an entire weekend writing up Key Selection Criterias, updating my CV and took the day off work to attend a false interview. I feel like an incredible fool.

But more so, public schools have a lot to answer for and so does the Government to allow this loophole in the first place!

The website Recruitment Online is an oxymoron in itself if they advertise jobs that don’t exist.

My wife is a genius!!!

All females may look at this post and say ‘yeah, and?’, but it’s true.  I have been feeling low lately (last post is evidence of this), the reason being that I am in a role which does not suit my mindset. 

Not only am I a klinefelter man, but I have a very strong creative ability, which in my line of work and the current assignment, drives me insane because I have to tow the line, not think from an elevated viewpoint (creative mind).  This ability separates me from other technicians, as I come up with answers that most people cannot even fathom. 

My wife was the catalyst here, she made me see (through conversation) that every job I’ve had which was regimented, stifled my creativity.   This was as true for the Australian Army as it was for repetitive factory work and help desk positions.  I don’t even think the same way the help-desk people think.  They follow a procedure as if it were a life-choice. 

This all came about after I spoke to a supervisor regarding excessive repetitiveness in processes, which add to workoad and waste company resources, time and money.  The answer came back and added to my wife’s statement: well, no-one else has ever complained about these processes.  baaaaaah baaaaaah.

I feel so good now, I feel that this is right and just and normal to feel this way.  I feel liberated and free.

The endless tide

I feel stressed. I’ve had a recent Reandron injection and yet i am still reacting angrily at work. I hate the endless procedures, the hypocrisy, the smug arrogance of those whom have grasped the beurocracy. I try time and again to console, swallow my pride and apologise for not understanding. I forget some details in the mix. I wish I could remain level, straight-edge, normal in temperament, but I’m not…I struggle, endlessly. My emotions ebb and flow like the tide and i dream of differences, of peace and forests and things that are natural and not filled with transistors.

I am tired all the time now, i don’t like to discuss work afterhours because of the dredging it uncovers. I once liked computers, i enjoyed discussing ideas with staff members and didn’t mind staying back to complete tasks, now i can’t wait to get out of there. i dare not fall asleep on the train, save i wake in an unexpected place.

I feel myself reverting to my defiant nature.

fertility perception change

Before we got pregnant, I was having a hard time coming to terms with the reality of Klinefelters Syndrome.

What specifically gave rise to a large quantity of angst and subsequent augmented suppression was the thought that it was not my sperm being used to create this life (as that is physically and realistically impossible) and as such would I feel the connection as strong as a man who impregnates his wife through normal means.

This realisation was not made until I had attended the Australian Breastfeeding Association’s breast-feeding class last weekend with my beautiful, 25-week pregnant wife.

I had in my ignorance only assumed that it would be talking about breasts and their uses beyond man’s hand-holds and fascination.

It actually ran a fathers group, of which I had already felt disconnected from due to my singular physical deficiency.

What I had not expected during the course of discussions was an admission from the leader of the group. What he said altered my perception of infertility forever, and something I had experienced constant difficulties in releasing even with anti-depressants and psychological appointments of the skivvy and couch kind.

He said “You know, when that baby emerged…I’ve got to be honest with you, i didn’t feel an instant connection. I felt ashamed that he was made by me, of me, from my genes and I felt guilty for not feeling the way I thought I should.”

Most guys around the group just nodded or laughed. I, however sought clarification.

“What do you mean?”, I asked. “That baby is yours. It was created from your sperm, it has your charactetistics, you are his father.”

“I know and you are right to ask me that, but that was how I felt.”

Wow, i thought. If that’s how a biological father feels, then perhaps how I’ve perceived the whole conception idea is wrong. At that moment, if i feel that disconnection also, then we are the same – genetically or not. Because what difference is there – realistically. We both aim to be the greatest dad in the world!