Archive for the ‘Apple and Mac OS X’ Category

Excluding dot underscore files when using tar on Mac OS X

Thursday, November 22nd, 2007

When using tar on Mac OS X, by default it includes all the extended attributes.

The solution I found was in David Olinsky’s comment at Jim Plush’s blog

For the record, the solution is to set

  export COPY_EXTENDED_ATTRIBUTES_DISABLE=true

This worked fine in 10.4 (Tiger). However for 10.5 (Leopard), the option was renamed. Instead set

  export COPYFILE_DISABLE=true

Transluscent Menu Bar is Great - Yeah Right!

Sunday, November 11th, 2007

There has been a bit of a furore about the translucent menu bar.

The latest item is a flickr photo showing the ITunes menu-bar with a white spot in the second “o” of control. The comments make interesting reading – obviously a lot of “ornirary” folk are starting to use Mac OS X.

As shipped with Leopard the translucent menu-bar and the default desktop image don’t work well together. It is an unnecessary distraction when trying to work with itemss on the menu bar.

A simple bit of QA would have picked this up. One solution is to remove the distracting highlights from the ghastly default desktop image. Or even better remove, the default image altogether.

One school of thought says that by providing a translucent menu bar, punters can subtly change the way the menu-bar looks. This done by providing a customised desktop with the top 22 pixels tweaked to subtly change the effect of the menu-bar. All I say is “Yeah Right!”

Why bother providing such a convoluted work around to solve a perceived problem? And why force people to take an unecessary action to get a usable default desktop? Yes it is trivial to change desktop backgrounds. But just because we can change the desktop background, doesn’t mean that we should have to!

The workaround I chose, uses the ImageMagick mogrify command. Quite slick.

Leopard Firewall

Saturday, November 3rd, 2007

I am not a security jock, but was concerned that after the initial install the firewall preference pane was configured to “Allow all incoming connections”. Since that Day 1 encounter with the firewall, I have been trying to get some more information on the changes.

The heise security blog, made interesting reading. Particularly the way he detailed some of his methods.

At securosis.com, the comment by Nick gives details about the application firewall (appfirewall) being used in Leopard.

John Sawyer at darkreading, blogged about the shortcomings. He mentions managing the firewall using ipfw and points to WaterRoof as a GUI frontend for ipfw.

There is a description of configuring ipfw at ibiblio. Reference is made there to an application called Flying Buttress – it was formerly callled BrickHouse but was renamed as that trademark was owned by someone else. Looks interesting, and I would probably use it if had been updated more recently.

What am I going to do?

  • Try and get ipfw configured, but using a shell script.
  • Only connect to the net from behind a separate router/firewall.

Welcome to Darwin!

Tuesday, October 30th, 2007

Opening a new terminal window on Tiger displayed a message saying

Welcome to Darwin!

On Leopard this doesn’t happen. This is because the Message of the Day file is not automatically created under Leopard.

To have something displayed, simply put some text into /etc/motd. This will be displayed each time you start a terminal session.

Apache and PHP on Leopard

Sunday, October 28th, 2007

Out of the box, personal websites weren’t working. Mainly because Leopard ships with Apache2 compared to Tiger’s 1.3.

The following helped solve the problem for me.

  • Enable php5 by updating /etc/apache2/httpd.conf and uncomment the line
    LoadModule php5.module...
  • Turn on personal web sharing via System Preferences.
  • Users configuration is done in /etc/apache2/users. Ensure that you have a
    youruserid.conf
    file with appropriate directives. Mine contains
      <Directory "/Users/youruserid/Sites/">
          Options Indexes MultiViews
          AllowOverride All
          Order allow,deny
          Allow from all
      </Directory>
    
  • Logs are written to /var/log/apache2 rather than /var/log/httpd.

Leopard - First Impressions

Friday, October 26th, 2007

Well first impressions. In a nutshell - unbelievably shite!

  • The default desktop has to go - far too distracting - too many bright white lights.
  • Then there is the transparency of the menu bar at the top of the screen. Blech.
  • When you alt-tab away from Safari, the chrome on Safari actually gets lighter. When you alt-tab back into it, it gets so dark that it is barely legible.
  • Stripes in Finder
  • No Java 6.
  • Firewall settings were rooted.
  • One good thing - when you use apple-shift-4 to indicate area of screen you want to copy, you get size indicators.

Maybe I have just been using Mac too long now and am getting set in my ways.

Anyway, it is too bleeding edge for me. I reverted back to Tiger from the full SuperDuper! clone I made just before I did the upgrade.

Wireless Apple Keyboard

Sunday, September 30th, 2007

Looks cute. But how will it function over the course of a day. Beautiful tactile feedback. However, it almost feels as if the board is a little small.

Great size though. Feels really portable. Responsive. Which is good. Keys don’t travel that far. Also good.

Form factor is different to normal keyboard. Similar to MacBook Pro keyboard. Except that a right ‘option/alt’ key is used instead of an ‘enter’ key.

It is fine, provided you use it all the time – Switching between a normal keyboard and this one is a tad difficult.

The Clipboard and the Command Line

Friday, April 20th, 2007

Two of the most useful features on Mac OS X are the clipboard and the command line.

I am forever copying and pasting between applications using the clipboard. Select text in one application, press ⌘C, switch to the other application and then press ⌘V and the selected item appears in the application.

The beauty of the Unix command line is worthy of whole blog by itself. Utilities such as grep, find, sort, uniq, less, tail, head, cut are great.

Imagine being able to use these with the clipboard. You can! That is what the commands pbcopy and pbpaste do

Want to include disk space usage in an email? Open a terminal window and enter the df -H | pbcopy, switch to the email and press ⌘V to paste it in.

Want to take a list of names in an email and sort them? Select the lines, press ⌘C to copy to the clipboard, switch to the terminal window and enter pbpaste | sort | pbcopy. Then switch back to the email and pres ⌘V to paste in the sorted lines from the clipboard into the document.

Windows users need not fear. Install Cygwin and the putclip and getclip commands, part of utilities, and you can achieve the same effect.

The Lack of Mnemonics in Mac OS X

Friday, October 24th, 2003

One of the major differences between Mac OS X and Windows is the lack of mnenomics in the Mac OS X menuing system. There is an explanation at Java 1.4.1 Development for Mac OS X: Making User Interface Decisions, about the lack of mnemonics:

This does not fit in with the Aqua guidelines for multiple reasons. Among them:

  • It is extraneous information. The shortcut is already defined to the right of the menu item.
  • It is imprecise. Note in this example that Save and Save As both have the letter S underlined.
  • It clutters the interface.

However, one point that is missed is that mnemonics are in fact an alternate way of accessing menu items quickly. They are not intended as a replacement for shortcut keys. They are there to help people use an application quickly more quickly.

As I start using an application, there is no way that I can remember the shortcut key of every item. I have a good idea which menu the item is on. So if I can take a quick look at a menu, I can see whether an item is on the menu. if it is there, I invoke it.

Mnemonics help reinforce this pattern. Using mnemonics, I can cause the menu to appear quickly. If the item appears on the menu, pressing its mnemnonic invokes the item.

Eventually, I get to remember the sequence of mnemonics required to invoke an item and I don’t have to search the items on the menu. If I find I am using the same item frequently, and it has a shortcut key assigned, I will start using the shortcut key.

Launchbar again.

Tuesday, September 23rd, 2003

I mentioned previously how useful Launchbar is for keyboard junkies. Another neat feature is the way it can jump to a particular pane of the System Preferences.

For example, to get to the Network Pane from whatever application I am working in, I key the following

alt-spacebar
network<enter>

and the System Preferences Application is displayed (or started if it is not currently running) with focus on the Network Preference Pane.