Archive for the 'Mac tips & tricks' Category

Stopping the “Are you sure you want to open it?” dialog

Saturday, September 20th, 2008

If you’re an OS X Leopard user then you’ve no doubt encountered a dialog similar to this one from time to time:

This means that the file is “quarantined”; it happens whenever you first try to open a file you downloaded via your Web browser.

Generally speaking, this is a good thing, as it makes you think twice about opening something that may potentially be malware. However, if you’re downloading a lot of files that you know to be kosher then it can get quite annoying.

Fortunately, there are ways to disable the quarantine dialog, so that downloaded files open without needing confirmation. I found a good solution over at The Pug Automatic blog – this is basically a short AppleScript that you attach to your Downloads folder as a folder action. Then, whenever a new file is added to the Downloads folder, it’s automatically un-quarantined. Neat.

Using SnapBack in Safari

Sunday, August 31st, 2008

I’ve often been intrigued by Safari’s SnapBack feature – how exactly does it work, and is it useful?

The basic idea of SnapBack is to save you having to click the Back button so much. You click the SnapBack icon, and Safari takes you back to the first page you visited in the current window or tab, or back to the last page of search results. Here’s how it works.

Page SnapBack

Page SnapBack is available when you see the little orange arrow icon in the address bar:

Click this icon – or press Command-Option-P – and Safari takes you back to the SnapBack page. What is the SnapBack page? Well, it’s one of the following:

  • The URL you last typed into your address bar.
  • The first page you visited in a new tab or window.
  • A page you explicitly marked for SnapBack. (To mark the current page for SnapBack, choose History > Mark Page for SnapBack, or press Command-Option-K.)

So the idea of Page SnapBack is that it takes you back to the last “hub” or “jumping off” page that you visited. You might use this feature when:

  • You’re reading through lots of discussion threads in a forum and want to jump back to the forum index page
  • You’re browsing a large image library and want to return to the index page
  • You’re on a news site such as BBC News and you’ve followed a few “related stories” links, and now you want to get back to the main page. (more…)

Finder tip: Copying files to other apps

Wednesday, August 27th, 2008

You no doubt know that you can copy a file or folder by selecting it in the Finder, hitting Command-C, then switching to a different folder in the Finder and hitting Command-V. But I recently discovered that Mac OS X is pretty smart when it comes to copying and pasting between the Finder and other apps. (I think a lot of these features are new in Leopard; I remember Tiger being a lot “dumber” in this regard.)

For example, select a file or folder in a Finder window and copy it with Command-C. Now switch to a Terminal window and hit Command-V. The path to the item is pasted into the window. You can also do this with multiple Finder items by selecting them before copying and pasting; all the paths appear on one line in the Terminal window, separated by spaces. Perfect for passing them as arguments to a shell command:

Paste the same items into a plain text editor, such as TextEdit or TextWrangler, or a note in iCal, and you get a list of the filenames without the full paths. (To get the full paths across, try dragging instead of copying/pasting.) Paste some Finder items into an iWork document, and it inserts the contents of any readable files – such as text and image files – into the document. Paste them into a mail message in Mail, and Mail attaches them to the message. (more…)

Safari quick tip: Navigating a URL tree

Wednesday, August 20th, 2008

I was messing about with Safari the other day and discovered this little gem. If you right-click (or Control-click) the page title in the title bar while viewing a web page, you get a pop-up list showing you each folder in the current URL, from the current folder all the way up to the top level of the website (or hard drive if you’re viewing a local file). You can then just click a folder in the list to jump straight to it.

This is great if you’ve stumbled across an interesting page with no (or confusing) navigation, and want to jump to the site or section homepage to browse more of the website. Nice touch Apple!

I still prefer Firefox 3 to Safari, but Safari’s getting better all the time…

How to get Dashboard widgets on your desktop

Sunday, July 27th, 2008

The Mac’s Dashboard is a great idea: a separate work area where you can store mini-applications called widgets that can do all sorts of wonderful things, from telling you the current weather, news and stock prices through to giving you calculators, translation tools and games.

On the whole, it’s nice to have those widgets hidden away on the Dashboard. You can bring them up instantly with F12 (F4 on newer keyboards), and dismiss them all just as easily.

However, sometimes it’s useful to have a widget on your desktop, where you can keep an eye on it. Examples include calculators, clocks, and anything that you need to look at while you’re working. By default, the Mac doesn’t let you put widgets on the desktop, but there are a couple of ways you can work around this.

Free those widgets

One trick is to switch Dashboard into developer mode – the mode that widget developers use to create their widgets. To do this, open a Terminal window (Applications > Utilities > Terminal) and type (all on one line):

defaults write com.apple.dashboard devmode YES && killall Dock

… then press Return. Your dock should disappear and reappear. Now hit F12 (F4 on newer keyboards) to bring up the Dashboard. To drag a widget onto your desktop, start dragging it in the Dashboard, then hit F12/F4 while dragging to dismiss the Dashboard. Now position the widget on your desktop and release the mouse button. Here’s a BBC Radio widget on my desktop:

(more…)

Opening files from a Terminal window

Wednesday, July 2nd, 2008

Here are some quick tips that are handy if you work in a Terminal window a lot (I know I do!). They show various ways to open files and folders right from the command line.

Opening a file

You can open a file using its associated application by typing:

open filename

For example, opening an image file with open usually displays it in Preview, while opening an HTML file displays it in your default Web browser.

Wildcards are allowed, so you can open all PNG files in the current folder with:

open *.png

You can also specify the application to use when opening the file by using the -a option:

open -a /Applications/Preview.app myimage.png

If you want to edit the file in TextEdit, use:

open -e filename

You can even open URLs:

open https://mac.elated.com/

Opening a folder

This trick also works on folders, in which case the folder opens as a new Finder window:

open foldername

For example, you can open the current folder in the Finder with:

open .

(more…)

Six great uses for the Web Clip widget

Sunday, June 29th, 2008

If you use Mac OS X Leopard, you’re probably aware of the Web Clip widget. This is a new type of widget that lets you display part of any Web page right on your Dashboard. To use it, simply visit a Web page in Safari, then click the Web Clip button in the toolbar:

Drag the mouse around to highlight the area of the page you want to capture, then click. You can then fine-tune the area with the resize handles, and click the Add button in the top right (or simply press Return) to create the widget. Now, whenever you switch to your Dashboard, you’ll see that area of your chosen Web page right there in the widget.

If and when the Web page is updated, the widget updates too. This makes Web Clip very useful for any Web page content that gets updated frequently, such as news and sports results pages.

Here are a few tips for using Web Clip:

  • You can go back and edit a Web Clip widget. Click the little ‘i’ button in the bottom right corner of the widget to flip it round, then click Edit. The widget flips round again, and you can click and drag with the mouse to reposition the Web page within the widget. You can also resize the widget at the same time. Nice.
  • The widget reloads its “page” every time you enter the Dashboard, but you can also reload it at any time by clicking it and hitting Command-R.
  • If the page you’re clipping is text-heavy, and you want to make your widget as small as possible, first use Command and – (minus) to make the text smaller in Safari, then clip the page. The widget remembers your selected text size. You can then revert to your normal text size in Safari.

So that’s how you create and use a Web Clip widget. What sort of things can you use this feature for? Here are 6 of my favourite uses for Web Clip:

1. Weather forecasts

A classic use for Web Clip. Visit the weather forecasting site of your choice – for example, Weather Underground or AccuWeather.com – find the forecast for your local city, and turn it into a widget. Of course, the Mac comes with a built-in Weather widget, but by using Web Clip you can get much more specialized info. For example, I’m in Sydney, Australia, and I like to have the Australian Bureau of Meteorology’s Sydney Radar Loop on my Dashboard, so I can see where the rain is right now:

Sydney radar loop in a Web Clip widget

(By the way, speaking of the BoM, if you happen to be in Australia then check out TheBom Weather Widget – it’s lovely!) (more…)

How to really show off your wallpaper

Thursday, June 19th, 2008

I admit it: With my hunt for nice widescreen wallpapers, and my reviews of DeskLickr and Desktoptopia, I’ve gone wallpaper-mad over the past month. I now have a collection of over 100 gorgeous desktop images, with new ones coming in all the time. Somehow, though, having these beautiful images lurking behind my Mac windows – occasionally revealed with Exposé via the F11 key – doesn’t do them justice.

So how to make my wallpaper more front-and-centre? Ideally I’d like some sort of utility that faded my windows away when I’m not really using my Mac, revealing the wallpaper behind. Then I was hit by an attack of the blindingly obvious: Use a screen saver!

(This tip is not rocket science. But it took me a while to think of using a screen saver, so maybe it’s not that obvious. 😉 )

Luckily the Mac ships with the ability to display one or more images as a screen saver. I already had all my wallpaper images stored in a ~/Pictures/Wallpapers folder, so it was just a case of choosing Apple > System Preferences > Desktop & Screen Saver > Screen Saver, then opening up the Pictures screen saver in the left-hand list and clicking Choose Folder. After selecting my Wallpapers folder, it appeared in the list:

And that’s it! I set the screen saver delay to 5 minutes, and now I get to see my lovely wallpaper images in all their glory whenever I come back to my Mac. And because the images are already designed to look great on the desktop, they make for a fantastic screen saver. Simple but effective.

By default you get the old Ken Burns effect on the images; to turn this off click Options, then deselect the Zoom back and forth and Keep slides centred options. Now, when your screen saver kicks in, it’s almost exactly as if your windows have simply faded away. (And your menu bar. And the Dock. And mouse pointer. Err, and any icons you happen to have on your Desktop. But you get my point.) (more…)

Web developer features in Safari

Thursday, May 22nd, 2008

If you’re a Web coder, Safari 3 offers some really nice debugging features – if you know where to look for them. First, you need to turn on Safari’s Develop menu (hidden by default). To do this, choose Safari > Preferences, then in the Advanced tab check the Show Develop menu in menu bar option. You’ll see the new menu appear to the right of the Bookmarks menu in the menu bar.

The first option, Open Page With, lets you open the current page in any other installed browser – handy for cross-browser testing. The second, User Agent, tells Safari to masquerade as another browser when viewing websites. Safari still renders pages as Safari, but sends another user agent string to the Web server. This can be useful if you’re testing browser detection code, for example.

Call in the Inspector

The fun really starts with the next option, Show Web Inspector. The Web Inspector window is reminiscent of the Firebug Firefox add-on, and shows you the syntax-highlighted markup (or, by clicking the button in the toolbar, the DOM tree) of the current page, the contents of any linked style sheets, the images used in the page (with info), the source code of any JavaScript in the page, and info on any other page elements it finds.

Click the Console option at the bottom left of the window, and you can see JavaScript errors and other messages; click on an error to jump straight to the JavaScript line that caused it (nice). You can also type your own JavaScript commands into the single-line box at the bottom of the console window and see the results appear above – great for finding out the current state of variables and so on. (more…)

Free alternatives to iCal for managing To Dos

Monday, May 19th, 2008

I’ve ranted at great length about the usability nightmare that is iCal – and the fact that Leopard’s iCal is, if anything, worse than Tiger’s. One saving grace of Leopard, though, is that Apple have opened up the iCal framework, allowing other apps to create and edit events and To Dos. And sure enough, such apps are starting to emerge. Here’s a quick look at a couple of free To Do applications for Leopard.

FlexTD

One new app I’m currently playing with is FlexTD. This app’s sole objective is to make it quick and easy to enter new To Dos. It installs itself as a preference pane; all you have to do is assign a keyboard shortcut to it. Then, whenever you want to add a new To Do, you press the keyboard shortcut (from within any app) and start typing. It’s fully keyboard accessible, so you can set the calendar, priority and due date easily via the keyboard.

It’s nicely done, but it’s a shame you can’t edit the Note field as you’re creating a To Do, which makes project entry a la GTD a pain.

Anxiety

Another free To Do app is Anxiety. Unlike FlexTD, which only lets you add To Dos, this one also lets you view and edit your To Dos. Well, sort of. You can scroll through your current list of To Dos by calendar and mark To Dos as done, but you can’t edit a To Do’s title or other info; to do that you have to double-click (Arrgh! No keyboard shortcut) a To Do to open it in the dreaded iCal. Also, like FlexTD, you can’t view or edit a To Do’s Note field without switching to iCal. (more…)