random technical thoughts from the Nominet technical team

Leopard Upgrade Blues

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4 out of 5)
Loading ... Loading ...
Posted by chris on Oct 31st, 2007

For some reason, I decided to upgrade my laptop to Leopard yesterday. Not sure why, as there isn’t anything that I simply must have. Everything went well after the upgrade, with only one thing broken: The login window. As soon as it received focus I got the dread spinning beachball of death. I found that there were some other folks getting the same issue. As mentioned there you need to do an Archive and Install to fix the problem. So I tried that with the ‘Preserve User and Network Settings”. Same thing. Finally I tried it without preserving any settings and I was in. So then I had to copy across all of my files and preferences from the archived copy of my system. Phew, not bad for a day’s work.

I think the problem is that I am a tweaker. I can’t help installing 3rd party apps to change this and that. But that’s because I’m a techie and we jealously guard our freedom to tinker. It looks like if I want a trouble free life I should learn to live with the defaults.

Leopard and FileVault won’t work well with Time Machine

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4 out of 5)
Loading ... Loading ...
Posted by Al on Oct 31st, 2007

Chatting to a colleague this morning, and it looks like Leopard’s Time Machine just won’t work with Filevault when he tried on his laptop. As Apple state on their Time Machine page in their marketing blurb: “Time Machine: a giant leap backward” …when working with Filevault.

Time Machine monitors your disk drive by checking for changed files on the hour and backing these up incrementally. Filevault works by encrypting and storing the entire contents of your Home folder into a safely encrypted disk image, then reading and writing to that, encrypting and decrypting on the fly.

Because of this, your home directory is essentially a single file as seen by Time Machine, so every time you try to make a change to your Filevault protected home directory, Time Machine tries to backup this whole disk image.

Now as a business user, I can see why Filevault would be used to protect sensitive business data on a laptop in a business environment, but really businesses should have a more robust backup solution should be in place already, rather than depending on a consumer grade solution, and businesses should not really depend on Time Machine as their sole reliable backup solution. Time Machine won’t work reliably across a network (unless to another Mac) anyway, which is what a lot of businesses will be doing backup-wise.

However as a home user, on my machine at home, I can see the benefits of Time Machine, and really running Filevault on my home directory would be pointless, as the amount of RAW image processing I do would seriously be hampered by encrypting/decrypting on the fly, and I have absolutely no need to encrypt my MP3s! At home, most of the document processing I do now is web based anyway, and short of a few applications and music/photos, I have precious little on my home hard drive that really needs encryption, but would benefit from something like Time Machine for occasional file recovery/chance of component failure. At work, I use Filevault on my laptop, and our source code repository for storing code and Lotus notes for storing project related info, so have no need for Time Machine, but Filevault on the other hand is very useful.

Now obviously my particular computer usage will work well with this situation, but for those who store more sensitive documents and want encryption and to use time machine, another solution might well be needed.

The only workaround I can think of is to use the Disk Utility to create an encrypted AES-128 disk image. This is the same technology Apple uses for Filevault. Them while using this, mount it and write files to it, and close it when done. Time Machine will back this up as usual, but as it is storing just the files you want encrypted, it should be a lot snappier, due to much smaller file size. It’s not an ideal situation, but if someone had to use both encryption and Time Machine it might help.

OSX Launchd and NSD

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 4 out of 5)
Loading ... Loading ...
Posted by roy on Oct 16th, 2007

I’ve installed NSD on Apple’s OSX. Since rc functionality will be deprecated in the near future, I decided to have a go with launchd. Launchd offers a single method to any programs started automatically by the system. You can do a lot more, like specifying resource limits and environment variables, but I’ll leave that out of this post.

Opposed to writing scripts and reference them through rc.local, I have to write an xml plist file. This file should be put in the /Library/LaunchDaemons directory. There is also a /System/Library/LaunchDaemons directory, though that is reserved for system provided daemons, and hence may have changed after an update. Have a look though at some of the plist files in those directories to understand how things are done.

Let’s construct a plist file for NSD. Since the plist files are in XML, we’ll start of by referring to a document type definition (dtd). We need to include the property list version (1.0) as well.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>

Now we’re ready to fill out the property list keys. We’ll use “nl.nlnetlabs.nsd” as a label. Though this is required, it could really be anything, as long as its unique. Since the labels of other daemons seem to look like a name space definition, let’s mimic that.

        <key>Label</key>
        <string>nl.nlnetlabs.nsd</string>

One thing to note is that Launchd takes care of forking and daemonizing, so we’ll need to configure NSD in such a way that itself does not daemonize. (We can’t get it to stop forking). This can be done by using the “-d” flag, which causes NSD to run in debug mode, and not daemonize. Take care of the path if your NSD resides elsewhere than /usr/local/sbin . You could also configure that in your nsd.conf.

        <key>ProgramArguments</key>
        <array>
                <string>/usr/local/sbin/nsd</string>
                <string>-d</string>
        </array>

We need to instruct Launchd that NSD is run at load time.

        <key>RunAtLoad</key>
        <true/>

We also need to instruct Launchd that NSD must be kept running continuously, i.e. restarted immediately after a crash.

        <key>OnDemand</key>
        <false/>

Finally, we need to add the closing tags:

</dict>
</plist>

The entire file should look like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>Label</key>
        <string>nl.nlnetlabs.nsd</string>
        <key>ProgramArguments</key>
        <array>
                <string>/usr/local/sbin/nsd</string>
                <string>-d</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>OnDemand</key>
        <false/>
</dict>
</plist>

After you’ve copied the above in the file /Library/LaunchDaemons/nl.nlnetlabs.nsd.plist you can now start the daemon. You can do it by using launchctl, as follows:

$ sudo launchctl load -w /Library/LaunchDaemon/nl.nlnetlabs.nsd.plist

There is a very handy GUI editor for these kind of launchd plist files by Peter Borg called Lingon. This allows you fine grained configuration over your launchd plist files, and acts as an interface to control launchd.

Unable to boot from OSX install disk

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by stephen on Oct 5th, 2007

The instructions for a recent update to my Apple Intel MacBook Pro laptop asked me to boot from the installation disk after applying the update and run the check disk utility. I retrieved an OSX installation disk from our IS department, put it in the drive and, following the instructions, restarted the system whilst keeping the “C” key pressed. The DVD drive whirred away - but the system booted from the hard disk.

I then tried to reboot the system by selecting the DVD from the “Startup Disk” panel in the “System Preferences” utility and clicking on the “Restart” button. Again the DVD drive started up as the system restarted, but once again the laptop booted from the hard disk. I restarted the system for a third time, keeping the “Options” key (the left-hand “alt” key) pressed during the process. This brought up a screen displaying the two boot choices, the hard disk and the DVD drive. I selected the DVD drive, pressed “Return” … and the system again booted from the hard disk.

Thinking that the disk was faulty, I obtained another installation disk (we have a number of MacBook Pro laptops here) and tried that, but with the same results.

It was only a chance conversation with one of our staff who is an ex-Apple employee that solved the problem. To boot from an install disk, you need a disk that holds a version of the operating system equal to or later than the one with which the computer was delivered. So if your system was delivered with OSX 10.4.9, it won’t boot from a 10.4.5 disk. Presumably this is because of version compatibility issues between the firmware in the laptop and the drivers on the install disk. When I obtained an install disk with the right version of OSX, the laptop booted from it without any problems.

It would have saved a lot of time and trouble had the system displayed an error message when it detected the version mismatch.

Fixed MS Word crashing regularly on OSX

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by jay on Sep 28th, 2007

My MS Word on OSX has been crashing regularly for months, normally when I do something foolish like open a document, especially one that has been emailed to me.

I was also getting another problem that I did not realise was related.  Occasionally I would print out a document only to find that every character had been replaced with a random different character from the full character palette.  So letters, symbols, characters from other languages and so on.  Yet the formatting of the document was not affected.

In addition to that I very occasionally opened a document in Preview that was similarly affected, with all the character replaced.

One of my colleagues had the same issue and managed to track it down.  Looking in the Console he came across numerous references to ATS.framework at the time of the crashes.  ATS is the Apple Type (as in typefaces) Server and I then put two and two together to get the solution.

It turns out that OSX has things called font caches and they can get corrupt.  When they do MS Word crashes a lot and other things can get unhappy.  To clear the problem you can use a simple tool called Font Finagler.  This deletes your corrupted font caches (glyphs at various points sizes?) and the problem goes away.

Printers not appearing in OSX printer driver list

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by jay on Sep 27th, 2007

It is rare that the OSX interaction designers get it wrong, but this is one of those cases and it is a whopper.

We have an HP DesignJet 120nr in the office, basically a big (A0) printer, networked up for us to share.  I’d only ever used it from a Windows box before but I needed to set it up on OSX.  My first step was to open System Preferences then Print and Fax and press the + to add a new printer.  Then I selected LPD printing and typed in the queue name, which it duly recognised as a valid queue.

However it did not auto-detect the printer type and decided it was a Generic Postscript Printer.  So I dropped down the list of drivers, found HP on the list, but I could not see the DesignJet 120nr on that list.

This seemed pretty obvious to fix, just install the drivers.  I downloaded those after a bit of hassle because HP make you register to get them (so old-fashioned) and installed them.  But still the printer did not appear in the list.

I then spent ages looking at files like hpdjPM.plugin and trying to work out how it all fitted together but got nowhere.  I could clearly see from the installer log that the right driver was installed in :Libary:Printers:hp:deskjet:hpdjPM.plugin:Contents:Resources:XMLData:Printers:designjet_120nr.xml but it would not appear in that list.  I tried fixing disk permissions, which found a lot of errors around there but that still did not work.

Finally I spotted a clue on the web that gave me an idea as to how it works.

I went to the same screen but instead of filling anything in, just pressed the ‘More Printers …’ button.  Then I selected ‘HP IP Printing’ from the drop down at the top.  The screen then has two tabs, Auto and Manual.  Auto was blank so I guess that uses a local subnet broadcast and Manual asks for an IP address.  After all this fiddle using dig to get the printer’s IP address is trivial but still something I should not have to do.  Anyway I did that, entered the IP address and pressed Add.  After a several second delay it flipped back to the printer screen with my new printer correctly identified as a DesignJet 120nr and even had the right icon.

What a fuss.

Problem connecting Nokia E65 to iSync

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.5 out of 5)
Loading ... Loading ...
Posted by jay on May 23rd, 2007

I’ve just got a Nokia E65 to use the built-in VoIP functionality and like most people I can’t really start to use it until I’ve got all my contacts transferred over. I don’t fancy typing in over 100 names and numbers again.

On OSX there is a lovely application called iSync that I use to synchronise data between computers (using .mac) and various devices. So it seemed obvious to synch my new E65 with iSync and away I go.

The first thing I did was to download the Nokia plugin for iSync and install it. This was painless and iSync immediately recognised the phone and configured itself.

However when I first tried to sync (using USB) I got this horrible error message:

[Nokia E65] Device is not available or synchronization was cancelled. Close dialogs and applications on the phone and try again.
Device “Nokia E65″ synchronization failed

I tried all sorts of things to fix it, including attempting to reformat the E65. It turns out that unlike other S60 devices, you can’t actually reformat the E65 all you can do is reset the data.

Then I noticed in the online synchronisation manual that there should be a default synchronisation profile for PC Suite but my list of synchronisation profiles was empty. I had tried adding one already but been daunted by the questions. So I borrowed an E65 from a colleague and found their phone did have one.

The settings for this default PC Suite profile are:

Sync profile name PC Suite
Applications  
Contacts  
Include in sync Yes
Local database C:Contacts.cdb
Remote database Contacts
Synchronisation type Normal
Connection settings  
Server version 1.2
Server ID PC Suite
Data bearer Bluetooth
Host address PC Suite
User name None
Password **** (leave blank)
Allow sync requests Yes
Accept all sync reqs. Yes

and with those settings using iSync worked fine over USB, even though the profile is for Bluetooth. If you also want to do Calendar or Bookmarks then replace Contacts with Calendar or Bookmarks at the appropriate place.

Problems with Word on Mac

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 3 out of 5)
Loading ... Loading ...
Posted by chris on Apr 17th, 2007

I use a Mac and I also have to deal with Word documents at work, so I have Microsoft Word installed. Until recently it worked without a hitch. In fact I used to joke that it looked better and worked better than Word on Windows. Recently it started behaving rather badly. *Really* badly - not just crashing but bringing down a bunch of other applications with it. I have never seen this behaviour before on OS X. It has been suggested to me that this is down to upgrading the operating system to 10.4.9. But whatever it is, it’s not pretty.

So I have upgraded to NeoOffice 2.1. I have to say it is very nice - since version 2.0 they have made it look much more like a proper Mac application. It does a very good job and copes with the same documents that cause Word to spontaneously combust. I’d suggest giving it a try.

Changing behaviour of home, end, page up and page down in OSX

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...
Posted by jay on Feb 13th, 2007

I find the default OSX key behaviour for home, end, page up and page down a bit irritating. The default is for home and end to go respectively to the beginning and end of the document, whilst page up and page down move the screen without moving the caret. My strong preference is for the home and end to go to the beginning and end of the line and for page up and page down to move the caret as well as the document. These behaviours are actually the Windows standard.

I could probably get used to the OSX way but there are so many applications I use that do it the Windows way that I’m forever getting confused between the two methods. So all round it is easier to just switch apps that follow the OSX guidelines to do it the other way. Be warned though that some apps might still have their own way of doing this.

There is a great article on this at the TextMate Blog with lots of detail, but here is the same info in one easy step (well almost):

Create a new directory and file called ~/Library/KeyBindings/DefaultKeyBinding.dict with the following content:

{

    /* home */

    "\UF729"  = "moveToBeginningOfLine:";

    "$\UF729" = "moveToBeginningOfLineAndModifySelection:";    /* end */

    "\UF72B"  = "moveToEndOfLine:";

    "$\UF72B" = "moveToEndOfLineAndModifySelection:";

/* page up/down */

    "\UF72C"  = "pageUp:";

    "\UF72D"  = "pageDown:";

}

And then restart your OSX application and it will pick these up.

Setting jabber priority in iChat

1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 3.5 out of 5)
Loading ... Loading ...
Posted by jay on Feb 9th, 2007

Some people I know use iChat as their jabber client because it supports video over xmpp. However the client is quite rudimentary and there is no way through the interface of setting the priority, which you need if you want to use multiple clients.

However this can be done by editing the config file.

  • The file is ~/Library/Preferences/com.apple.iChat.Jabber.plist
  • Find the active account you want to set it for.
  • There is a setting called Priority and changing that seems to work fine.

« Prev - Next »

Recent Posts

Highest Rated

Categories

Archives

Meta: