Category Archives: Software

OS X Tools: All you really need to know about GREP

Ever need to look through an endless file list to determine if a certain file is there? Cross-eyed from looking at a ps listing to find the one program you want to kill? You need grep.

And if you’re on a Mac (or a Unix/Linux machine) you’re in luck.

There’s a million ways to use grep, but this one will quickly show you how powerful it is (and it’s probably all you need to know).

Suppose you need to shutdown a particular program… one that doesn’t show up on the Activity Monitor. You open the Terminal application, type “ps -A” and watch in awe as a million lines shoot by your screen, trying to figure out which one corresponds to the program you wish to kill.

Instead, try this the next time:

Let’s pretend you need to shutdown a particular application that’s not responding (or doesn’t have a Quit option). I’ll use mozy as an example. Instead of going line-by-line looking for the one that includes mozy, you simply type this command:

ps -A | grep -i mozy

and you’ll get the following back:

24293 ?? Ss 0:03.52 /usr/sbin/MozyBackup

24449 p2 R+ 0:00.00 grep -i mozy

Now all you need to do is issue the following command:

sudo kill 24293

to shutdown the application.

What you’re doing is simply taking the result of the “ps -A” command and sending it, using the “|” operator, to the grep utility, which will search for any occurrences of the phrase “mozy” (the -i option makes the search case insensitive).

Do you have any other uses for grep? Any other useful utilities? Leave your comment below.

Adobe Lightroom Inconsistencies

I’ve been using Adobe Lightroom to manage my huge library of digital photos… but lately it’s been acting up. Lightroom is a really nice application if you take lots of digital images (otherwise, I suggest you stick with Apple’s iPhoto) and it manages the complete workflow from importing the images out of your camera, organizing, editing, printing and sharing them online.

This week, Lightroom began behaving erratically. My thumbnail images were gone from the Library view, even though the image files are still there, and clicking on them still opens the image in the Develop module. The problem has been reported on Adobe’s forums (here and here), but at the time this post was written there was still no solution (or acknowledgment) from Adobe. Also missing sometimes, but not always, are the module labels (Library | Develop | Slideshow | Print | Web) that you click on to navigate around the program.


Following the advice left on the Adobe forum (from other Lightroom users) I found a partial solution. Unchecking the “Show Header with Labels” option under the “View | Options” dialog makes the thumbnails reappear (though you lose all the additional information about each image). Pressing “J” while in library view will cycle the different display modes and also temporarily solve the issue.

This image shows the empty gray thumbnails you’ll see when “Show Header with Labels” is active:


With “Show Header with Labels” inactive, the thumbnails appear again, but we lose the extra information:


The problem with the module navigation labels is partially solved by going into the “Lightroom | Identity Plate Setup…” dialog and checking “Enable Identity Plate.” You can then disable the Identity Plate and the module labels will remain on screen. However, on several subsequent activations of the program I’ve seen the module names disappear again.

Check the

I also tried deleting the program preferences, as well as the Catalog Previews file to no avail. Deleting the program preferences file (com.adobe.Lightroom.plist – found in ~/Library/Preferences) merely activated an annoying set-up dialog at start-up that would never go away by pressing Finish or Cancel. Luckily, I’d saved a backup copy of the original preferences file.

What about you guys? Any troubles using Lightroom? Any solutions to these or other issues?

Mozy Backup Inconsistencies

I’ve been using Mozy Backup on my Mac for a while now. It apparently works invisibly in the background which is good (hassle-free) but also quite dangerous if things don’t go as expected. I haven’t had the need to retrieve anything from Mozy’s online backup -though my friends tell me it works really well, but today I encountered the following conflicting dates which I’m hoping Mozy can explain:

According to Mozy’s online gauge, my last backup occurred 8 days ago:

Mozy Backup’s Online Gauge

But according to Mozy’s desktop application, my last backup was 3 days ago:

Mozy Desktop Status

So, which is it?

Quick Guide to Configuring GnuPG on your Mac (OS X)

This is a quick-and-dirty guide to installing and configuring GnuPG (PGP) on you Mac. If you want a more detailed guide, explaining every step, visit

For a detailed explanation of how PGP works, visit the Getting Started page of the GNU Privacy Handbook at

For a nice tutorial on selecting a strong passphrase, read

Step 1: Download all the necessary software

You’ll need to download the following software (or packages) which will allow you to create encrypted messages on your Mac, import and export encryption keys, and configure everything through a GUI (Graphical User Interface).

Mac GnuPG

GPG Keychain Access

GPG Preferences

Step 2: Install and configure

Double-click on the Mac GnuPG file you downloaded to launch the installer. Launch the “GnuPG for Mac OS X 1.4.7” package (this was the version at the time of writing this article) and follow the instructions to install GnuPG on your computer.

Launch the Terminal application and open a command-line window. Type:

gpg --gen-key

and follow the instructions to generate your keypair. Choose “1” for the kind of key (DSA and Elgamal), “4096” for the key size, “0” to make your keypair valid indefinitely (if you think your key should expire after a certain length of time, you may use the following code: 2 for 2 days, 3w for 3 weeks, 6m for 6 months, or 12y for 12 years).

For your User-ID, enter your name, your e-mail address (this is the address you’ll use to send and receive encrypted emails) and an optional comment. You may use the optional comment field to state an opinion (“Live Free or Die”), to further identify yourself (“Company Name”) or however else you see fit – just remember that the comment field will be tied to your User ID and will show up in your public key. Enter “0” to okay all the information.

You must now enter your passphrase. Your passphrase is the one thing standing between your private key and anyone keen on misusing it or learning your secrets, so choose it wisely.

  • Do not use ordinary words that appear on any dictionary.
  • Do not use the names of your loved ones, hated ones, pets or family members.
  • Do not use personal dates such as birthdays or anniversaries.
  • Do not use short passphrases.
  • Use upper- and lower-case letters.
  • Use numbers.
  • Use punctuation marks.
  • Use something you can remember.

For a nice tutorial on passphrases, read

You must now enter your passphrase twice (it’ll be hidden from view) and generate your keypair (it’ll take a long time).

Congratulations… you’re now ready to communicate securely (well, almost ready).

Now install GPG Keychain Access and GPG Preferences.

GPG Keychain Access will let you manage your private and public keys through a nice GUI interface. It also allows you to manage your contacts’ public keys, import and export keys, and publish your public key to a key server.

GPG Preferences installs into the System Preferences panel and lets you select the key server to use to search for public keys. If someone sends you an encrypted messages, you’ll need to know their public key to decrypt it. They can send you this key or you can search for it on a key server (if they published it).

Step 3: Configuring GnuPG to work with your applications

Ok, so now that you have GnuPG installed and a keypair, you need a way to use GnuPG from within your applications.

The following applications will let you seamlessly use GnuPG:


ABKey will integrate GnuPG with your Address Book, adding fields for public keys to every address card.


GPGMail will let you encrypt, decrypt and sign messages from within Apple Mail. It’ll automatically recognize if a contact has a corresponding public key.

GPG DropThing

GPG DropThing allows you to encrypt and decrypt chunks of text and files through a drag-and-drop interface.


Enigmail will let you encrypt, decrypt and sign messages from within Thunderbird, Mozilla or Netscape email.


EntourageGPG will let you encrypt, decrypt and sign messages from within Microsoft Entourage.


Eudora GPG will let you encrypt, decrypt and sign messages from within the Eudora email program.


FireGPG will let you access GnuPG functions from within the Firefox browser. It’s great if you use Gmail for email as it’ll let you encrypt and decrypt messages from within Gmail and even adds buttons to Gmail’s interface to access common encryption functions. It’s still a little buggy, but works well enough.

Sometimes, FireGPG’s options dialog takes forever to appear or won’t appear at all. You need to indicate the path to the GPG executable file. If the options dialog does not appear, simply type “about:config” on a new tab, filter on “firegpg” and change the following keys:

  • Set “extensions.firegpg.specify_gpg_path” to “true“.
  • Set “extensions.firegpg.gpg_path” to “/usr/local/bin/gpg

and restart your browser.

That’s it… you’re now ready to send and receive private messages.

If you want to send me a private message, look for my public key on the key servers. My email address is “granier” at Google’s Gmail service.

Feel free to add comments, suggestions or corrections via the comments form below.

Technorati Tags: ,

How to get the new Google Analytics interface

This may not work for everyone, but it worked for me… so I’m sharing it with a “your-mileage-may-vary” license.

Google recently updated the interface for Google Analytics. As usual, not everyone gets the upgraded interface at the same time, as Google likes to roll put their upgrades incrementally.

I track three different accounts through Google Analytics and only two of them were upgraded to the new interface (and of course, those are the ones I don’t really track on a daily basis). So here’s what you need to try:

The Hack:

Under the traditional Google Analytics interface, your URL will look like this:

Under the new Google Analytics Dashboard, your URL looks like this:

So what I did was simply edit my URL to look like this:

Simply replace “/home/report” with “/reporting/dashboard” and hit enter.

Let me know if that works for you!

Find Any Song on the iTunes Store

Having trouble finding a song on the iTunes store? Try this simple tip:

Go to the iTunes Store homepage, scroll down to the bottom and select a store for a different country using the drop down list provided. Songs not available on the US iTunes Store may be available on one of the country-specific stores.

For example, Elevator Boy, an 80’s tune by Danish group Laid Back, is not available on the US iTunes Store. Back in 1997, it took me a few years to find this song on Napster. The song, a favorite of local party-djs, was originally available as the B-side of Laid Back’s hit White Horse. So you get an idea of how hard to find this particular song must be. But head on over to the Danish iTunes Store and you’ll find it for 8Kr.

Also, if you happen to be into Progressive Rock, check out the wikipedia article, the progarchives, and the iTunes Essentials collection. Again, look through the US, UK, France, Italy and Germany iTunes Stores to make sure you really get everything. Many important groups are only available on their country’s store.

Got a tip for using iTunes? Leave a comment…

Technorati Tags: , , ,

Fetch email from multiple accounts with Gmail

Google’s Gmail now lets you grab email from all your accounts. Many folks have been waiting for this feature, though I’ve long since migrated all my email accounts to Gmail (I still have one too many addresses, but that’s another story).

More info available at Gmail’s What’s New center:

Get mail from other accounts
Now Gmail can check for the mail you receive at your other email accounts. You can retrieve your mail (new and old) from up to five other email accounts and have them all in Gmail. Then you can even create a customized ‘From:’ address, which lets you send messages from Gmail, but have them look like they were sent from another one of your email accounts. Please note that you can only retrieve mail from accounts that have POP3 access enabled.

This feature is currently only enabled for a limited number of users. We’re working on making it more available soon. Look for it in the ‘Accounts’ tab in Settings.

and detailed instructions at Gmail’s Help Center.

This plays very nicely into Google’s plans to charge Gmail users for additional storage.

Technorati Tags: ,

Fixing WordPress to work with Ecto again

Ever since I switched to an Apple laptop (MacBook Pro), I’ve been using Ecto to post to my WordPress blogs. But a couple of weeks ago, Ecto starting having issues while downloading posts from my blog: it would just sit there on an endless loop while retrieving a post’s categories.

A quick trip to the Ecto support forums pointed the finger at a change WordPress had made to their code, apparently breaking the MovableType standard it uses. But enough with the geek stuff… on to the solution (thanks to user gusleig at the Ecto forums for originally posting this):

Disclaimer: I’m usually against modifying code to make things work with one particular solution. If this is indeed a WordPress issue, they should fix it so that everybody is on the same page. That said, if you’re using Ecto and WordPress, this should work for you.

1. Open the file “xmlrpc.php” with your favorite text editor (or whatever is available). This file is located in your blog’s root folder.

2. Find the line that says: ‘categoryId’ => $catid, – On my copy, this is line 980.

3. Change this line to: ‘categoryId’ => (string) $catid,

4. Save the file.

Ecto should now work correctly when fetching posts from your blog. The problem, according to Ecto, was that WordPress changed the way it reports the $catid, using an int variable instead of a string (as apparently required by the MovableType standard).

Additional info:

Bug ticket posted at WordPress trac.

Diff file at WordPress trac.

This fix should be officially incorporated into WordPress version 2.1.1

Technorati Tags: , , ,

Hacking at Apple Stores

Data security is one of my favorite subjects… and I’m always amazed at how careless some people (and major corporations) are with their digital identities.

I recently did a simple, non-scientific study at the local Apple Store. No elite hacking skills are needed (that’s L337 for you H4X0R5). Walk to any computer and pretend to be familiarizing yourself with the user interface. Load the Safari browser and check the History menu. You’ll immediately find a list of recently accessed websites. Usually this list is full of webmail visits: every computer at an Apple Store is internet enabled and people love to take advantage of Apple’s friendly, air-conditioned stores to check their email, blogs, bank accounts and even iWeb profiles.

Most of them forget to logout or clear the browser’s cache. Simply select any address from the history list and Safari will take you there. Most of the times you’ll still have access to a user’s account. On my last visit to the Apple Store I was able to access a webmail account on one iMac, a Hotmail account on another and a complete iWeb profile on a third one (this one even included an easy to click desktop icon to access the user’s account).

But the most shocking was the one that prompted this article in the first place: a security company’s confidential PDF document. Right there on the Mac’s desktop, below the hard drive icon, stood a lonely Adobe PDF file. Out of curiosity I clicked on it and found a one-page document addressed to a high-level executive at a very high profile international security firm from a market leading auditing firm. I’d hate to have this firm in charge of my personal security.

It’s been said that the definition of privacy is a situation in which we’re able to spy on our peers but refrain from doing so. I agree, but I certainly don’t live my life as if that Utopian statement is true. It’s most certainly a great starting point to begin discussing privacy issues and policy, but don’t go around believing it’s the way the world works.

Unfortunately, common sense is not at all common. If you feel the need to check your webmail, work mail, bank account or whatever on a public computer (which I highly discourage), at least make sure you logout, clear the browser’s history cache and delete any temporary files after you’re done. It’s really the least you can do.

What do you think? Have any careless-user stories to share? Leave a comment, let me know.

5 Reasons I Hate iTunes

Just bought an 80GB Video iPod! Awesome gadget and a nice way to get into the whole podcast/vidcast mindset. Unfortunately, I have to deal with Apple’s iTunes software to manage it.

I’m currently on an IBM T42p laptop (waiting for Apple to wake up and upgrade the MacBook Pros to Core 2 Duo), so this applies to the Windows version of iTunes.

1. Photos? What Photos?

I downloaded iTunes (yes, it’s not included in the package), installed it and plugged in my new iPod. iTunes began looking for media on my computer and converting it to Apple’s format. A dialog box appeared telling me iTunes was “optimizing my photos,” whatever that means. Meanwhile, iTunes becomes unusable, locked by the weird dialog. And to make matters worse, although iTunes tells me it transferred a couple thousand photos to my iPod, I can’t see them or find them anywhere.

UPDATE: I went to the local Apple Store and requested help with this at the Genius Bar. Though very polite, the dudes at the Genius Bar were unable to solve my problem, claiming to be unfamiliar with the Windows version of iTunes and having never heard of a similar problem. They suggested I call Apple Support. I decided to reinstall iTunes from scratch, but the problem was still there. The Apple Support website shows no mention of this particular problem, even though a simple Google search shows this has been around since at least February of 2006, if not earlier. Further troubleshooting with my system yielded the following answer:

There was apparently a photo file that was giving iTunes/iPod trouble, so I looked at how many photos were transferring to the iPod and manually selected folders until the total shown was higher than the number of photos on the iPod. I then deselected that last folder (which turned out to be my Picasa Exported Pictures folder) and the problem went away. I’ll eventually look through that folder to see which picture in particular was causing the error, but for the time being I’m fine.

2. Movies? What Movies?

I downloaded some video podcasts from Revision3 which turned out to be in a format too large for the iPod too handle. iTunes shows the movies in the Movie section but fails to inform you that they will not play on the iPod. You can take a guess and right-click on a movie and select “Convert Selection for iPod” if you want (the option will show for both iPod compatible and non-compatible videos). While you’re converting a video (takes ages), you can’t click on another video and add it to the conversion queue.

UPDATE: Even some video podcasts downloaded directly from iTunes appear to be incompatible with my iPod.

3. Artwork? What Artwork?

iTunes is supposedly capable of downloading album covers to display while a song is playing. Good Luck. iTunes was unable to find any artwork for most of my records, even though they are available in the iTunes store. Microsoft’s Windows Media Player lets you select the album you’re looking for and also let’s you cut-and-paste artwork.

UPDATE: I found a hack for this: Go to, search for your album, right-click and copy the album artwork image, go back to iTunes, select all the album files, right-click and Get Info, click on the Artwork box and paste the image.

4. Library? What Library?

iTunes will not monitor a folder for newly added files. Instead, they must be added manually via Add Folder or Import. iTunes also can’t tell when it has already added a song, resulting in multiple copies of each file. Attempting to ctrl-click these files to select and delete them caused iTunes to become unresponsive around the third ctrl-click.

5. Speed? What Speed?

iTunes feels mostly sluggish (so does Windows Media Player) and everything takes a few more milliseconds that it should. It just feels like it’s on slow motion.

So, what do you think? Does iTunes run better on a Mac? Do you have any suggestions? Let me know via the comments.