Archive for the ‘OS X’ Category

Automate file tasks with File Buddy droplets

Wednesday, March 24th, 2021

On classic Mac OS and OS X alike, AppleScript is a very useful tool for automating commonly performed tasks. I’ve previously shared a couple of ways in which AppleScript can be used to improve Finder workflow. That was mainly with respect to window management. For simple, but tedious tasks involving file metadata, I find a program called File Buddy to be a better option.

File Buddy is a Swiss army knife of file management. While the application has an incredible depth, you can fundamentally think of it as a powerful version of Finder’s Info window. If you open File Buddy, press File > Get Info… and select a file (or, after rebuilding the desktop file, just drag and drop it on File Buddy’s icon), then the following window will appear:

File Buddy Info window

In File Buddy’s Info window, you can inspect ­ and manually modify ­ the value of any given property of the file. In the screenshot, you can see that I’ve queued up a couple of changes, indicated by the red check marks, that I can apply by pressing a Save button.

But ­ and this is one of File Buddy’s selling points ­ instead of pressing Save, you can press the icon with a water drop near the top of the window. This will save the queued changes in a File Buddy droplet, which is a small program that will apply those changes to any file that is dropped on it. Optionally, if you drag a folder, then the changes will be recursively applied to all the files in that folder.

File Buddy droplet on the desktop

File Buddy droplet on the desktop

Droplets are especially useful for quickly changing something a particular file, such as its creator code. For example, an interoperability issue between classic Mac OS and OS X is that OS X gives text clippings the creator code MACS, whereas classic Mac OS expects the creator code drag. This means that text clippings created on OS X cannot be opened on OS 9! To mitigate this, I have a droplet on my desktop called “Fix Clipping”, onto which I can drag any file to change its creator code to drag.

In general, File Buddy’s droplets are great for quickly opening a file with a different program. Let’s say I want to open an HTML document in BBEdit. Instead of manually opening the file using BBEdit’s Open… menu, I simply drop it on my “Make BBEdit” droplet, which changes the creator code to R*ch. Now I can double-click the file to open it in BBEdit.

What’s so great about droplets is that they’re a graphical, Macintosh-like solution to the problem of bulk processing. While File Buddy offers a more conventional list-based bulk processing feature, droplets are what really sets the product apart. Just like the Macintosh itself, they are simple, elegant and easy to use.

File Buddy 7, the last version with support for both OS 9 and OS X, has graciously been released for free. File Buddy is still being developed for modern versions of OS X and is available for sale on Skytag Software’s web site.

Change the language of a specific OS X app

Wednesday, March 17th, 2021

When taking screenshots for this blog, I always have to temporarily change the language of whichever application I’m writing about to English, as normally my system language is Swedish. Thankfully, this is a fairly simple task.

Update: It turns out there is an easier way to do this, posted by Yanik Magnan.

All language files are located inside the application folder > Contents > Resources. (To access the application folder of any app, right-click it and choose View Contents.) Each language is represented by a folder with the extension .lproj. For example:

  • English.lproj
  • Dutch.lproj
  • fi.lproj (Finnish)
  • sv.lproj (Swedish)

If you temporarily or permanently remove any of the non-English directories, the application will use English. It is this method that I use myself to take English-language screenshots.

If you want to use another language that is not English, then you must rename the target language’s folder to the name of your system language. For example, if your system language is Swedish and you want to the application to be in Dutch:

  1. Rename sv.lproj to sv.lproj.old
  2. Rename Dutch.lproj to sv.lproj

As you cannot rename these folders in the Finder, you have to use the mv command in Terminal.

Dutch Terminal

Terminal.app in Dutch.

Restore Leopard-like Exposé in Snow Leopard

Wednesday, March 17th, 2021

When I switched to Mac, Exposé was one of the features that I fell in love with particularly. Switching from Windows XP, the animation alone was incredible. And it was not only a visually appealing feature, but a very useful one too. When activated, Exposé drags all the windows out from underneath one another, letting you choose freely between all open windows.

One of the reasons why Exposé was so useful was that it arranged windows in a very similar way to the way you already had them arranged. If you had Safari on the left of the screen and Terminal on the right, then Exposé would try to place them as close to their respective original positions as possible. This made it very easy to find any given window quickly: you already knew where it was, you just used Exposé to reveal it from underneath another window.

Unfortunately, Snow Leopard (10.6) kind of ruined Exposé by modifying this window arrangement algorithm. Apple changed it to arrange windows in a neat grid, where each window was given the same size. This looked clean and organized, but the relative positions between the windows was completely disregarded. The Safari window on the left could be placed at any place, left or right, in the grid according to a completely unpredictable rule.

In Mountain Lion (10.8), an option was added to restore the old window arrangement behavior, but the damage was already done, as far as many users were concerned. Having gone two entire versions of OS X without any real useful version of Exposé, people had learned to rely on other strategies to navigate their windows. And an option is worth little compared to a default.

Fortunately for Snow Leopard users, though, there is a way to restore the old Exposé! It involves copying the Dock.app from an early beta build of Snow Leopard (10A380), in which the new behavior hadn’t yet been implemented. I’ve gone through the effort and uploaded the 10A380 version of Dock.app to several places:

You can replace your stock Dock.app with this older version via Terminal, as Finder doesn’t let you replace a running application. Further instructions, including on how to make it support other languages than English, are available in my MacRumors forum post (archived).

Classic Exposé in Snow Leopard

Connect to encrypted e-mail servers from Snow Leopard’s Mail.app

Tuesday, March 16th, 2021

(Originally posted on the MacRumors forums.)

For some incomprehensible reason, few e-mail providers today support older versions of SSL, let alone unencrypted access. To connect to a modern e-mail server from an older client, such as the Mail.app included in Snow Leopard, you need a proxy server between your client and your server. One such proxy server is stunnel, a UNIX program that is also compatible with Mac OS X.

Here are instructions on how to install and configure stunnel for this. Note that you need to install MacPorts before doing any of this. Also, be careful. Some UNIX experience is required. If you feel you’re not up to the task, I think some version of Thunderbird would likely support both OS 10.6 and modern encryption.

Steps 4 and 6 (but not 5) can also be performed using LaunchControl.

(more…)

Stream audio from iOS to Snow Leopard via AirPlay

Wednesday, March 3rd, 2021

When I use Snow Leopard, I usually listen to music on my iPhone, which means I have to connect my headphones to my phone instead of my computer, and then back when I want to listen to something on the computer. This gets a bit annoying, especially if I get a call on the phone.

Luckily, I’ve found a way to play the audio from my iPhone on my Mac, even on an operating system as old as Snow Leopard. In fact, I suspect it would even work on Tiger. The solution is a piece of software called shairport-sync, which is available in the MacPorts repositories:

$ sudo port install shairport-sync

Now, you can start the receiving server:

$ shairport-sync -d

This starts it as a daemon. Use the -k option to kill it. If you want to start shairport-sync automatically at boot, I recommend using LaunchControl.

Now, you can select your Mac as an AirPlay audio output on your iOS device!

Update: For my Windows PC, I found Shairport4w, which provides a nice graphical interface as well.