But what is it good for?

Fixing iTunes Hang on Startup on My Mac

For a very very very long time now, I've been experiencing a really annoying problem with iTunes on my Mac... everytime I start it, it hangs for quite some time and along with it comes the lovely spinning beachball of death. Well not anymore, today I finally discovered the cause of the problem... one bad MP3 file.

So how did I discover this? Well simple really...

  1. With iTunes NOT running, I started Activity Monitor
  2. I then ordered the processes by name by clicking the "Process Name" column
  3. I then started iTunes. As expected, it hung and I got my beachball.
  4. With the confirmed hang, I then located the iTunes process in Activity Monitor and selected it
  5. At the top of the Activity Monitor window is a blue "Inspect" button. I clicked this.
  6. In the window that opened, I selected the "Open Files and Ports" tab. This shows you all the files and ports this application has opened.
  7. I then scrolled down to the bottom and found the last file opened... "Live @ Trade.mp3"...

    iTunes Hang

  8. I let iTunes finish its hang, located the file within iTunes and deleted it completely.
  9. I then quit iTunes and started it again.

Bingo!!! iTunes opened up instantly and was completely responsive straight away. So I lost one MP3 file I don't listen to anymore... so what. At least iTunes is responding as it should. I'm a happy boy now.

HOWTO: Disconnect from a Zone's Console Without Dropping Your SSH Connection

This problem came up on the Oracle Community forums and I thought it was worth noting here too as it's a useful tip...

I've also learned by myself (and by chance) that the best way to "disconnect" from the ngz console after a init 5 is to issue a ^C before ~.
If I don't execute a ^C and simply use ~. I'm disconnected from the console and also from the ssh connection, which is certainly annoying.

The trick here is to use a tilda (~) for every hop you made on your way to the zone's console. So if you're connecting directly from the global zone to the zone's console (zlogin -C), then the disconnect will be ~. (tilda dot). If you're connecting from another host via ssh to the global zone and then only to zone's console, use 2 tildas and one dot, ie ~~. - the first ~ for the ssh hop and the second for the "zlogin -C" hop. If you're connecting as follows: host1host2host3zlogin -C use three tildas and one dot, ie ~~~.

Keep increasing the number of tildas as you wind your way through all your hosts :-)

HOWTO: Configure Ubuntu's Unity Launcher

So I've recently updated my Ubuntu installation to 11.04 (Natty) and I'm starting to come to terms with the new Unity interface. I think I might like it, though I've not used it in anger (ie for $work) just yet, so we'll see if I change my mind at a later date.

One thing I have discovered though is it's actually quite hard to change any of the Unity settings. I couldn't find any configuration or preference applications anywhere, and right clicking on certain locations doesn't bring up a menu from which you can select "Preferences" or similar.

Well, today, after a lot of digging, I discovered a way to change some of the Unity settings, specifically the Launcher's behaviour settings. The Launcher is the list of icons on the left of the screen by default.

Unity is actually a Compiz plugin from what I can see so accordingly, you need to configure it like you would other Compiz features...

  1. Install CompizConfig Settings Manager if it's not installed already (it probably isn't)...

    $ sudo apt-get install compizconfig-settings-manager

  2. Use Unity to find and launch the CompizConfig Settings Manager (super+a and search for Compiz):

    Find CompizConfig Settings Manager

  3. Select "Desktop" in the left column and "Ubuntu Unity Plugin" on the right:

    CompizConfig Settings Manager - Desktop

  4. Make your desired changes in the two tabs available. Behaviour:

    Ubuntu Unity Plugin - Behaviour

    ... and Experimental ...

    Ubuntu Unity Plugin - Experimental

As you can see, things are a little sparse and there doesn't seem to be very much you can change, though the one thing I wanted to change - the size - is there. Maybe we'll see more options appear in the future.

The rest of the Unity desktop behaviour seems to be governed by other Compiz plugins, so be sure to have a look around the other enabled plugins within CompizConfig Settings Manager.

The theme settings are still configured like they were before, so there's nothing new on that side of things.

Adding icons to the launcher is as simple as dragging and dropping. Removing them involves right clicking and unticking "Keep in Launcher" or simply drag it to the trash can.

I've not found any other ways to configure Unity yet, but I'll keep looking. If you know of any other configuration settings, please let me know.

ZSH Command Completion in Solaris 11 Express

I use zsh as my preferred shell. It's been a while since I last updated my zsh profile and thought I'd look into implementing some useful command completion to try and make my life easier. I was particularly interested in zfs(1M), zoneadm(1M), pkg(1M), svcs(1M) and svccfg(1M). Well, imagine my surprise when I discovered most of my work has already been done for me.

Check out the ZSH auto-completion for Solaris specific commands now available in Solaris 11 Express:

$ ls -l /usr/share/zsh/4.3.10/functions/Completion/Solaris/
total 70
-r--r--r-- 1 root bin  1500 2010-11-05 15:02 _coreadm
-r--r--r-- 1 root bin  1203 2010-11-05 15:02 _dhcpinfo
-r--r--r-- 1 root bin 20003 2010-11-05 15:02 _dladm
-r--r--r-- 1 root bin   596 2010-11-05 15:02 _dumpadm
-r--r--r-- 1 root bin  3148 2010-11-05 15:02 _flowadm
-r--r--r-- 1 root bin   805 2010-11-05 15:02 _gcore
-r--r--r-- 1 root bin   406 2010-11-05 15:02 _inetadm
-r--r--r-- 1 root bin  2276 2010-11-05 15:02 _netstat
-r--r--r-- 1 root bin   670 2010-11-05 15:02 _pfexec
-r--r--r-- 1 root bin  8481 2010-11-05 15:02 _pkg5
-r--r--r-- 1 root bin  1809 2010-11-05 15:02 _prstat
-r--r--r-- 1 root bin  3330 2010-11-05 15:02 _ps
-r--r--r-- 1 root bin   449 2010-11-05 15:02 _ptree
-r--r--r-- 1 root bin   228 2010-11-05 15:02 _savecore
-r--r--r-- 1 root bin  1842 2010-11-05 15:02 _snoop
-r--r--r-- 1 root bin  1503 2010-11-05 15:02 _svcadm
-r--r--r-- 1 root bin  1667 2010-11-05 15:02 _svccfg
-r--r--r-- 1 root bin   634 2010-11-05 15:02 _svcprop
-r--r--r-- 1 root bin  1029 2010-11-05 15:02 _svcs
-r--r--r-- 1 root bin  2684 2010-11-05 15:02 _svcs_fmri
-r--r--r-- 1 root bin   300 2010-11-05 15:02 _zlogin
$ 

There is also ZFS specific auto-completion, but sadly no zoneadm. I'll look to implement this myself.

This comes from Solaris 11 Express with SRU5 applied, though from the date stamp of these files, they've been there for quite some time. A quick search indicates these went into snv_134 so were in place long before Solaris 11 Express was released.

There don't appear to be equivalent files for bash, but I guess that's probably because Bart only created zsh auto-complete scripts and then raised bug 9657 asking for them to be integrated into Solaris, which they now have been. Thanks Bart. You've saved me a lot of time.

Interesting Links for 24 Feb 2011 - 08 Apr 2011

Habari 0.7 is Go Go Go

I'm a little late on this one as I've not had a good weekend, but as they say, better late than not at all.

After a very long and winding road (dum dum), the guys finally pushed out the latest stable release of Habari on Friday. Yes, this was April fool's day, but this was no hoax; Habari 0.7 has finally seen the light of day.

Full details of what's new can be found in the release notes and if you're using Habari already, there are some upgrade details too.

Great work everyone. Now lets see if we can get 0.8 out the door within a decent time frame ;-)

Conundrum: Simultaneous Public and Private Mercurial Repositories

Here's a problem I'm trying to get my head around: how can I create simultaneous public and private Mercurial repositories that are continually and automatically in sync without revealing any information from the private repository in the public repository?

Some of my projects, like phpSmug and phpZenfolio contain files I don't want the world to see. These are primarily for automatically building the necessary public files, automatically updating websites, generating documentation and unit testing. Now these files contain passwords and other hacks which the world would love to see, but this is my magic and every magician knows he's only as good as long as the audience doesn't know his secrets.

So how do I create a single directory structure that have files that belong in two repositories, but have only have those changes destined for the public files documented in the public repo?

I've got some ideas. Time for some investigating.

Oracle Solaris 11 Compatibility Checker Tool

For a long long time now Solaris has maintained a Binary Compatibility Guarantee. In short this is a guarantee that any application built according to recommended guidelines using documented interfaces on an older release of Solaris will run on a newer release of Solaris with minimal, often no, modification. This is one of the places Solaris trumps Linux. You won't get such a guarantee from any Linux vendor.

Anyway, with Solaris 11 this guarantee will still be valid and Oracle are now in the process of encouraging ISVs to validate their applications early by announcing the availability of the Oracle Solaris 11 Compatibility Checker Tool.

To quote the Oracle Solaris 11 Compatibility Checker Tool page...

However with every release there are a few userland commands that have changed, improved, or moved. So it is always important to know if and where your application might see changes, either because of userland changes or in places where it relies on internal APIs that are outside our guaranteed ABI.

The Oracle Solaris 11 Compatibility Checker Tool allows developers to quickly zero in on such possible incompatibilities and make the required changes. This is achieved by executing a combination of “Source Code analysis”, “Static Binary analysis” and “Runtime analysis” modules of the tool on the applications already available on Oracle Solaris 10. The Runtime analysis module will be made available in a future release of the tool.

If you're an ISV with applications running on Solaris 10, I highly encourage you to check and verify your applications as soon as possible. Solaris 11 is due out later this year and there are going to be quite a lot of changes, many of which are for the good. I anticipate customers who are testing Solaris 11 Express now (it comes with full production use support as part of your OS support contract) will be impressed with the new functionality and will be eager to upgrade. Don't get caught napping.

The IE6 Countdown, Finally

Someone at Microsoft with a lot of clout has kicked someone in the jacksy and finally launched the IE6 Countdown campaign encouraging the discouragement of the use of IE6.

Developers are being asked to add the following banner to their sites for all IE6 visitors...

People are being asked to educate others with the phrase "Friends don't let friends use IE6". They're almost right, friends don't let friends use IE fullstop. Enemies on the other hand are free to use what they want ;-) .

And as can be expected, they're also pushing people to harness the power of the various social networks to push the message out.

This is a great idea, pity it's taken several years for Microsoft to listen to the rest of the world and actually use their power, might and marketing machine to get people to upgrade. The 1% goal is quite optimistic and may be hard to hit as there are lots and lots of large corporations out there who have standardised on IE6 and they are not likely to upgrade without a good incentive.

I think to really hit this target, and ideally take the usage right down to sub-1% figures, they need to officially announce they will NOT be addressing any more security issues in IE6. They don't need to do it straight away, but maybe use the campaign to announce a date, eg 6 months from now. This would certainly provide the encouragement many companies need.

This campaign doesn't impact me much as I'm not a website designer/developer by trade so haven't even attempted to keep IE6 happy for several years now, but this will certainly please a lot of other developers I know.

Top