Raam Dev's


Archive for the ‘OS X’ Category

Backup-Bouncer

Thursday, August 21st, 2008 - Filed in Asides, Blog Entries, OS X, Technology

I haven’t tried it yet, but Backup-Bouncer looks like a very useful tool for verifying backup methods (it doesn’t actually verify backups, but rather the accuracy of a backup method’s ability to copy OS X metadata). The latest version of rsync (v3.0.3) passes Backup-Bouncer with flying colors when tested with this command: sudo rsync -aNHAXx –protect-args –fileflags –force-change /Volumes/Src/* /Volumes/Dst/test

(0) Comments

Upgraded rsync from v2.6.9 to v3.0.3

Thursday, August 21st, 2008 - Filed in Asides, Blog Entries, OS X, Technology

I just upgraded rsync on my Mac from v2.6.9 to v3.0.3 by following these directions. The ./configure command failed until I downloaded and installed the latest Xcode Developer Tools from Apple. The latest version of rsync is supposed to be faster for large transfers (such as backing up my entire 320gb MBP hard drive!).

(0) Comments

Accidentally Using an Old Version of rsync

Thursday, August 21st, 2008 - Filed in Asides, Blog Entries, OS X, Technology

Last night I discovered I had been using an old version of rsync that did not use SSH by default! Something happened during my upgrade to Leopard that switched the default rsync from /usr/bin/rsync (v2.6.9) to an old version that must have been installed by fink in /sw/bin/rsync (v2.5.5)! I discovered the problem after a simple rsync command failed and I ran the command again with the -vv flags (to get a more verbose output). Sure enough, it was running with RSH and not SSH! Even the man page said RSH was the default! (On the upside, the suddenly broken PHP script I had written to help with deploying web projects, and which utilizes rsync over SSH, is not really broken after all.)

(0) Comments

Insert the CD you want to create an ISO image from into your CDROM/DVD drive and then launch Disk Utility (Applications -> Utilities -> Disk Utility). Select the CD underneath the drive listed on the left and then click New Image in the tool bar at the top.

Disk Utility

On the Save As dialog, enter a name for your ISO image and choose the location where you want to save the file. Change the Image Format from compressed to DVD/CD master (compressed will save the file as a DMG image). In the example below, I use example as the filename.

Disk Utility Save As Dialog

Disk Utility will create the disk image with the .cdr extension, even though the image itself is identical to a .iso image1.

Disk Utility Creating Disk Image

When Disk Utility is finished, you can browse to the file with Finder and rename the file from example.cdr to example.iso.

Rename CDR to ISO

The ISO image can then be distributed and burned on any system (I tested this by burning the resulting ISO on a Windows XP machine using the free DeepBurner application).

Not a true ISO image?

I have read that the resulting ISO image is not a “true” ISO-9660 filesystem and that you can use the following command to convert DMG images (leave the Image Format as compressed to create a DMG image in Disk Utility) into *real* ISO images using the following command:

hdiutil makehybrid -o example example.dmg

This will convert example.dmg into example.iso. However, after burning the resulting ISO image on a Windows machine the CD was not bootable. Using the renaming method I described above, the CD was bootable and Windows was able to see the contents of the CD without any problems.

I looked over the man page for hdiutil and even tried some of the examples to convert a DMG to a *true* ISO file:

hdiutil makehybrid -o example.iso example.dmg -iso -joliet

But after burning the resulting ISO to a CD, I discovered the CD was again not bootable. Maybe I’m missing something and someone can enlighten me. Until then, I will continue creating a .cdr image and renaming it to .iso.

(0) Comments
Future MacBook Pro Touchpad?

A multi-touch color screen touchpad using the same touchscreen as the iPhone? It could replace the OS X dock and provide a whole new method of interacting with your computer! Fingerprint security device, electronic signature pad, an electronic sketch pad for better photo editing accuracy… the possibilities are endless!

(0) Comments

Am I crazy or is there no way to make iCal show AM/PM when editing a calendar entry?

iCal Missing AM/PM Option

The AM/PM option IS there, because if I use the arrow key to move over to next field, there’s a hidden AM/PM field which I can change. However, unless I know what it’s already set to, I have no way of knowing what I’m changing it to. Very annoying.

My fix for this is to simply use 24-hour mode, which I already use on my main system clock anyway. Unfortunately, enabling the “Use a 24-hour clock” option in the Date & Time settings does not enable 24-hour clock mode in iCal. To do this, you must modify the International settings (!?).

System Preferences -> International -> Formats -> Times -> Customize

Changing time format

From here, you can select and delete the AM/PM option from the white field and then click the little arrow on the hour field to change it’s format to 24-hour (this screen is very non-intuitive for something made by Apple). I made the changes to Short, Medium, Long, and Full time formats and then clicked OK and WHAM! iCal showed 24-hour time and made it possible to easily change the time on an entry.

iCal 24-hour format

(0) Comments

After so many hours trying to fix the damn U727 USB Sprint card, I finally have it working again. It was working fine up until about a week ago when it mysteriously stopped working. I was getting all kinds of messages, including “Unable to connect” and several seemingly useless messages in /var/log/ppp.log: “Connect script failed”, “LCP: timeout sending Config-Requests”, “CCLExit: -6021 (No carrier.)”, and “CCLExit: -6019 (Modem error, modem not responding.)”.

I finally came across this post that included a list of steps which billio discovered fixed the problem for him. I am re-posting his steps here (I hope he doesn’t mind):

1. Remove the Novatel USB device.

2. Download the latest driver package for Mac OS X from Sprint. It says it is for Tiger (10.4) but it seems to work.

3. Delete (sudo rm -rf) all the Novatel files from /System/Library/Extentions. Reboot.

4. Run the mpkg installer for the Sprint drivers.

5. Reboot.

6. Open Network Preferences; plug in the Novatel device; click “+” and add “Novatel CDMA” device.

7. Click “Advanced” button. Change vendor to Novatel and Model to CDMA.

8. Click “Connect” and it works.

And I couldn’t believe it, but that actually worked! (I’m writing this post using the Sprint card right now.) You can find the Sprint drivers here (select MAC OS from the drop down and download the Sprint SmartView software).

(2) Comments

MacBook Pro Finishing Charge

Friday, July 4th, 2008 - Filed in Asides, Blog Entries, Hardware, OS X, Technology

I’ve never seen this battery status message on a laptop before:

MacBook Pro Finishing Charge

(0) Comments

Here is what my MacBook Pro desktop typically looks like while I’m working. All these programs running and I have 24% free memory and 60% free CPU. :)

(0) Comments

First of all, I love MAMP (Apache, MySQL, and PHP for Mac). I use it on a regular basis for web development and it has been extremely useful since I started working on a Mac platform about a year ago. After upgrading to Mac OS X 10.5 (Leopard), I discovered MAMP would sometimes have problems starting and stopping. The MAMP widget and control panel would both say that Apache and MySQL are running, when in fact they were not.

MAMP App
MAMP Widget

When attempting to stop the services, MAMP would show the progress meter for a few seconds and then do nothing (the lights stayed green). This was quite annoying to say the least.

Apparently this is a known bug. But don’t fear, there is a solution! Click the Preferences button on the MAMP control panel, then click OK. MAMP will do some reinitializing and then all is well again. You’re also able to start/stop MAMP from the widget.

The latest version available is 1.7.1 and it was released on 08-13-2007, almost a full year ago! I suppose that’s what you can expect from a free version of their main product, MAMP Pro ($60), but slow bug fixes to their free version certainly wouldn’t make me feel good paying money for MAMP Pro.

(0) Comments

When I started using the beta version of Firefox 3, I quickly discovered a bug (which remains in RC1): Even though I had enabled the “Warn me when closing multiple tabs” option (Preferences -> Tabs), Firefox did not give me any warning when I accidentally pressed Cmd+Q. It would just quit without a prompting me, even if I had 15 tabs open!

In Firefox 2, enabling “Warn me when closing multiple tabs” option would cause this prompt to appear whenever I pressed Cmd+Q:

Firefox 2 Warn on Close

I searched Bugzilla@Mozilla for an open bug regarding this problem and quickly found Bug 422040 - Quit Firefox 3 beta 4 does not give “closing multiple tabs” warning. I commented about my own experience regarding this bug and further confirmed its existence in Firefox 3 RC1.

Finally, Paul O’Shannessy explained in comment #24 how the warn on close functionality works in Firefox 3:

Do you have the start up behavior to restore tabs & windows from last time?
If so, when you quit (cmd-Q) the dialog regarding save session will not show
and Firefox will quit. Session will be restored upon starting Firefox.

This used to bug me until I thought about it more. Perhaps a dialog confirming
that you intended to quit is in store for this case, but that would be a
different bug. On the plus side, if you hit cmd-Q by accident your session
should restore.

So basically, if you want to be warned when closing multiple tabs in Firefox 3, you need to make sure your “When Firefox starts” option (Preferences -> Main) is set to “Show my home page” and not “Show my windows and tabs from last time”. Setting it to the latter prevents the warning dialog when using Cmd+Q (however, you will get the warning if you try to close Firefox by pressing the X icon with your mouse).

To further confuse things, the warning dialog that comes up has a “Save and Quit” button. This button saves and restores your tabs the next time Firefox starts, which overrides your “When Firefox starts” setting of “Show my home page”.

Firefox 3 Warn on Close

Talk about inconsistent behavior. Even though this bug seems to be limited to Mac OS X, I really hope it gets fixed in the final release. But if it doesn’t get fixed, I’m glad it’s at least possible to get the warning dialog when pressing Cmd+Q and that you can choose to “Save and Quit”, even if it means making silly changes to the “When Firefox starts” option.

(4) Comments

Mac OS X Leopard: Grammar Check

Sunday, June 1st, 2008 - Filed in Blog Entries, OS X, Technology

After upgrading to Leopard, I noticed something different while typing a message in Adium:

Grammar Checking in Leopard

The tooltip was rather humorous and it caught me by surprise. I never realized grammar checking wasn’t there until I upgraded to Leopard. I opened TextEdit and confirmed that it also has a grammar check option. Cool!

Leopard includes a ton of new features but I haven’t even bothered to look over the list of 300 new features on Apple’s website until now. Included in the list is the global grammar checking (assuming the app makes use of it):

Grammar Check
Let your grammar set a shining example. A built-in English language grammar checker helps ensure that you don’t make errors in grammar.

(2) Comments

Upgraded to Mac OS X Leopard

Saturday, May 31st, 2008 - Filed in Blog Entries, OS X, Reviews, Technology

Well I finally did it. I upgraded to the latest and greatest version of Mac OS X: Leopard (10.5).

But why?

A little over six months ago I wrote about not fixing what isn’t broken, including the previous version of OS X: Tiger (10.4).

There were a combination of events that drove me to write that post, including hearing numerous stories about how Leopard was causing problems for people upgrading. Also around the same time I was hearing about how so many people (including myself) were refusing to upgrade to the latest version of Microsoft’s OS: Vista. But I now realize that every upgrade comes with its bumps and you won’t be hearing stories from people who didn’t have any problems upgrading (negativity is something to complain about, positivity is taken for granted).

So what drove me to upgrade to Leopard? Well a customer at work was having problems with an application I created and he was using the latest version of OS X (Leopard). I was running Tiger, so I wasn’t able to replicate his problem and confirm the bug. This is unacceptable and if Apple is shipping new computers with Leopard, then my software should work with the latest version.

Impressive Upgrade Process

After using RsyncX to create a bootable backup of my entire Tiger installation (183 GB!), I started the upgrade process for Leopard. This was the first upgrade of an OS X system I had ever done and the first thing that impressed me was the 30+ minute “Verifying installation disc” step. I say it impressed me because it made me feel confident that the software was going to verify the entire installation disk before continuing with the upgrade process. I can’t remember how many times I’ve installed/upgraded a Windows system only to discover the CD was corrupted and the resulting installation was flaky.

No Hiccups

The entire upgrade must have taken about an hour and a half, but I wasn’t timing it so I could be wrong. With the exception of BOINC, OS X started up without any hiccups. The first thing that came up was the Software Update dialog with a whole slew of things to upgrade the system to 10.5.3. I let it do its thing, including a reboot when it was finished.

After the reboot, I started all the applications I use on a daily basis to confirm they worked properly: Eclipse (v3.3.2), Firefox (3.0 RC1), FileZilla (v3.0.5.2, though now I can upgrade to the latest version), iTunes (v7.6), Adium (v1.2.5), iTerm (v0.9.5), QuickSilver (vB51), Thunderbird (v2.0.0.14), and VMWare Fusion (v1.1.2).

Feeling a Little Sluggish

Right off the bat, the system felt a lot more sluggish than it did with Tiger. With 4GB of RAM in my system, I knew it shouldn’t be slow. I was beginning to worry that I made a mistake by upgrading until I remembered something I read about Spotlight Indexing. I clicked on the Spotlight icon in the top left and sure enough it was in the middle of indexing my entire drive. I don’t use Spotlight (I always know where everything is on my computer) and after a quick visit to macosxhints.com I had a solution to disable it completely:

Turning off and disabling Spotlight (helps prevent the slowness associated with indexing)1:

1) Stop and disable the spotlight application itself:

cd /System/Library/LaunchAgents
launchctl unload com.apple.Spotlight.plist
sudo launchctl unload -w com.apple.Spotlight.plist

(Ignore the error message from the last command. That command tries to stop the application for every user, including root. Since root isn’t running the app, you get that error.)

2) Stop and disable the background server:

cd /System/Library/LaunchDaemons
sudo launchctl unload -w com.apple.metadata.mds.plist

3) Remove the .Spotlight-V100 directories

sudo find / -iname '.Spotlight-V100' -type d -maxdepth 3 -print0 | xargs -0 -t -n1 sudo rm -rf

Wow, that sped things up a lot! Being the user-friendly operating system that OS X has become known to be, I’m a bit surprised they don’t at least notify the user that indexing is running and that the system might be a bit slow until its done.

Conclusion

I’m running Leopard and so far I’m really liking all the new features. There are so many slight things that, when put together, make the upgrade well worth any hiccups that might come as a result. I will be posting about these new features over the next few weeks as I discover their usefulness (or lack thereof).

If you’re thinking of upgrading but haven’t yet taken the plunge, I encourage you to do so. The sheer number of tips on macosxhints.com and LifeHacker which require Leopard should be enough to annoy you into upgrading.

(2) Comments

Case sensitivity in Mac OS X does not exist.

The OS X command line is probably the most commonly used feature of my MacBook Pro. I love the fact that almost all the Linux commands I’m used to using on a Linux box work the same way in OS X. So, as you can imagine, I was shocked when I couldn’t rename a simple directory:

eris:~ raam$ mv Downloads/ downloads/
mv: cannot move `Downloads' to a subdirectory of itself, `downloads/Downloads'

That command should allow me to rename ‘Downloads’ to ‘downloads’, but apparently OS X thinks ‘Downloads’ and ‘downloads’ are the same thing! That’s absurd! In the Unix world, case matters!

So how did I eventually rename it?

eris:~ raam$ mv Downloads/ downloads2/
eris:~ raam$ mv downloads2/ downloads/

That’s just ridiculous.

I installed the Fluxbox window manager on my MacBook Pro a while back and decided to start it up to make sure I had access to a “real” command line. Sure enough, the command worked as expected within Fluxbox. Maybe I’ll start using Fluxbox a lot more often.

Check out this snippet from an article on InformIT:

Mac OS X, like the classic Mac OS before it, is not case sensitive; it doesn’t care whether you said File1.txt or file1.txt. Only one of them can exist in a folder at the same time, and there’s no ambiguity for either computers or humans in telling which file you meant. Even Unix commands like ls will work if you give them filenames to operate on that don’t match the capitalization of the actual files (try it: ls /library).

That’s really quite disappointing. I have suddenly lost so much respect for the OS X command line. Being derived from BSD in the Unix world, you would think Apple would keep something as fundamental as case sensitivity in OS X.

(0) Comments

Using Adium and Witch

Tuesday, April 8th, 2008 - Filed in Blog Entries, HOWTO's, OS X, Technology

I wrote a post last year about replacing Command+Tab with Witch, an application switcher replacement for Mac OS X. When I moved to my new apartment early in January, my Linux server was without Internet access for a few weeks so I was forced to use a graphical IM client (as opposed to a console-based client).

David was using Adium at the time, so I decided to give it a try. It’s definitely a nice messaging application — nice enough that I haven’t felt compelled to get my console client setup again (but I’m sure I will at some point; the command line rules!). Now, on to the point of this post.

After pressing Command+Tab to switch from an IM conversation to another application, here is what I saw when I pressed Command+Tab to return to the IM window:

As you can see, Witch doesn’t select my Adium IM conversation window (”Raam Dev” in this example) but oddly selects the Adium Contacts window, even though I was never looking at that window. This meant every time I switched from a conversation window to an application, I had to press Command+Tab+Tab+Tab just to get back to the previous window! Not only that, but normally I was trying to switch back to the IM window just to get rid of the distracting “new message notification” in the dock and being unable to do this quickly was really frustrating.

As extremely annoying as it was, it always bugged me at a time when I was too busy to figure out how to fix it. And by the time I was not busy I had forgotten about it. This pattern continued for THREE MONTHS (yes, I’m a very patient person)!

Today I decided I’d had enough. I took a peek at the Witch preferences (System Preferences -> Witch) and discovered that I could simply tell Witch to ignore the Contacts window! Doh!

Witch preferences

Now when I press Command+Tab after switching to another application, the IM conversation window is the first item selected.

Witch fixed

Woohoo! Sanity!

(0) Comments