Claim back disk space from Mail.app (Gmail)

June 30th, 2010 by Mark Nanut Comments »

There is a good chance you read your mail from Gmail with Mac’s native Mail app. There is also a good chance you never really paid attention to how much disk space all this content synced with Gmail IMAP really takes up. Having recently replaced my internal 160 GB hard drive with an Intel X25-M SSD drive half the size, I’m naturally eager to strip all the unnecessary stuff out of the system in order to save some SSD space.

This question has long been lingering around, it’s just that I didn’t care about it when I still had disk space to throw away: Why does ~/Library/Mail/IMAP-marknanut[...] folder take up almost triple the size (some 7 GB) of the amount of actual mail being shown in my Gmail web account (some 2.5 GB)? Gmail messages seem to take up too much space when used with Mail.app (or any other client that uses IMAP, really). Right click on the “IMAP-youraccountname” folder and select Get Info to see its size:

imap-markn

gmail

Ok, this isn’t that hard to find out and goes roughly like this: Gmail’s tags are not exactly compatible with IMAP’s folder logic, thus being displayed as folders in IMAP. In very rough terms: a mail with multiple tags, say 2 or 3 tags, gets locally copied to the same number of folders with these tag names (2 or 3 folders). If you do a Spotlight search in Mail, you’ll usually get duplicate results – for instance the same received mail message appears in “All Mail”, “Inbox”, also “Starred” and so on, whereas a sent message appears in “Sent Mail” and “Sent”.

duplicates

It would obviously be best to prevent Mail.app from downloading folders where there are most certainly mail duplicates. You’ll figure it best for yourself, but for a start we can eliminate the “All Mail” folder. So how to do it?

Inspired by the post of Rajiv Pant, I went to my Gmail settings, and under Labs section I enabled “Advanced IMAP controls”.

labs

Next uncheck all tags (folder) you don’t want to download locally (for instance “All Mail”) in the Labels section.

labels

I also unchecked “Starred” and “Spam”. I restarted Mail.app, and voila – no All Mail, Starred and Spam folders, no duplicates and more than 4 GB extra space.

foldrs

imap-markn

Which IMAP folders you’ll prevent from downloading, is of course up to you to figure out. I wish you success. Check out Rajiv Pant’s post too. :)

Disable spell checker in Mac OSX system-wide

May 11th, 2010 by Mark Nanut Comments »

Annoyed by text underlined with red dots? Tired of having to turn off spell checking every time for a particular application? Here is a quick solution, derived from what I’ve found here at Dry Fish blog.

Apparently, “disabling” the system process AppleSpell.service by renaming it is not a good solution since you’ll keep getting the dialogs about the service not being able to be found. Dry Fish suggested renaming the language directory en_GB.lproj within the AppleSpell.service package. I did that, but found out that wasn’t good enough since the spell checker also checks spelling for other languages (German, Dutch, etc).

So all I had to do was to try and rename the whole “Resources” directory within the AppleSpell.service application, quit the AppleSpell.service process in the Activity Monitor and open any app that uses the spell checker (used Tweetie for Mac in my case) to bring back the AppleSpell process. No red dots anymore, finally. So how to do it:

AppleSpell.service is located in System > Library > Services. Right-click on it and select Show Package Contents.

show_pkg

You won’t be able to rename the Resources folder directly in Finder, so use Terminal and run the following line in it (you will need the administrator password!):

sudo mv /System/Library/Services/AppleSpell.service/Contents/Resources /System/Library/Services/AppleSpell.service/Contents/Resources.disabled

You should now see the renamed directory:
resour

Quit AppleSpell.service in Activity Monitor and revoke it back by running any app that uses the spell checker. You’re done.

appspell

Disabling spell checking works in Snow Leopard. Re-activate spell checking by renaming the “Resources.disabled” folder back to “Resources”:

sudo mv /System/Library/Services/AppleSpell.service/Contents/Resources.disabled /System/Library/Services/AppleSpell.service/Contents/Resources

Cheers.

Changing app icons in Snow Leopard

December 22nd, 2009 by Mark Nanut Comments »

Changing/customizing application icons was pretty straightforward in OSX Leopard. It’s not any harder to do in Snow Leopard – all you need to do extra is to temporarily change permissions on an app in order to replace the icon.

Here’s how: ‘Get Info’ of an app (Cmd-I), unlock permissions (click lock icon at the bottom of Info window; requires admin password) and change permissions of user ‘everyone’ to Read & Write.

Now you can paste in the new icon from the clipboard, return the permissions back to “Read Only” and lock the permissions.

changing_application_permission_snow_leopard

If you’re not yet familiar with replacing icons, here’s a short how-to:

1. Open the file containing icon graphics (PNG, JPEG,…) in Preview. Naturally, it’s best if this file is a PNG file with transparent background. For instance, you can find some PNG icon files for Fluid apps on Flickr.

2. In Preview, select the graphic (Cmd-A) and crop if needed, then copy to clipboard (Cmd-C):

preview_select_graphic

3. In Info window of the app whose icon you wish to replace, click on the top left icon to select it:

info_top_left_icon

4. Paste the graphic from the clipboard over the selected icon (Cmd-V):

info_new_icon

Done:
itunes_new

Unload Tabexpose in Snow Leopard (Safari 4)

December 19th, 2009 by Mark Nanut Comments »

A quick no-tip: if you use and want to uninstall Tabexpose (a plugin that enables Expose on Safari tabs) from Snow Leopard (Safari 4), then you’ve probably figured out that instructions posted on Cocoamug’s website don’t quite work. Obviously, the Tabexpose plugin is not located in /Library/InputManagers/ folder, so the best thing to do is to do a Spotlight search for Tabexpose.bundle (use my previous tip on finding system files with Spotlight).

A system-file enabled Spotlight search will reveal that Tabexpose.bundle is located in ~/Library/Application Support/Pumba/ folder. Trash the file, empty Trash, restart Safari.

Show system files in Spotlight search (10.5.x+)

December 18th, 2009 by Mark Nanut Comments »

To make a long story short: if you’re using Snow Leopard, you have probably noticed that Spotlight search doesn’t show every file on your disk. For example, when you search for a preference file, library or other system files, nothing shows up in results. The good news is that all these files have in fact been indexed, they are just excluded from showing up in the results.

To include these (system) files in the results:

1. Invoke a Spotlight search window (not the Spotlight menubar search), default key combo is Cmd-Alt-Space.

2. Click (+) and select “Other…”,

3. Add “System files” from the selection to the menu (checkbox) and then

4. select to include System files in the search:

spotlight_system_files_3

Then do a search for your preference files, bundles, etc.

Cheers.

(thanks to this article from Tidbits)

Extend battery time on a Macbook laptop

June 28th, 2009 by Mark Nanut Comments »

On the web you can find all kinds of tips for extending Macbook Pro battery time. In this post I’ll explain methods to squeeze most juice out of a battery for a working session, not how to make your battery last longer (in terms of months or years).

I searched for more advanced and less known methods to optimize Mac for battery usage beyond the usually cited ones. I implemented those methods and I am happy with the results, to the extent that I may not need to buy a new Macbook Pro battery just yet. It’s now 39 months old with 506 loadcycles, and still has 75% capacity, not bad for its age. Fully charged it estimated for a bit more than 2,5 hours of working time, and with the help of the power tips in this post this estimate has become a reality – I could hope for max 1,5 hours of fun before the optimization.

1. Use Coolbook

Downclock and lower the voltage for different predefined processor speeds with the help of Coolbook. This method is by far the most effective if you want to prolong battery session, still it may be a bit tricky to set up for an average user. I’m not going to explain this method in detail because it is well documented here and in the Coolbook manual. But briefly, what worked in my case, was finding a processor speed/voltage pair that works reliably on my Mac, that is the highest stable clock frequency at the lowest possible voltage (in order to minimize battery drain), which is 0.9500V.

In my case, this highest stable frequency is 1,67 GHz and with the help of Coolbook driver my Mac is now preset to run with 1670 MHz on 0.95V when it’s using battery power. By default that would be 1670 MHz at 1.14V, so energy savings are obvious, not to mention that MBP runs cooler, which also keeps fan RPMs at bay.

The result is that battery now drains way more slowly than before. Still you will have to experiment and find appropriate freq/voltage pairs for your respective machine. Expect some kernel panicking before you set things right. Backup beforehand.

Offtopic: when running on AC power, my setting is max speed (2004 MHz) at the lowest stable voltage, that is 1.05V (instead of 1.22V). This helps keep my MBP cooler, and maxing out the CPU now reaches temperatures of max. 80 degrees Celsius (could reach temps above 90 C before that).

Download Coolbook: coolbook.se

2. Freeze running apps with Blitz

When running on battery power, develop a habit to hide and suspend (freeze, pause) running apps instead of closing them if you are currently not focusing on them. An app called Blitz (there are similar apps out there as well) can help you with that.

Instead of loading/unloading applications (and using battery power to spin HD), it can be more appropriate to simply just freeze any open applications that you’re currently not focusing on (for instance hidden or minimized windowed apps), and prevent them from using any processor cycles by randomly idling in the background.

It is probably a good practice to hide the apps before freezing them, unless you like seeing spinning beachballs on your screen when hovering over a frozen app window (otherwise not problematic).

Occasionaly a process called “spindump” will show up in the Activity monitor using around 10% CPU, only to stop after a while. It’s generally not a problem.

Download Blitz: blitzapp.com

3. Temporarily suspend Spotlight usage when using battery

Indexing processes in the background (such as “mds”, “mdworker” etc.) use CPU power, spin hard drive and drain battery. While I find Spotlight an extremely useful feature of OSX, particularly on Leopard, I was looking for a way to disable it only for when I’m using battery.

Even though I’ve known Spotless to be able to turn off hard drive indexing and fiddled around with Privacy settings in the Spotlight preference pane, the problem with these methods is that you also delete index files, so when you turn Spotlight back on, it has to reindex the whole drive again (taking more than 1 hour on my maxed out HD). This is certainly something you don’t want to do every other day.

So how to suspend Spotlight and keep the index file? You can turn off Spotlight temporarily by unloading mds process. Here’s the tip:

To turn OFF Spotlight temporarily, type in Terminal:

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

To turn ON Spotlight temporarily:

sudo launchctl load /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

Source: Nerdlogger.com

4. Turn off speakers (mute)

Not a very often mentioned method. Muting internal speakers (turning them off) or using headphones instead saves the energy used to power idle (standby) mode of internal speakers.

5. Turn off unessential background daemons and follow general tips for OSX optimization

Do take into account that tips in this post are only an extension on top of general tips for OS optimization, such as disabling Dock and other eye candy, dimming screen brightness, turning off bluetooth and airport when unused, ejecting DVDs and other general tips. I freed extra CPU cycles by turning off trackpad tools and helper daemons such as Zoooom, Evernote helper, Coversutra etc.

As with all things regarding OS optimization, keep an eye on Activity Monitor. With proper optimisation, CPU usage should be near-flat most of the time:

6. And finally: defragment (?)

I haven’t done it in a while, but fully defragmenting your hard drive is probably a healthy practice to minimize HD spinning while it searches around for scattered file fragments.

Speed up Omnigraffle with QuartzGL

May 8th, 2009 by Mark Nanut Comments »

If you use Omnigraffle for creating website wireframes and other kind of work on your Mac, here is a little tip on how to get this great tool to run a lot faster: launch it with QuartzGL enabled.

If you’re not sure what QuartzGL is, it is very roughly a feature in Leopard (and “Quartz Extreme 2D” in Tiger) which uses GPU to draw OSX user interface – and is not enabled by default. The main reason is that enabling this feature on a OS-level results in various drawing inaccuracies and other instabilities. However, running this feature on an application basis can be beneficial.

This trick might well become obsolete with the introduction of Snow Leopard (and a properly modified Omnigraffle probably), but until 10.6 finally comes around, it will help. I’ve been using this trick for quite a while for running various applications on a Powerbook G4 and now on a MacBook Pro, and speed boosts are by far most noticeable with Omnigraffle.

There are quite a few how-to’s out there on how to enable QuartzGL. Enabling it in Terminal might work for some, it never worked for me. What worked was playing around with a program called Quartz Debug. To install Quartz Debug, I usually had to install the whole Xcode Developer Tools package – you can download it from the Apple Developer Connection site (http://developer.apple.com/technology/Xcode.html), a registration is required and it’s free. You might try and download Quartz Debug alone from somewhere else, without having to download XCode. I haven’t done specifically that but I think it should work as well.

Once Xcode is installed, you can find Quartz Debug in “Developer > Applications > Performance Tools” folder.

The convenient thing about Quartz Debug is that it makes easy to enable QuartzGL only for specific applications, without having to enable QGL system-wide. The basic procedure to use with a specific application (say Omnigraffle) is to:

1. enable QuartzGL in Quartz Debug BEFORE launching Omnigraffle.

dock icon will show that QGL is enabled:

2. launch Omnigraffle.
3. when Omnigraffle is up and running, disable Quartz GL in Quartz Debug.

4. kill (force quit) Quartz Debug (Alt-Cmd-Esc, select the app and force-quit it)

Open any of your existing works in Omnigraffle, grab and move a stack of elements around and see if you experience how much faster Omnigraffle is. Compare performance with QuartzGL disabled and than enabled and please report about your experiences.

Even after applying this trick, Omnigraffle might slow down to its “normal” mode after a while. Having only a few applications open and freeing up some RAM might help, as well as restarting Omnigraffle (again with QuartzGL enabled, disable after launch).

Having QGL enabled works well and stable with some other applications (Preview), while with others you might experience some drawing artefacts and even crashes (Photoshop, even Safari). On certain systems (particularly with older graphics cards) even kernel panics with QuartzGL aren’t uncommon, so use this feature how you find appropriate. At the moment I am using a MacBook Pro, machine model 1,1 with 2 GB RAM, Radeon X1600 w/256 Mb VRAM and Omnigraffle works blazingly fast in QGL mode without any crashes.

Hope this tip is helpful.

Oh and by the way: today is Omnigraffle’s 8th birthday! Happy BD!

Things OSX

June 28th, 2008 by Mark Nanut Comments »

As I was updating my system to Leopard, I realized that my preferred task management tool iGTD 1.4.5.6 didn’t work well under OSX 10.5.2 anymore – crashing often and randomly, it made me go look for another task jotting application.

I’ve tried Omnifocus, but it was easily too complicated for what I needed to do – that is, to enter ideas and tasks as they come, by easily invoking a text field and typing in my stuff. So I came across Things (OSX) from Cultured Code and it’s been great. Stable, beautiful and flexible application, which does one thing and does it great – that is, managing tasks by the Getting Things Done principle. Apart from allowing very flexible tagging of entries, it also supports syncing with iCal, and therefore collecting tasks entered via other channels – web, mobile etc. And this one I use without the Quicksilver input manager. Recommended!

Reblog this post [with Zemanta]

Daylite 3 and Quicksilver

January 13th, 2008 by Mark Nanut Comments »

I recently bought a licence for Daylite 3 productivity suite, after using it for one month and getting hooked on it.

This package is flexible enough to fulfill my needs about project and task management, having a comprehensive list of all contacts, assigning tasks to them etc etc. A powerful tool, which i use everytime the grind becomes overwhelming and I need to track all active tasks, even the smallest ones (which happens quite very often). Daylite with its database capabilities allows me to create a desired number of different views on my (and others’) activities via smart folders, so it succeeds where other useful getting-things-done apps (such as iGTD and Journler) fail.

Yet not all is perfect. Daylite 3 is a big package which delivers a lot for the dollar, but still leaves quite a lot to be desired. The first thing I missed is Quicksilver integration. With iGTD, for instance, i could enter a task/idea to a list the moment it popped in my head, via Quicksilver of course. I wanted to do the same thing with Daylite, so i needed a super-simple way to get fresh tasks into Daylite’s “inbox”.

Here is a quite useful and well working solution:
1. keep using (aka install) iGTD,
2. (set up to) enter tasks via Quicksilver, they will show up in iGTD’s Inbox
3. set-up automatic syncing of iGTD with iCal, the moment iGTD goes out of focus, tasks from iGTD will show up in iCal, calendar “@Inbox”
4. set up Daylite 3 to sync with iCal’s “@Inbox” calendar
5. create a view in Daylite which shows only entries tagged “@Inbox”

So if the procedure is set right, you will:
a. Trigger quicksilver, hit “.”, enter a task, hit enter to run the (should be default) command “Put into iGTD inbox”

b. Move focus on iGTD (if not already focused), then focus away from it – aka select next app with Cmd-Tab

c. Quicksilver will immediately sync entries with iCal, Daylite will instantly sync with iCal and voila! New task shows up in Daylite’s inbox, waiting to be edited further.

Safari tweaks & pimp-ups

December 10th, 2007 by Mark Nanut Comments »

Here is a list of a few useful little plugins/apps that will power-up your Safari browsing experience:

-Tabexpose 1.7.1 (hit F8 and see all open tabs exposed on your desktop)
-Saft 9.0.2 (type ahead – keyboard navigating and full screen browsing in Safari – let go of your mouse/trackpad)
-Inquisitor 3.0.3 (view google hits as you are typing in the search box)
-Speed Download 4 (this thing actually makes downloading 2, 3, even many times faster – see files normally downloaded at 500kb/s being poured onto your hard disk at 3Mb/s)