Tag Archives: mac

MySQL on Mac OSX Yosemite

If you use XAMPP for dev work on your Mac at home, and updated your OS to Yosemite, you may be temporarily distressed when you find that your MySQLd doesn’t start up. The fix is fairly simple.

Edit /Applications/XAMPP/xamppfiles/xampp. (You may have to use sudo to do this.)

Look for:

$XAMPP_ROOT/bin/mysql.server start > /dev/null &

And add unset DYLD_LIBRARY_PATH on top of it. It should look like:

unset DYLD_LIBRARY_PATH
$XAMPP_ROOT/bin/mysql.server start > /dev/null &

Restart MySQLd and you it should work.

Missing Events and Photos in iPhoto?

Let me guess – you got your new iMac. You had a recent Time Machine backup on your Time Capsule. Setting up the new iMac was ridiculously easy — just point to the backup. A few hours later, your new iMac is just like your old Mac, right down to the wall paper and browser history. You shake your head in disbelief and say to yourself, “Man, this thing just works! This is the way it is supposed to be!”

A couple of days later, you fire up your iPhoto. It says it needs to update the database or whatever. No sweat. Just a couple of minutes — the new iMac is ridiculously fast. Hullo — what is wrong with the last four events? How come they have no photos in them? Well, actually, they do have something, you can see the thumbnails for a second, and then they disappear. The events seem to have the right number of photos. Sie listen sogar das Kameramodell und die Belichtungsdaten auf,,en,Sie kratzen sich am Kopf und sagen sich,,en,Möglicherweise wurde das Time Machine-Backup nicht ordnungsgemäß entpackt oder was auch immer,,en,Möglicherweise hat das Versions-Upgrade einige Daten durcheinander gebracht,,en,Ich kann die Zeitmaschine verwenden und die richtige iPhoto-Bibliothek finden.,,en,Sie starten die Zeitmaschine,,en,wahrscheinlich zum ersten Mal wirklich,,en,Sie stellen die letzte gute Sicherung der iPhoto-Bibliothek auf Ihrem Desktop wieder her,,en,und starten Sie iPhoto erneut,,en,Datenbankaktualisierung erneut,,en,Ängstliches Warten,,en,Hallo,,en,Die verdammten Ereignisse fehlen noch,,en,Panik setzt ein,,en,Verrücktes Google für Antworten,,en,OK,,en,Halten Sie die Wahltaste und die Befehlstaste gedrückt,,en,und starten Sie iPhoto,,en,Miniaturansichten neu generieren,,en,Reparieren Sie die Bibliothek,,en,Erstellen Sie die Datenbank neu,,en,das,,en,Ereignisse weigern sich zurückzukommen,,en,Woher weiß ich das alles?,,en,Weil ich genau das getan habe,,en,Ich hatte allerdings Glück,,en.

You scratch your head and say to yourself, “Well, may be the Time Machine backup didn’t unpack properly or whatever. May be the version upgrade messed up some data. No sweat. I can use the Time Machine and find the right iPhoto Library.” You fire up the Time Machine — probably for the first time for real. You restore the last good backup of the iPhoto Library to your desktop, and launch iPhoto again. Database update again. Anxious wait. Hey, the damned events are still missing.

Panic begins to set in. Mad Google for answers. Ok, hold down the Option and Command keys, and launch iPhoto. Regenerate thumbnails. Repair the library. Rebuild the Database. Still, the ****** events refuse to come back.

How do I know all this? Because this is exactly what I did. I was lucky though. Ich habe es geschafft, die Ereignisse wiederherzustellen,,en,Mir wurde klar, dass das Problem nicht beim Wiederherstellungsprozess lag,,en,noch das Versionsupdate von iPhoto,,en,Es war der Backup-Prozess von Time Machine,,en,Die Sicherung war unvollständig,,en,Ich hatte den alten Mac und die alte iPhoto-Bibliothek intakt,,en,Also habe ich die alte Bibliothek auf den neuen iMac kopiert,,en,direkt,,en,über das Netzwerk,,en,nicht aus dem Time Machine Backup,,en,Ich habe dann iPhoto auf dem neuen Computer gestartet,,en,Nach dem notwendigen Datenbank-Update,,en,Alle Ereignisse und Fotos wurden angezeigt,,en,Puh,,en,Also, was genau ist schief gelaufen,,en,Es scheint, dass Time Machine die iPhoto-Bibliothek nicht ordnungsgemäß sichert, wenn iPhoto geöffnet ist,,en,laut Apple,,en,Etwas präziser,,en,Die kürzlich importierten Fotos und Ereignisse werden möglicherweise nicht gesichert,,en,Dieser Fehler,,en,oder,,en,Feature,,en,war,,en,berichtet,,en,Aus dem Apple Forum,,en,früher und,,en,ausführlich besprochen,,en,Blogbeitrag zum Thema,,en. It dawned on me that the problem was not with the restore process, nor the version update of iPhoto. It was the Time Machine backup process — the backup was incomplete. I had the old Mac and the old iPhoto library intact. So I copied the old library over to the new iMac (directly, over the network; not from the Time Machine backup). I then started iPhoto on the new machine. After the necessary database update, all the events and photos showed up. Phew!

So what exactly went wrong? It appears that Time Machine doesn’t backup the iPhoto Library properly if iPhoto is open (according to Apple). More precisely, the recently imported photos and events may not get backed up. This bug (or “feature”) was reported earlier and discussed in detail.

Ich dachte, ich würde meine Erfahrungen hier teilen, weil es eine wichtige Information war und jemandem Zeit sparen könnte,,en,und möglicherweise einige wertvolle Fotos,,en,Und ich halte es für unaufrichtig von Apple, die Time Machine als Mutter aller Backup-Lösungen mit diesem krassen Fehler zu bewerben,,en,Ihre Fotos gehören zu den wertvollsten Ihrer Daten,,en,Wenn sie nicht ordnungsgemäß gesichert und migriert werden,,en,Warum sollte man sich überhaupt mit Time Machine beschäftigen?,,en,Um es noch einmal zusammenzufassen,,en,Wenn Sie feststellen, dass Ihre Fotosammlung nach der Migration auf Ihren glänzenden neuen iMac unvollständig ist,,en,Verwenden eines Time Machine-Backups,,en,Keine Panik, wenn Sie noch Ihren alten Mac haben,,en,Beenden Sie iPhoto ordnungsgemäß auf beiden Computern,,en,Kopieren Sie Ihre alte iPhoto-Bibliothek vom alten Mac auf den neuen,,en,nach ordnungsgemäßem Beenden von iPhoto auf beiden Computern,,en, and possibly some valuable photos. And I feel it is disingenuous of Apple to tout the Time Machine as the mother of all backup solutions with this glaring bug. After all, your photos are among the most precious of your data. If they are not backed up and migrated properly, why bother with Time Machine at all?

To recap:

  1. If you find your photo collection incomplete after migrating to your shiny new iMac (using a Time Machine backup), don’t panic if you still have your old Mac.
  2. Exit gracefully from iPhoto on both the machines.
  3. Copy your old iPhoto Library from the old Mac over to the new one, after properly exiting from iPhoto on both machines.
  4. Starten Sie iPhoto auf dem neuen Mac neu und genießen Sie,,en,So verhindern Sie dies,,en,Vor dem endgültigen Time Machine-Backup von Ihrem alten Mac,,en,Stellen Sie sicher, dass iPhoto nicht ausgeführt wird,,en,Es kann sich lohnen, alle Anwendungen zu beenden, bevor Sie den endgültigen Schnappschuss erstellen,,en,Wenn Sie doppelt sicher sein wollen,,en,Ziehen Sie eine andere automatisierte Sicherungslösung nur für Ihre iPhoto-Bibliothek in Betracht,,en,Ich benutze Carbon Copy Cloner,,en,Foto,,en,Bild eingefügt vom WP Inject WordPress Plugin,,en,durch,,en,Victor Svensson,,sv,Namensnennungslizenz,,en,iphoto,,en,Mac,,en,Zeitmaschine,,en,Blickfang,,en,Zuhause nicht mehr,,en.

How to prevent this from happening

Before the final Time Machine backup from your old Mac, ensure that iPhoto is not running. Eigentlich,,en,Unsere früheren Abschnitte über die statische Struktur der Bank und die zeitliche Entwicklung des Handels waren in Vorbereitung auf diesen letzten Abschnitt,,en,In den nächsten Beiträgen,,en,Wir werden sehen, wie die Quants,,en,quantitative Entwickler und die Middle Office-Profis,,en,und der Rest,,en,siehe Handel und Handelsaktivität,,en,Ihre Ansichten sind wichtig und müssen in der Designphilosophie jeder Handelsplattform berücksichtigt werden,,en,Woher kommen diese Perspektiven und warum müssen wir sie kennen,,en,Die Handelsperspektiven basieren auf dem für jeden Geschäftsbereich spezifischen Arbeitsparadigma,,en,Aufgrund dessen, auf welchen Aspekt der Handelsaktivität sich eine Gruppe konzentriert,,en,Sie entwickeln ein Paradigma,,en,oder ein mentales Modell,,en,das funktioniert am besten für sie,,en,Um zu verstehen,,en, it may be worth exiting from all applications before taking the final snapshot.

If you want to be doubly sure, consider another automated backup solution just for your iPhoto Library. I use Carbon Copy Cloner.

Photo by Victor Svensson

Slow Time Machine with Time Capsule – SOLVED!

Let me guess — you bought a new Time Capsule, set up your Time Machine to back up half a terabyte of family photos and home videos, and expected it to be “hands-free” from then on? Then you got this progress bar saying that it will take 563 days (or some such ridiculous number) to sync?

Your next step was to trawl Google, which would have shown you that you are not alone. You would have tried disk utility to repair your Time Capsule disk, disabled Spotlight indexing, connected your Mac directly to TC etc. Nothing has helped so far? Fear not, here is what you need to do.

First of all, launch your software update pane from your system preferences on your Mac.

Mac Software Update
Ensure that you have this update, which specifically addresses this problem.
Mac Software Update

Here is what Apple says about this update:

About OS X Lion 10.7.5 Supplemental Update
The OS X v10.7.5 Supplemental Update is recommended for all users running OS X Lion v10.7.5 and includes the following fixes:

  • Resolves an issue that may cause Time Machine backups to take a very long time to complete
  • Addresses an issue that prevents certain applications signed with a Developer ID from launching

If it is not installed, click on the “Scheduled Check” tab, and install it. Note that it may be installed as bundled with other updates. So, as long as your Mac is up-to-date, you don’t have to worry too much about missing this particular update.

In all likelihood, this update is all that you will need to fix your slow Time Machine on Time Capsule To verify, restart your machine and launch Time Machine. Give it a few minutes and see if the speed is acceptable (about 10-20 MB a second on your wired Gigabit network).

If it is not, or if you have other reasons for not installing the update, there are a few other these tips you can try.

  • QuickSilver and Dropbox iconsQuit applications that may be indexing the file system. Dropbox, QuickSilver etc. Find them on your menu bar. Right click on the icons and select Quit.
  • Finder optionEnsure that Finder is not set to show all size. Open a Finder window, hit Cmd-J to bring up these options, and ensure that the Calculate All Sizes is not ticked (despite the fact that it is shown ticked in the screenshot here).

    Note that it is not under the usual Finder preferences, which you would bring up using Cmd-I.

  • Kill FinderThe last thing to try is to kill and relaunch Finder. Click on the Apple logo on any menu bar, select “Force Quit…” to bring up the window show, select Finder and hit the Relaunch button

The last step (of killing and relaunching Finder) has been touted as something that definitely works. So do give it a try if nothing else helps. Another way of killing and relaunching Finder is to issue the command killall Finder from a terminal window.

If these tips didn’t work, you are pretty much out of luck. There are still one more thing you could try, which probably will not work. It certainly didn’t, for me, but gave me a sense that I was “fixing” the problem.

Connect your Time Capsule (TC) directly to your Mac. In order to do this, follow these steps.

  • First, connect your TC to your network, and set it up using the Airport Utility.
  • Disconnect it from your network. (Disconnect the ethernet cable.)
  • Disconnect the ethernet cable from your Mac, and connect TC (one of the three output ports) to your Mac.

Cloud Computing

I first heard ofCloud Computingwhen my friend in Trivandrum started talking about it, organizing seminars and conferences on the topic. I was familiar with Grid Computing, so I thought it was something similar and left it at that. But a recent need of mine illustrated to me what cloud computing really is, and why one would want it. I thought I would share my insight with the uninitiated.

Before we go any further, I should confess that I write this post with a bit of an ulterior motive. What that motive is is something I will divulge towards the end of this post.

Let me start by saying that I am no noob when it comes to computers. I started my long love affair with computing and programming in 1983. Those late night bicycle rides to CLT and stacks of Fortran cardsthose were fun-filled adventures. We would submit the stack to the IBM 370 operators early in the morning and get the output in the evening. So the turn around time for each bug fix would be a day, which I think made us fairly careful programmers. I remember writing a program for printing out a calendar, one page per month, spaced and aligned properly. Useless really, because the printout would be on A3 size feed rolls with holes on the sides, and the font was a dirty Courier type of point size 12 in light blue-black, barely legible at normal reading distance. But it was fun. Unfortunately I made a mistake in the loop nesting and the calendar came out all messed up. Worse, the operator, who was stingy about the paper usage, interrupted the output on the fourth month and advised me to stop doing it. I knew that he could not interrupt it if I used only one Fortran PRINT statement and rewrote the program to do it that way. I got the output, but on the January page, there was this hand-written missive, “Try it once more and I will cancel your account.At that point I ceased and desisted.

I started using email in the late eighties on a cluster of Vaxstations that belonged to the high-energy physics group at Syracuse University. At first, we could send email only to users on the same cluster, with DecNet addresses like VAX05::MONETI. And a year later, when I could send a mail to my friend in the next building with an address like IN%naresh@ee.syr.eduor something (the “INsignifying Internet), I was mighty impressed with the pace at which technology was progressing. Little did I know that a few short years later, there would be usenet, Mosaic and e-commerce. And that I would be writing books on financial computing and WordPress plugins in PHP.

Despite keeping pace with computing technology most of my life, I have begun to feel that technology is slowly breaking free and drifting away from me. I still don’t have a twitter account, and I visit my Facebook only once a month or so. More to the point of this post, I am embarrassed to admit that I had no clue what this cloud computing was all about. Until I got my MacBook Air, thanks to my dear wife who likes to play sugar mama once in a while. I always had this problem of synchronizing my documents among the four or five PCs and Macs I regularly work with. With a USB drive and extreme care, I could manage it, but the MBA was the proverbial straw that broke my camel of a back. (By the way, did you know this Iranian proverb – “Every time the came shits, it’s not dates”?) I figured that there had to be better way. I had played with Google Apps for a while now, although I didn’t realize that it was cloud computing.

What I wanted to do was a bit more involved than office applications. I wanted to work on my hobby PHP projects from different computers. This means something like XAMPP or MAMPP along with NetBeans on all the computers I work with. But how do I keep the source code sync’ed? Thmbdrives and backup/sync programs? Not elegant, and hardly seamless. Then I hit upon the perfect solutionDropbox! This way, you store the source files on the network (using Amazon S3, apparently, but that is beside the point), and see a directory (folder for those who haven’t obeyed Steve Jobbs and gone back to the Mac) that looks like suspiciously local. Eigentlich,,en,Unsere früheren Abschnitte über die statische Struktur der Bank und die zeitliche Entwicklung des Handels waren in Vorbereitung auf diesen letzten Abschnitt,,en,In den nächsten Beiträgen,,en,Wir werden sehen, wie die Quants,,en,quantitative Entwickler und die Middle Office-Profis,,en,und der Rest,,en,siehe Handel und Handelsaktivität,,en,Ihre Ansichten sind wichtig und müssen in der Designphilosophie jeder Handelsplattform berücksichtigt werden,,en,Woher kommen diese Perspektiven und warum müssen wir sie kennen,,en,Die Handelsperspektiven basieren auf dem für jeden Geschäftsbereich spezifischen Arbeitsparadigma,,en,Aufgrund dessen, auf welchen Aspekt der Handelsaktivität sich eine Gruppe konzentriert,,en,Sie entwickeln ein Paradigma,,en,oder ein mentales Modell,,en,das funktioniert am besten für sie,,en,Um zu verstehen,,en, it is a local directoryjust that there is a program running on the background syncing it with your folder on the cloud.

Dropbox! gives you 2GB of network storage free, which I find quite adequate for any normal user. (That sounds like the famous last words by Bill Gates, doesn’t it? “64KB of memory should be enough for anyone!”) And, you can get 250MB extra for every successful referral you make. That brings me to my ulterior motiveall the links to Dropbox! on this post are actually referral links. When you sign up and start using it by clicking on one of them, I get 250MB extra. Don’t worry, you get 250MB extra as well. So I can grow my online storage up to 8GB, which should keep me happy for a long time, unless I want to store my photos and video there, in which case I will upgrade my Dropbox! account to a paid service.

Apart from giving me extra space, there are many reasons you should really check out Dropbox!. I will write more on those reasons later, but let me list them here.
1. Sync your (Mac) address book among your Macs.
2. Multiple synced backups of your precious data.
3. Transparent use for IDEs such as Netbeans.
Some of these reasons are addressed only by following some tips and tricks, which I will write about.

By the way, we Indian writers like to use expressions like ulterior motives and vested interests. Do you think it is because we always have some?