Tag Archives: Mac OS X

“The connection was refused”Error Message When Using Leopard’s Web Sharing

I came across this problem when trying to enable Web Sharing on my Macbook:

Connection Refused Error

Connection Refused Error

Seems that even if the Sharing Preferences Pane shows that Apache is running, it’s not. A simple Terminal command will show you:

$ ps aux | grep httpd
pmac 1796 0.0 0.0 599820 464 s001 R+ 12:52pm 0:00.00 grep httpd

After a lot of searching, I found the solution. There’s an issue with the Leopard Apache upgrade that somehow forgets to create the log files that Apache needs to start. To fix the problem, type the following commands into Terminal:

sudo touch /var/log/apache2/access_log
sudo touch /var/log/apache2/error_log
sudo chmod 600 /var/log/apache2/access_log
sudo chmod 600 /var/log/apache2/error_log

Restart the Web Sharing Service by unticking and ticking the box is System Preferences or by running the following command in Terminal:

sudo apachectl restart

Apache should be up and running and you can test this by clicking this link: http://localhost. If everything goes to plan you should see the following page:

Apache Start Page

Apache Start Page

Using iSync to Connect to a Nokia 3120 Classic

Update 9th November 2009: This is my last attempt at trying to get the Nokia 3120 classic working with iSync in Snow Leopard (Mac OS 10.6).

  • Download the modified iSync plugin here.
  • Unzip the plugin.
  • Open your Applications folder and locate iSync.
  • Right click iSync and select “Show Package Contents” from the menu.
  • In the new Finder window navigate to:

Contents/PlugIns/ApplePhoneConduit.syncdevice/Contents/PlugIns/

  • Copy the Nokia-3120c.phoneplugin that you download from this site into this folder.
  • When prompted that the plugins folder cannot be modified, click “Authenticate”.
  • Enter your password.

I have no idea if this will work or not, but it’s the best that I can do.

Update 29th October 2009: I’ve had a look at the plist file format for iSync on Snow Leopard (Mac OS 10.6), and there have been some changes. I’ve updated the 3120c.plist file to reflect these changes, but I’m unable to test the new file. If you’d like to test the new file, you can download it here and please let me know how it goes in the comments. Thanks, Paul.

Update 19th October 2009: As posted in the comments below, this plugin no longer works with Mac OS 10.6 (Snow Leopard). As I no longer have a Nokia 3120c to test with, so I’m afraid I have no way to update the plugin. If anyone does have a working plugin for Snow Leopard, let me know and I’ll link to it from here. Thanks. Paul.

I lost my phone a couple of weeks ago, so I went out and bought a new one. I plumped for a Nokia 3120, because it had what I wanted – a basic camera, bluetooth, and a memory slot – and was cheap.

As with all Nokia’s connecting it to your PC is achieved by using Nokia’s PC Suite, however, connecting it to my Mac via iSync didn’t seem to be possible. I could browse the device via Bluetooth, but iSync would report that it could not use the device.

Thanks to James Lloyd, I was eventually able to get it working. James has a great post about using iSync to connect to Nokia’s Series 40 phones, and helpfully provides plugin’s for nearly 40 models.

While the 3120 classic is not listed, I was able to modify one of the plugins to get it to work. You can grab the 3120 iSync plugin here. Just follow James’ instructions and iSync will happily connect to your 3120.

Edit: The original instructions on James’ blog have disappeared, so you can now find the installation instructions here.

  • Right click iSync from the with applications in the finder and “show package contents”
  • Navigate to: ContentsPluginsApplePhoneConduit.syncdeviceContentsPluginsNokia-6131.phonepluginContentsResources

!!! make a backup of MetaClasses.plist !!!

  • replace contents of MetaClasses.plist with the iSync plugin (text file downloaded from here) for your nokia mobile!

Using Automator to Create an Archive Folder

One of the great things about Mac OS X is how easy it is to automate tasks, either using AppleScript or Automator. I’ve been laid up for a few days, so I had some time to play around with Automator.

If you’ve never used Automator before you’re missing out on a whole aspect of your Mac that makes life so much easier. Automator is simply a method for creating your own automated tasks and saving these tasks as applications and plug-ins. The purpose of this post is to show you how to create a plug-in using Automator that can be attached to a folder.

Before we start, you need to be aware of a couple of the terms that will crop up when you use Automator:

  • Actions: Actions are the sequence of steps used to achieve the task you want to complete. Actions are categorised according to the Mac OS Application that they work with, for example, Finder Actions work with Files and Folders, iCal Actions with calendar events etc.
  • Workflow: An Automator Workflow is a collection of Automator Actions grouped to achieve the task in mind.

Now that we have the jargon sorted out, we can start working on our Automator workflow. First of all, you can find Automator in the Applications folder. When you open Automator, you’ll be prompted for your starting point: Custom, Files & Folders, Music & Audio, Photos & Images and Text. For the purposes of this mini-tutorial, we’ll be starting with Custom.

The next thing to note is the layout of the Automator window. On the left hand side of the screen you’ll see the list of available actions, while on the right you’ll see just blank space. This will be the canvas for creating your Workflow.

Empty Automator Workflow

Empty Automator Workflow

Click to see the full size image.

As an example task, we’re going to create a Folder on our Desktop. When files are added to this Folder, they’ll automatically zipped and the .zip file will be placed on our Desktop, and the folder will be emptied.

Now is the time to create the folder on the Desktop: Cmd-Click or Right Click and create a New Folder. Call it “Make Archive”. Back to Automator.

As I said, the left hand side contains the library of available actions. The first action we’re going to use is “Get Specified Finder Items”. You’ll find it in the “Files & Folders” library on the left. Drag the action to the Workflow space on the right.

Get Specified Finder Items

Get Specified Finder Items

Click for full size image

You’ll notice that there is an “Add” button. Using this button we’ll add the “Make Archive” folder that we previously created on the Desktop.

Next, we tell Automator that we want to get the contents of that folder. Happily there is an action for that, and it’s called “Get Folder Contents”. Drag this action to the Workflow. Within this action, there is a tick box to “Repeat for each subfolder found”. Tick it.

Get Folder Contents

Get Folder Contents

Click for full size image

With this Action, Automator knows the contents, of the folder, now it’s just a matter of doing something with that information. As we want to create a ZIP archive, we need an action to do this, and once again Automator obliges with “Create Archive”. Drag this to the Workflow:

Create Archive

Create Archive

Click for full size image

With this action, we need to give the created archive a name and a location to save to. Enter your own personal preferences here.

That’s the basic functionality in place. Now we need to test it. Copy a file to your “Make Archive” folder. When you have that completed, click the “Run” button in the top right corner of Automator. If everything is working, you should see a green tick and “Workflow Completed” in the Automator status bar. If you don’t, re-read the above instructions.

You’ll notice that we had to manually run the Automator Workflow for anything to happen. Now I’ll show you how to attach the Workflow to the “Make Archive” folder so that it runs automatically anytime you add files to the folder.

The automation is handled by saving the Workflow as a Folder Action Plug-in. A Folder Action is triggered when a specified folder changes. In Automator, go to “File, Save as Plug-in”. You’ll be prompted for a name and the type of plug-in to save as. Call your plug-in “make_archive”, and the plug-in type should be changed to “Folder Actions”.

When you do this, a third option will become available, “Attached to Folder”. Browse to your “Make Archive” folder on the Desktop. You may be prompted to “Enable Folder Actions”. If you are, tick the box and continue with the save.

Save as Plug-in

Save as Plug-in

Click for full size image

To test your new automatic archiver, copy a file to the folder and watch Automator do it’s magic!

There is one small problem though: when the archive has been created, the original file stays in the “Make Archive” Folder. If you leave this file in place, it will be added to the next archive you create, which is not what we want. The answer lies in creating a new Automator Workflow. In this new Workflow, we use the same first two Actions, but we replace the “Create Archive” Action with “Move Finder Items to Trash”.

Move Finder Items to Trash

Move Finder Items to Trash

Click for full size image

Once again save this Workflow as a Plug-in and attach it to your “Make Archive” folder. Perform another test, and this time the folder should be emptied once the archive is completed.

Slow-Mo Mac OS X Expose Shortcut Key

The Function Keys F3 – F9 in Mac OS X gives you access to the various Exposé “views”. For example, pressing F3 on my MacBook shows all open application windows. (Depending on your Mac, the function keys may be mapped differently. Check System Preferences – Exposé & Spaces for a full list.)

While trying to figure out a keyboard shortcut, I happened upon a neat little “feature” of Leopard. By holding down the Shift key while pressing a function key gives a nice little slo-mo version of the Exposé transition.

I know that’s not a great explanation, but give it a try and you’ll see what I mean.

Changing the Contrast on a MacBook

While I was playing around with the Keyboard Shortcuts for the previous post, I noticed that there’s a shortcut for adjusting the contrast on my MacBook. I’ve been looking for a way to do this for ages, and it turns out that it’s possible to do this with a shortcut, albeit, not a very obvious one:

To increase the contrast use: Ctrl-Alt-Command-. (that’s a full stop)
To decrease the contrast use: Ctrl-Alt-Command-, (and that’s a comma)

I’ve changed them to Ctrl-Alt-PgUp and Ctrl-Alt-PgDn on my Mac – it’s so much easier to remember.

Using Tab to Select Dialog Box Buttons in Mac OS X

One of the things that has annoyed me about Mac OS is the behaviour of the Tab key. When presented with a dialog box with multiple buttons, pressing the Tab key will not allow you to shift focus from one button to the next. Thankfully this default behaviour can be changed.

 

Dialog Box with Tab Key Disabled

Figure 1: Dialog box with Tab key disabled

 

In System Properties, open the Keyboard & Mouse settings and click on the Keyboard Settings section. At the bottom of the screen is an option for Full Keyboard Access.

 

System Properties - Keyboard & Mouse - Keyboard Shortcuts

Figure 2: System Properties – Keyboard & Mouse – Keyboard Shortcuts

 

In this section there is the option for using the Tab key to move focus between a) Text boxes and lists only, or b) All controls. Click the radio button for the second option, and the Tab key will now allow you to tab between all the available dialog box buttons. On a MacBook you can also use the following shortcut key to turn on/ off this behaviour: ^fn F7

 

Dialog Box with Tab Key Enabled

Figure 3: Dialog Box with Tab Key Enabled

 

Once this option has been enabled you should be able to use the Tab key to highlight any of the available buttons. One word of caution though: if you select a different button than the already highlighted default, then you must use the spacebar to “press” it. Using the Enter or Return keys will always “press” the default button.