Thursday, September 19, 2013

How to run multiple Google Notifiers for different GMail accounts in OS X

  1. Prepare app for re-signing

    1. Duplicate and rename the notifier .app file.
    2. Right-click on the copied .app and show package contents.
    3. Edit the files App.icns, GmailIcon.png, nounread.png, and unread.png in Content/Resources so that they can be distinguished from the original images (so you can tell which notifier is showing notifications).
      • For the png's, I opened each in Paintbrush.app and inverted the colors.
      • I replaced App.icns with the .icns file from another mail program that I don't use.
    4. Open the Info.plist file in Contents in a text editor and change the <string> associated with the CFBundleIdentifier key from com.google.GmailNotifier to something different but recognizable.
  2. Obtaining a Signing Identity Note: this is necessary to avoid being prompted for a password each time the program is started.

    1. Open Applications > Utilities > Keychain Access.
    2. From the Keychain Access menu, choose Certificate Assistant > Create a Certificate.
    3. Fill in a name for the certificate. This name appears in the Keychain Access utility as the name of the certificate.
    4. Choose Self Signed Root from the Identity Type popup menu.
    5. Choose Code Signing from the Certificate Type popup menu.
    6. Check the Let me override defaults checkbox. Click Continue twice.
    7. Specify a serial number for the certificate. Any number will do as long as you have no other certificate with the same name and serial number. Click Continue.
    8. Fill in the information for the certificate. Click Continue until you can click Done.
  3. Re-sign application We will use a codesign command-line tool to re-sign the notifier application. Below, use whatever name you have given to the duplicated notifier .app file place of "Google Notifier 2.app".

    1. /usr/bin/codesign -f -s "MyCertificate" "/Applications/Google Notifier 2.app"
    2. Click Allow: /Applications/Google Notifier 2.app: replacing existing signature
  4. References

    1. http://hints.macworld.com/article.php?story=20061117161341318
    2. http://web.archive.org/web/20110224034132/http://newmotiongear.com/blogs/index.php/2011/02/20/how-to-re-sign-google
    3. http://web.archive.org/web/20110224034132/http://developer.apple.com/library/mac/#documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html