Tony’s Dream

One man’s journey through cyberlife

Fun with VMWare

Posted by honestpuck on April 17th, 2008

It seems it has been forever since I posted to this blog. I should be a better boy and do it more often.

Found myself today exploring the intricacies of VMWare virtual machine images. I don’t know if you have ever tried to set it up for a lab machine but it doesn’t like using a VM across accounts if people suspend the VM rather than shut it down.

Turns out that the problem revolves around file permissions. Just changing permissions on a couple of files in the suspended image allows it to run but gives a problem with graphics - the image comes up with a weird screen resolution. My current work around is to delete the file inside the package with the extension .vmss which does a force reboot on the virtual machine. Added the required line to the logout script and all is well.

Posted in Macintosh | No Comments »

Wither cities?

Posted by honestpuck on December 2nd, 2007

On Saturday I went out to dinner in one of the busier streets in Newcastle, Darby St. In a couple of hundred yards there is a cluster of perhaps a dozen casual restaurants and coffee shops. I mentioned to Sonia that the crowd lacked a diversity that you would find along a street like King St, Newtown. They all appeared to be from the same “tribe.”

Now first let me say that this is not a defacto criticism of Newcastle. You could say the same thing about Military Rd, Mosman or any number of other places in Sydney. It is one of the unique qualities of Sydney’s inner west that so many different “tribes” can mix and accept each other.

So it was a strange coincidence when just today there was an article in the Boston Globe, “Last Call” by Robert David Sullivan about the disappearance of the gay bars of Boston and what it means for city life. It is an interesting read as it bemoans the way that urban development is pushing out the fringe cultures, not just gay bars in Boston but the real New York deli and other marvelous diversities.

As I look at so called “urban development” (and there are prime examples in both Sydney and Newcastle, where the Honeysuckle precint is seen as a great urban development but to my eye it has sanitised and monotonised the industrial fringe of the CBD) all I see is the conservative, middle of the road, white middle class converting to bland more and more of what makes city life good. Of course, though, I am far from innocent myself. I may describe myself as “liberal” but in the grand scheme of things I am fairly middle of the road, white middle class myself.

Read Sullivan’s article, you might understand my fear for our cities.

Posted in Culture | 1 Comment »

Fun with Leopard

Posted by honestpuck on November 6th, 2007

So Leopard testing started in earnest and ground to a halt on day one here at Newcastle Uni.

802.11x authentication is incredibly flaky and we use it for our wireless net - the only way to I’ve found to get it to work means System Preferences hangs and has to be force quitted (should that be “forced quit”, perhaps). At that point it’s all good but I can hardly advise that in a set up document for staff and students. Of course we had a student wanting to connect his laptop on the Monday after Leopard came out - and on the first day of study vacation. Well, nobody ever said University students had common sense.

As for application testing I’ve only found a couple of applications with problems - Vectorworks being the major one but we don’t have too many users of that. All the usual suspects seem to run fine.

We’ll have to upgrade at least one of our Mac servers and attach it to some large storage so we can offer Time Machine but I’ve had a look and you can quickly get Time Machine to just back up the sensible stuff, ignoring most of the system (it requires adding two exclusions.) Once that’s done it becomes an incredibly usable tool for the end user.

There are some other neat little interface things going on with servers. Now there is a “Shared” list in the Finder window pane and clicking on it reveals all volumes you have access to on the server and tells you who you are logged in as.

As for the things I dislike, well the Ars Technica review sums up all the interface gotchas. The back end is real nice without anything to hate and I love the new version of Terminal, Spaces and almost love Stacks (why can’t the special folder icons stay in place?)

More soon.

Posted in Macintosh | No Comments »

Imaging both halves of a Dual Boot Mac

Posted by honestpuck on October 28th, 2007

So I’ve finally got imaging a dual boot Mac dialed in to my satisfaction.

The nicest thing is that I don’t really use BootCamp at all - just steal the drivers off the disk.

First I netboot the Mac and repartition the drive into two logical drives before installing the standard Mac OS image. Next step is to insert my special CD (an Altiris PXE CD with some files added) and run a shell script which installs rEFIt and then tells it to make Windows the default boot OS (it makes life easier in the next bit) by writing the line “legacyfirst” to the end of its conf file.

Now we restart the Mac and rEFIt asks us where to boot from, we select the CD and Altiris PXE boot takes over. When that finishes and we get a DOS prompt I run RDeploy which loads the standard Windows image. Since we don’t have the proper drivers loaded we now have to reboot PXE to be able to write to C:\. As it is rebooting we use the Partition Tool on the rEFIt menu to sync the GUID partition table and the MBR partition table. Now run a batch file that loads a share on our Altiris server and copy a new boot.ini and the Mac drivers into a spot on C:\ where sysprep will see them and install them. Now a couple of reboots for sysprep to do it’s work.

Back to Mac OS where we run another batch file. This one gets real tricky. First we disable rEFIt by moving the folder at /efi to /.efi (which also hides it from students), unzip a bunch of files into /var/tmp (as a Windows CD doesn’t keep things such as installer packages nice), install BootPicker, replace the logout script with one that runs BootPicker, shove a new BootPicker preference file into place (this one includes some text for the picker dialog) and finally replace the BootPicker /etc/rc.local with one I’ve hacked slightly.

That final rc.local was a real beaut. I discovered that Windows wants to write local time to the hardware clock while all other right thinking operating systems write GMT and then use the adjust for the display time. This means that when the Mac first boots after running Windows it sees a clock that is hours out and the network time daemon refuses to adjust the time as the skew is too large. Of course this means that when login.window tries to connect to Active Directory Kerberos barfs due to the time difference and I don’t get logons for network users.

This looks like a serious problem. Go to Terminal and type “apropos time” which shows me all the commands that deal with time. See ntpd and discover it’s running but with a fairly high process ID. Check its manual page and discover you can run it so that it will ignore the skew when setting the time and then quit. Type “ntpd -g -q” and after a couple of seconds the command prompt returns and the time in the top right corner is correct. OK, so I need to run that line before login.Window runs. Hmmmm, the obvious spot is either before or after BootPicker, let’s run it before so we don’t delay the arrival of the login window after they pick Mac OS. So since when we boot BootPicker is run in /etc/rc.local add our line between the “ipconfig waitall” and “bp=”. Now test. Problem fixed. Gotta love Unix.

Don’t you just love the fact that under the hood Mac OS is a real Unix operating system and no longer a toy. Weep you Windows guys, weep.

The real joy of all this is that all the files that ever need to change are on servers and so the CD can be used for years. Oh, and my dual-boot Mac is using standard student lab images on both halves - no need to create a special image.

Posted in Computers, Macintosh | No Comments »

Newcastle life and work

Posted by honestpuck on October 25th, 2007

So things are continuing in Newcastle.

My one desire is to find some good night life. Most places either seem to shut early or are overrun by extremely young patrons who object to a dodgy old partygoer like me - who’d a thunk it!! This weekend I’m going back down to Sinny for a dance party

Work continues apace. My big project at the moment is to get a routine for imaging dual boot Macs. I now know more about Altiris and Windows than I ever wanted. I have, however come up with a method of using a slightly customised Altiris PXE RDeploy CD to get our standard Windows image installed on to the Windows half of the Mac. We have moved the Mac drivers out of BootCamp and onto a share on our Altiris server so a batch file copies them into the right spot for sysprep to load them. The other problem is getting the MBR correct and rEFIt takes care of that easily, as well as allowing me to make the Windows partition the default boot device while it is going through the multiple boots of setup.

Now that I have that well in hand I am about to start Leopard testing, building new staff and lab images for next year and playing with Apple Remote Desktop. More on those next time.

Posted in Computers, Macintosh, Culture | No Comments »

New job for honestpuck

Posted by honestpuck on September 17th, 2007

So I now have a new job.

Desktop Technologies Officer (Macintosh) at the University of Newcastle. It’s a great job and moving back to Newcastle is a major change, but a good one. My new office is a mere twenty metres from a a coffee cart so I have cappucinos any time I want. I’ve already found a house to rent in Hamilton, though I’m not sure when I move in.

Lots of things to do and lots of things to learn.

Posted in Site News, Macintosh | No Comments »

Better Bose earphones

Posted by honestpuck on June 17th, 2007

The Bose In Ear Headphones have had a major improvement. In my last post about them I mentioned that I’d had problems with the plastic variable size inserrts falling off. It seems I wasn’t the only one. If you sent in your warranty card bose sent you a free set of new inserts in all three sizes. They’ve been redesigned to stick on better.

Once I got the right fit for both ears and read the manual again (turns out I’d been inserting them too far) the dry ear problem went away as well. I’m going to try them on a long trip and they may well replace the Sennheisers for day to day use.

Posted in General | No Comments »

Going Extreme

Posted by honestpuck on May 23rd, 2007

So I checked and discovered that my MacBook already knew how to talk 802.11n without me paying the $1.29 or whatever for the enabler. That meant I had to go out and get an Airport Extreme base station, it was almost compulsory, I swear.

It certainly is fast and seems to work with the MacBook a lot better than the old Linksys. It also connects flawlessy with the Wii so it seems obvious to me that the wireless problems I was having were the old LinkSys rather than the devices, though I did have to change the channel being used from the default “1″ on the Extreme so perhaps it was just RF clutter for the LinkSys - I do have somewhere between five and eleven wireless nets in my neighbourhood.

Setting it up is a breeze. Apple’s “Airport” utility has improved in the latest version and the Extreme has a good bunch of smarts. I tried sharing a printer and a hard drive hung off the Extreme’s USB port and both worked well.

Making it the same form factor as the Mini is also smart. If I can find a nice sized hard drive with the same factor I think I’ll stack them and create a marvelous device.

The most difficult part was designing and building the net. Since I use Telstra cable the Extreme couldn’t take care of login by itself. That meant the LinkSys had to continue doing that so the Extreme hangs of it. OK, first turn off wireless on the LinkSys. The next problem was getting the right IP addresses to the wireless clients while still allowing hard connections to the LinkSys. So set up the DHCP in the LinkSys to serve out xx.xx.xx.50 to 100 and the Extreme to serve out 101 to 200. The give the Extreme a fixed address at .2 and the home server (the Mac Mini) at .3 attached to the LinkSys. That set up works fine but took about three attempts, I also seemed to have problems with the Extreme not answering DHCP requests from devices plugged into its Ethernet ports. This requires a little more exploration.

Posted in Macintosh | No Comments »

Wii going well

Posted by honestpuck on April 23rd, 2007

I thought it might be a good time to update my readers on how the Wii I mentioned was going.

The biggest problem I have is finding good games, though I have more than enough to keep me playing. I haven’t found a store with a Wii on display to show the games so I have to rely on online reviews and the store staff. Luckily that’s been good enough so far.

the positive side I went out and got a second controller and Jessi and I have been exploring the two player game space. Our favourites at the moment are tennis against each other or co-operatively against the computer.

The newest game we have is “Excite Truck”, which both Jessi and I enjoy. Give me another week and we’ll see if it lasts but at the moment it seems to be the car game we were looking for. Both Jessi and I enjoy a car game that does not have too realistic a physics engine and is a little forgiving of crashes and bad driving. On the Playstation we both liked the early “Need For Speed” games for that reason.

At the moment I’m stuck in the gold level but my driving is slowly improving so I have hope of eventually progressing. It’s fun enough that I don’t mind being stuck on one level. I get to try each race track in a half dozen alternate cars and find the best for each track, improve my driving and learn the course and enjoy the slow improvement. The control system is neat, you tilt the controller side to side to turn the truck and when it is flying through the air you can twist towards or away from yourself to angle the truck and fly further or drop faster - if you land on all four wheels at once you get a “nice landing” from the game and a turbo boost.

I’ve also spent some time playing tenpin bowling and have just started to work on the wrist twist required to curve the ball one way or the other - the motion sensitive controller amazes me, it makes game playing tremendous.

So to conclude, the Wii is going well, there is enough game play in just a couple of games to keep me happy and the controller technology is fantastic.

Posted in Computers | 3 Comments »

A better directory tree

Posted by honestpuck on April 17th, 2007

Rob Griffiths in Macworld has a great column but he often glosses over details and in one recent case admitted to not understanding exactly what he was proposing we use. One of his recent columns showed a single command line to display a nicely indented folder tree on your command line:

find . -type d | sed -e 1d -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|-/'

Griffith’s then admits that he does not understand the ’sed’ command. So let’s have a close look at the entire thing. Understanding this stuff is actually more important than you might think, real power in manipulating text, even in your word processor, comes from understanding regular expressions.

The ‘find’ command is easily understood. ‘find’ requires a directory and optionally one or more filters to specify the files you want listed. In this case we are asking for all files of type ‘directory’.

Now onto the ’sed’ command. ’sed’ is the unix stream editor. It takes an input text stream and carries out a number of commands on each line before sending it to standard out. In our line you will see a ‘-e’ followed by some stuff. Each of the things following the ‘-e’ is a command. The first, ‘1d’ says that any line numbered 1 should have the ‘d’ command done to it, and ‘d’ is the delete command so we lose the first line.

Now we get down to some regular expression fu. If you want to read the manual on the regular expressions used by sed then a quick ‘man re_format’ (short for regular expression format) will give you an explanation. A fairly opaque explanation so my advice is to pick up a copy of “Mastering Regular Expressions.”

Our command line has three substitute commands (’s’ for substitute) one after the other. The standard substitute command finds a regular expression and replaces it with a string - s/expression/replacement/[options], though we can replace the ‘/’ character with anything we want so long as we use the same character all three times.

The first one is needlessly complex - we could change it to 's/[^-][^/]*\//--/g' or even 's#[^/]*/#--#g' and it would do the same thing. So lets go through it step by step. The brackets define a set of characters - we could say [abc] and that would match either ‘a’, ‘b’ or ‘c’. The ‘^’ character means ‘not’ so our first bracket means any character except for a ‘-’, that’s why it’s unnecessary - we haven’t added the ‘-’ characters in yet so there is no need to ignore them. The second bracket pair means “not a ‘/’ character” - note that in the original someone thought that because it uses the ‘/’ as the expression delimiter that the expression has to be ‘\/’ to remove the special status of the character, though in fact only the ‘^’ has any special meaning in brackets. The star means “repeat forever”. So our regular expression means “match any string of characters up to and including a ‘/’”. Instead of having to use ‘\/’ at the end of our regular expression we could change the expression delimiter to another character - I’ve chosen ‘#’. We then replace that with the contents of the second half, in our case a pair of minus signs. The ‘g’ at the end is short for ‘global’ which means the substitute command is repeated along the entire line, not just the first time our regular expression is found.

Now our second substitution. Here’s why we love regular expressions, in our first substitution the ‘^’ meant ‘not’, but in this case it is outside a pair of brackets so it indicates the start of the line. So we are finding the start of the line and inserting three spaces, basically so it looks prettier.

Our final substitution finds ‘-’ and replaces it with ‘|-’ so we get a vertical bar along the start of our list. Notice that since there is no ‘g’ at the end it only hits the first ‘-’ character. You might also consider that the last two substitutions both add something to the start of the output line so we might be able to combine them. Yes, we can - right at the start of the line insert three spaces and a bar, that should work.

So we actually have a much shorter expression that we understand. Here it is:

find . -type d | sed -e 1d -e 's#[^/]*/#--#g' -e 's/^/ |/'

Posted in Macintosh | 1 Comment »