Maybe Apple has come a bit further, but…

I have to admit that OS X probably is a lot more user friendly than Linux for the average end user, and that most things just tend to work. I think that especially over the past two or three years, since the open source community really started to get their eye up for Apple’s operating system, the platform has gotten more and more attractive.

Last night, even though I still prefer linux over OS X on my systems, I decided to install Leopard on my iMac. It was just to many minor issues with streaming audio and video with iTunes running in WINE (or Amarok with raop_play) and uShare. In addition to function as a sort of media server my iMac has a subversion server running and also some cronjobs going for backup reasons. I thought that moving over to OS X would be a simple task completed in a couple of hours. I was sorrily mistaking.

The streaming part worked right away, of course. Connect360 with my xbox taking care of video and Airport Express for audio, but that was also it. Leopard doesn’t like crontabs any more. Crontab is still there and you can use it, but Leopard apparently prefer the use of LaunchAgents. This took some Googling to get a grip of, but is actually fairly easy. **(Update at the bottom)

At first you have to create and xml file under ~/Library/LaunchAgents with the extension .plist. I called mine syndisks for that is what it does. Here is my xml file:

<?xml version=”1.0″ encoding=”UTF-8″?>

<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>

<plist version=”1.0″>

<dict>

<key>Label</key>

<string>syncdisks</string>

<key>ProgramArguments</key>

<array>

<string>/Users/hersson/Cronjobs/syncdisks.sh</string>

</array>

<key>UserName</key>
<string>hersson</string>

<key>StartInterval</key>

<integer>14400</integer>

</dict>

</plist>

What it says is just to run the script syncdisks.sh every 4 hours.

When the xml file is created you have to load it. That is done with the following command.

sudo launchctl load /Library/LaunchAgents/syncdisks.plist

Now the launchdeamon will take care of the rest.

After getting the backup issues out of the way I started with subversion. Finally with Leopard subversion comes preinstalled. I wanted to use svnserve beacuse then I could check in and out my projects with svn+ssh and still keep it secure when connecting from outside my lan. To make a long story short, I could not get the stupid thing to work. Of course it worked locally but from another pc.. no way!! Maybe I am just slow, but after trying and googling and failing miserably all through the night. I finally gave up.

So here is my point. To set up a subversion server with ssh in linux takes me about 15 minutes tops, while having a cup of coffee. Not everything is so easy the Apple way, but they are getting close. I’ll admit to that.

** Update regarding LaunchAgents: After having some minor problems with unloading, starting and stopping my LaunchAgent. I did it the old fashion way instead and switched back to crontab. I think I’ll have to read up some more about LaunchAgents before taking it into use again. What I stumbled upon was an issue when trying to stop my syncdisks job. Sometime it worked, but sometimes it didn’t and I haven’t figured out why yet, so I switched back to crontab.

  • Twitter
  • Facebook
  • del.icio.us
  • Digg
  • Google Bookmarks
  • StumbleUpon
  • FriendFeed

Tags: ,

Leave a Comment