Friday, September 21, 2012

How to disable Facebook and Twitter integration in Mountain Lion

While for some people this may be a killer feature, I hardly use Facebook or Twitter and have no plans to share content through those services. Email suits me just fine. As such, I didn't want to have those listed in Mountain Lion's Share Sheets. So, I grepped for Facebook and got this: $ find /System -name Facebook -print 2>/dev/null /System/Library/InternetAccounts/Facebook.iaplugin/Contents/MacOS/Facebook /System/Library/PrivateFrameworks/ShareKit.framework/Versions/A/PlugIns/Facebook.sharingservice/ Contents/MacOS/Facebook /System/Library/SocialServices/Facebook.socialplugin/Contents/MacOS/Facebook And for Twitter: $ find /System -name Twitter -print 2>/dev/null /System/Library/PrivateFrameworks/ShareKit.framework/Versions/A/PlugIns/Twitter.sharingservice/ Contents/MacOS/Twitter Preferring to do the least damage possible, I simply renamed Facebook.sharingservice to Facebook.sharingservice.old and Twitter.sharingservice to Twitter.sharingservice.old. After doing this, I quit Safari, reopened it, and gone were the Facebook and Twitter options. No guarantees this won't reenable on updates or break something else, but so far it seems to work. If nothing else, you can always rename the plugins back.
Tuesday, September 18, 2012

The quest for a free dynamic DNS (DDNS) service

Being self-hosted has its perks, but my ISP periodically updates my home IP, and often I don't notice until several days have gone by. I've looked for a while for free dynamic DNS services, as GoDaddy doesn't have this option, but the few I found had major problems I didn't want to deal with (e.g. limitations on the number of zones I could add, or a requirement to allow others to create free subdomains).

I finally ran across Namecheap's FreeDNS service, which was exactly what I wanted. This requires that you enable dynamic DNS on Namecheap's side, then have a client (such as ddns, ddclient, or any of the others listed here) running on your computer. To use their service (which does not require domain transfer or the purchase of any services, but is also available to those that have Namecheap accounts) you'll need to do the following:
  1. Sign up for a Namecheap account (or log into your existing account) here.
  2. Go here, type your domain name, then press "Get DNS". On the next page, click "Add DNS for Selected Domains".
  3. Now click on "OK! Go to the Hosted Domains Page". This will take you to your domain manager. Note that your domains will be listed in the "Hosted Domains" category of the FreeDNS section on the left column (it took me a bit to find where they disappeared).
  4. At this point, you should see your domain listed. Click on your domain name, and the current DNS status will be listed as "INACTIVE". That's fine, since we haven't yet set up the DNS zones, and we don't want to point the DNS until we have. Add the DNS zones as desired, and save them when done.
  5. If you want as little downtime as possible, now is the time to activate the DNS on Namecheap's side before pointing the nameservers. At the top, find the "Authorization by Email" paragraph by your DNS status and click "select authorization email". This will give you several email addresses on the domain to choose from, and Namecheap will send an email to confirm that you are indeed the owner of the domain. After you get that email and approve it, the DNS with Namecheap should change to active status.
  6. Once activated (or anytime prior to this if you don't care about downtime) point the nameservers to Namecheap. As per their KB, the nameservers are as follows:
    Note that DNS changes can take up to 24-48 hours to propagate around the world.
  7. Once the nameservers are pointed to Namecheap and propagated, you're ready to set up Dynamic DNS as per the instructions below.
If the domain is completely pointed and the DNS zones are as they should be, you're ready to set up Dynamic DNS. This requires that you enable it on Namecheap's side, then have a client running on your side.
  1. Log into your Namecheap account, go to the "Hosted Domains" category of the domain manager, and pull up your domain's DNS zone editor.
  2. On the left, under "Advanced Options", click on "Dynamic DNS".
  3. Click on Enable Dynamic DNS. Make note of the password given.
  4. Configure the DDNS client of your choice with the settings in that section (unless you use my tool, you'll need to talk to their respective developers). For Mac/Linux/Unix users, feel free to try out my client found here.

ddns: a Dynamic DNS updater for Namecheap

For any Mac/Unix/Linux users out there, I've created an extremely lightweight dynamic DNS client I'm calling ddns. The current version is 0.82.
  • Only works with Namecheap's DDNS service, which is free. For information on how to set that side up, visit my post here
  • Updates the A Record (DNS zone) of your choice with your current IP
  • Written in bash and requires curl and awk, which most distros have. I've tested it on a Mac, but should work on any *nix system
  • Works in a cron job or as a one-time run, and logs successes or failures
  • No known bugs, but please email me at if you find any!

Download ddns 0.82 here.

Download sample config file here.

If you download the client and use it, please feel free to comment here with suggestions, issues, and such. I can't promise to be able or willing to fix everything, but I'm interested in feedback.