Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Fix a problem with a newer bash and Automator Apps
This hint describes a rather exotic circumstance, but I thought it needs to be reported in case someone else runs into it.

Using the bash that comes with 10.4 (2.05b with 10.4.6) presents some problems with Unicode characters, like the scandinavian å, ä and ö. A well-configured newer version of bash, like 3.1.x, solves the issue. I got mine from DarwinPorts, so it's located in /opt/local/bin/bash. A manual compilation might put it in /usr/local/bin/bash.

Learning to use Automator, I ran into a strange bug. Dragging the "Run Shell Script" action into a workflow didn't do anything. The action never appeared. I suspected that my non-default shell might have something to do with it. Puzzled, I turned to Google, but with little results.

I did learn, however, of the existence of a program named Run Shell Script.action, located in /System -> Library -> Automator. Control-click on that file and pick Show Package Contents. Inside the package, go to Contents/Resources, and open Shells.plist in Property List Editor.

By expanding the Root node, you'll see a list of the shells (Perl and Python, too) that are usable by Automator's Run Shell Script action. You could add Ruby in there, for example. I decided to try and add /opt/local/bin/bash as a new Dictionary node, with identical contents to those of /bin/bash (just expand it and copy everything over).

The file is owned by system, so you can't save your changes until you've changed that. View Shells.plist in Finder, use Get Info, expand Details under Ownership & Permissions, click to unlock the Owner field and put yourself as the owner (password authentication required -- so yes, you'll have to be an admin). Having read-write access, you can now save your changes inside Property List Editor and close it. Change the permissions back, log out and back in, restart Automator and Run Shell Script should work fine.
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)

10.4: Fix a problem with a newer bash and Automator | 2 comments | Create New Account
Click here to return to the '10.4: Fix a problem with a newer bash and Automator' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Fix a problem with a newer bash and Automator
Authored by: jacobolus on Jun 13, '06 04:15:06PM

You can do the same with /usr/local/bin/python, for instance. Works great.

[ Reply to This | # ]
10.4: Fix a problem with a newer bash and Automator
Authored by: sjk on Jun 19, '06 11:45:27AM

A riskier global alternative is to replace original shells with links to (or copies of) newer versions installed elsewhere. While I don't normally do or recommend it, sometimes there are reasons for updating certain software in original system directories before Apple gets around to it. It can be a more convenient way to ensure the updated version gets used instead of finding every reference to the original version and changing them to use an updated version.

[ Reply to This | # ]