Tuesday, December 4, 2007

Make Firefox Use Leopard's Downloads Folder

Leopard introduced a new default location for files downloaded through Safari, the Downloads folder in the home folder. Making Firefox use this same download location is a bit tricky:

1. Delete the file com.apple.internetconfig.plist from Library/Preferences in your home folder.

2. In Firefox, open your preferences, choose the Main tab at the top and click "Choose..." to change the default download location to "/Users/yourusername/Downloads"









3. Restart Firefox.

Wednesday, November 21, 2007

Auto quitting your printer


One annoying thing about Leopard was that after you printed something the printer "application" stayed in the Dock until you closed it. In Tiger, the printer would auto quit after successfully printing your document. I realized you can get this behavior back in Leopard by simply right-clicking (or control-clicking) on the printer "application" on the Dock and checking "Auto Quit."

Thursday, October 25, 2007

Video Chatting with iChat and Netgear WGR614 Router


I struggled for a while trying to get video chatting to work with iChat. I tried disabling the OS X firewall and enabling port forwarding on the router, but nothing worked.

Finally I discovered the solution: disable the SPI Firewall on my router (a Netgear WGR614).

To do this, log into the router, choose "WAN Setup" from the left menu, check "Disable SPI Firewall," and click "Apply."

Wednesday, August 29, 2007

Easy Access to Windows from OS X


I have Windows XP installed on my Mac on another partition, using Boot Camp. One time saver I use is to have a shortcut to my Windows desktop on my OS X Finder:

It makes it really easy to move files back and forth between the two operating systems. Make sure when you format the partition in Boot Camp initially that you format it as FAT32 or else you won't be able to access the partition from OS X.

"Always Open With" From the Contextual Menu



One little shortcut I use to force a file to always open in a particular application is to right-click (or control-click) and then hold down the option key. The menu will change from "Open With" to "Always Open With" so that whatever application you choose will become the default application, but only for that file. It would be nice if you could change all the files of that type to open in that application but you can't, unless you "Get Info" and select "Change All."

Another interesting thing is that when you hold down the option key "Get Info" changes to "Show Inspector." It does the same thing, but perhaps there are file types that will have different behavior.

Wednesday, August 15, 2007

Making iSync Run Periodically


One annoying thing about iSync is that it can synchronize your contacts and calendar events between your Mac and your phone, but it does not do this automatically.

So I created a setup that automatically syncs my Razr with my Mac:

1. First open up the iSync application and click on your phone (this assumes you've already made your phone connect with your Mac. A menu will appear and click the appropriate boxes so that your phone synchronizes your contacts and calendars.




2. Create a text file named isync.plist inside your home folder:

/Users/joe/Library/LaunchAgents/

The isync.plist file should look like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>isync</string>
<key>OnDemand</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/Users/joe/.scripts/isync.pl</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
</dict>
</plist>

This will call our isync.pl perl script every hour (3600 seconds). You can change this to whatever you wish.

3. Open the Terminal and create a hidden directory in your home folder by entering this command:

mkdir ~/.scripts


Next move into this directory by typing:

cd ~/.scripts/


Create a perl file there titled isync.pl:

emacs isync.pl


The perl script should look like this:

#!/usr/bin/perl
use strict;
use warnings;

my $FLAGFILE = "/var/tmp/last-isync-date";
my $age = ((-M $FLAGFILE) || 0) * 24;
print $age;
exit if ($age && $age <>
system("osascript $ENV{HOME}/.scripts/isync.scpt; touch $FLAGFILE");


This script checks when the last time iSync updated your phone was. If it was more than 2 hours ago, then it attempts to run the update AppleScript. You can change the frequency by changing the number 2 to whatever you like in the second to last line.

4. Again in the .scripts directory, create an AppleScript file called isync.scpt:

cd ~/.scripts/
emacs isync.scpt

The AppleScript should look like this:

tell application "iSync"

if not syncing then
synchronize
repeat while syncing
delay 1
end repeat
quit
end if

end tell


That's all there is to it. Good luck and let me know if you have any problems getting this all to work.