Thursday, 1 June 2017

Static IP addresses with VMWare Fusion on a Mac

One of the issues with using VMWare fusion is that the IP addresses for your guest OS images can change when you restart them.

Annoyingly, they can also change when you suspend/resume them!

When creating a small 'farm' of machines and linking the hostnames together, this can be a pain in the proverbial!

Luckily Will Warren has the solution here https://willwarren.com/2015/04/02/set-static-ip-address-in-vmware-fusion-7/ - cheers, Will!



Tuesday, 18 April 2017

Life in the Hybrid Lane

(or ‘Can you still be a petrol head if your car plugs into the wall socket?’) 

Due to a combination of:
  • Extreme age – over 10 years
  • Extreme mileage, one at 165,000 miles and another at 275,000 miles
  • Not wonderful fuel economy and fuel around £6/gallon in the UK (Yes, really, if you’re reading this in the USA!),
we decided to trade in our beloved Mercedes E320 CDI and Subaru Impreza WRX estate/wagon. Both gave superb service and will be much missed: We drove all but 75,000 miles of their total in them with hardly any breakdowns (one flat battery, one collapsed suspension strut, couple of blown tyres). I don’t know if I’ll ever own anything as fast as that Subaru again!

So what to choose? I’m not exactly a big ‘green’ fan – if you want to eschew the trappings of modern civilisation, then fine – don’t force it on me. However, if you have a technical solution that gives me the same (or better) quality of life which also fits with your ‘green’ agenda then no problem.

A pure battery car/’EV’? Everything apart from the Tesla models has woeful range. If you can’t get in and do at least 200 miles in one journey when you need to, then no thanks. We looked at the Tesla model ‘S’ but when you need a long journey, with heating/air con on at a decent speed on the motorway (freeway) it still can’t cut it for range we need. And the price! Nice cars though – go check them out – the staff in Bristol, UK were very friendly. The performance is staggering, they have 4WD and who can’t love a car with a ‘ludicrous’ mode?

Hybrid? I had a Toyota Prius as a rental once in the USA for about 6 weeks. Good economy, OK-ish drive but would I want one on my drive at home? No thanks. (I’ve nothing against Toyotas: we did look at the Rav4 Hybrid). What other hybrids are about?

How about the new Mercedes E350e plug-in hybrid? Really nice (go check it out with the new ‘glass cockpit’) but it costs a lot brand new and it only has a 30 mile range on batteries – after which the economy drops off markedly for long-distance motorway miles. For someone who thinks a 150 mile drive is a ‘short hop’ and does a LOT of miles on business, this wasn’t really an option, although I’m still considering it next time around.

For my wife, who normally does round trips of 20/30 miles, a plug-in hybrid is a good option: electric most of the time but with the ability to do long-haul on petrol when needed. Would you want 2 Labradors and driving through muddy fields in an E class though?

Mercedes used to do an E300 diesel hybrid. OK, it doesn’t plug-in but it has the Prius-like regenerative battery technology and it uses the batteries as a KERS style boost when you press the loud pedal. The result is that the 2.2 litre diesel hybrid is actually faster than my old 3.2 litre diesel. It also does a lot more MPG, especially once you’ve got to the end of your motorway cruise and you’re into city traffic. Best of all, it looks and feels like a regular E class Merc. It’s not a ‘green car, there’s just a discrete ‘Hybrid’ badge on the back. The battery is in with the engine and gearbox and you don’t lose any boot (trunk) space.

Did I mention that ‘Mercedes used to do them’? You can get them second hand and they’re not badly priced. I got one four years old with 40K miles from Mercedes in Bristol (I’m prepared to travel to buy cars). Service there was really good BTW: ask for Roy Humphreys.

New Merc, same as the old Merc, but with all the updated toys/electronics, new light/dark leather and 235K less miles on the clock.

So that’s the Merc, what about the Subaru? For that we had to switch religions (if you followed WRC rallying in the McRae/Burns/Makkinen years you’ll know why). We swapped our Subaru for a Mitsubishi! I can feel my membership of scoobynet.co.uk being revoked as I type. . .

The Mitsubishi Outlander PHEV is a plug-in 4X4 SUV hybrid with a claimed 30 mile battery range; but crucially it also has a 45 litre petrol (gas) tank. Run out of battery? No worries, the engine takes over and you pretty much don’t even notice. Run out of fuel? Petrol is available pretty much anywhere – no range anxiety! Worries about the batteries? 8 year warranty (in addition to 5 year on the car).

Best of all they’re dirt cheap used. We picked a 1 year old example up with 13K miles on the clock (with a choice of colours!) under half new price from Masters Mitsubishi of Croydon. Again, service was superb (ask for Matthew) and we were happy to travel to get the good deal.

So, what are they like in practice? What about the claimed mpg? What are the pros and cons? Do you need to trade in your microwave for a camp fire to ‘go green’? Did we sacrifice anything for fuel economy and cheaper car tax?

Easiest is the Merc. It’s an E class with all that goes along with it, including (in my experience) the wonderful Mercedes dealer service. We use Winchester (ask for John in service). It looks like an E class, drives like an E class, has that ‘Aaah, this is nice!’ feel to it when you get in after a long day at the office and gives between 47 and 53 mpg so far in mixed usage.

Just turn the key, hit the loud pedal and go. No hassle and the performance is also lots of fun – the ‘SE” seems to have the AMG suspension and it’s all specced up with COMAND Nav/DVD, sunroof, light leather, through load, voice control etc etc.

If you have (or have had) an E class, it’s one of those. The real eco-benefit is in traffic and stop/start conditions when the hybrid battery really kicks in and the engine switches off. It also does it on the motorway: If you’re coasting downhill, it just kills the engine – watch the rev-counter drop to zero at 70mph! Quite scary! But watch the mpg shoot up at the same time.

What about the Mitsu? Well, it’s not going to match the sub 6 second acceleration of a Prodrive chipped Subaru WRX (even though it’s from the guys who brought you the Evo) but for a 1.8 tonne SUV that’s effectively a 7 seater (think Hyundai Santa Fe / VW Tuareg size) it seems to drive much better than its official performance figures would suggest, although it can run out of steam accelerating at motorway speed. You can corner positively and it’s very drivable – it doesn’t feel like you’ve compromised on fun. It also gives full torque from 0mph so it’s worryingly quick off the line – although only to about 20mph!

It’s also completely silent which is very disconcerting initially. it’ll do the run-silent-on-batteries trick up to 75mph and it is (as Mitsubishi say) not that noticeable when the engine starts. It starts when it needs to and stops when it doesn’t.

No manual intervention required. Two pedals, accelerator and brake. Just drive it like a normal (huge) auto and let the car get on with it.

And we’ve got over 140MPG out of it! Yep, One-Hundred and Forty, not just forty!

OK, that wasn’t just on petrol, we did have to add electricity. We charge it up at home and fully charged it registers about 20 to 23 miles of electric range – which seems pretty accurate in our experience. To charge it up is 10KW of power, which costs us just over £1. Given that petrol is around £6/gallon, then that’s financially 120mpg if you can run it on the batteries alone.

We do some longer runs (We’ve taken it on 500 mile round trips) and the economy really drops off when you don’t charge it up – around 35 to 40 mpg depending on motorways etc, but that’s still not bad for nearly 2 tonnes of SUV. You still get a 300 mile range and petrol is widely available when you run low.

When you’re doing 20 mile/day trips though, it really makes sense. 950 miles out of 30 litres of fuel is really quite astounding. Considering we used to get 30mpg (or less) out of the Subaru, it’s very much lighter on the pocket! And that’s not mentioning the reduction of the road tax from £285 to £0 (it went from £285 to £20 on the Merc)

You get into the habit of plugging it in whenever you’re home (the UK government and Mitsubishi subsidise a dedicated 7Kw charging point at home which does it in about 3 hours, or you can just plug it into a regular 3-pin socket for a 5 hour charge) and just keep topping it off. We can go for days without using any fuel – in fact Mitsubishi tells you to use 20 litres of fuel per month to keep everything flushed through as some people run them purely on batteries. There’s a rumour of someone getting 4000+ miles out of a tank . .

It’s pretty big compared to what we were used to and there is loads of room, especially in the back as the 6th and 7th seats aren’t there due to the batteries. Some reviews have said the cabin is “sparse” and “plasticky”, but it’s got Leather, Sat Nav, Bluetooth/Phone connectivity, DVD player, power seats, sunroof, Xenon lights, voice control – good enough for us and better than our ‘old’ Subaru was. Maybe it might seem “cheap” if you paid £40K for it, but for sub £20K, it’s really not too bad!

Can’t comment on reliability yet as we’ve only had them for a few months. Previous experience with the last Merc was ‘bulletproof’ and I’m assuming Mitsubishi is up there with Subaru build quality. If it’s not, I’ve the balance of a 5 year warranty. Not had to service it yet, so can’t comment on our local Mitsubishi dealer’s (Winchester) service department although their sales dept seemed very friendly when we went looking to buy the car in the first place.

Any regrets? Losing the ‘Turbo nutter’ performance of the ‘Scooby-Doo’ and we’ll also miss the superb service from Simpson’s Subaru in Swindon (ask for Karen). The Merc is a pure upgrade and it’s more and better of the same. The Mitsu is nice to have something ‘different’ – it’s all good so far.

So have we gone ‘green’? Not really, it was a purely economic decision. If you want to change behaviour, incentivise people the right way and see them change – we did. The best bit is when a ‘green’ person yells at me for driving a ‘gas guzzler’ SUV. It’s great to say ‘it’s electric! How is your old junk-mobile saving the planet then?’

Tuesday, 22 November 2016

Mac Safari running slow / slow to start loading page?

My Mac Safari has been running slowly for a bit - it seems to take ages to start loading the page.

Firefox has no such problem - so I'm pretty sure my ISP is OK (I have fibre at approx 40Megs)

So, with thanks to http://www.webnots.com/fix-safari-slow-loading-pages-mac-os-x/ I found the following seems to have fixed my problem.

Disable the DNS Prefetching in Safari:
1
defaults write com.apple.safari WebKitDNSPrefetchingEnabled -boolean false

(You can re-enable it by doing:
1
defaults delete com.apple.safari WebKitDNSPrefetchingEnabled)

Simple as that - don't even need sudo! Just restart Safari and off you go.

(For info, MacBook Pro 15" running Sierra)

Tuesday, 1 November 2016

Sorting eMail into folders? Why would you do that?

I picked this up from listening to 'More or Less' on BBC Radio 4 (podcasts are available here http://www.bbc.co.uk/programmes/p02nrss1/episodes/downloads).

Since I got a large (multiple gigs) allocation of eMail space, my archiving/organising of email has effectively fallen to zero. I can search for people and subjects and grab the threads I need most of the time.

I get pushback on this approach from the 'Inbox Zero' brigade but it seems to work for me - after all, I don't organise my twitter or facebook feeds - I just let them scroll by - same with eMail - it'll be there when I need it.

Finally I have some support for my approach - and from IBM Research no less! MIT Technology review introduces and links to the research paper here: https://www.technologyreview.com/s/424056/stop-organizing-your-e-mail-says-study/

As with all things, your mileage may vary but at least I can feel less guilty about the '>999' message count on my mail icon . . :-)




Wednesday, 26 October 2016

Quick reminder on self signed certificate generation

Purely a quick reminder to myself on how to generate self-signed certificates . .

This assumes you have openssl - example here works on both Mac and Linux. .

Generate the private key
openssl genrsa -des3 -out privatekey.pem 2048

The -des3 prompts for a passphrase, the -out <<filename>> generates the key, the 2048 is the number of bits

Generate the certificate signing request (csr)
openssl req -new -sha256 -key privatekey.pem -out csr.csr

The -sha256 avoids worrying about whether you'll get a SHA-1 generated with an old version of openssl. -key <<filename>> points to the private key, -out <filename> generates the csr file

Generate the certificate signing request (csr)
openssl x509 -sha256 -req -days 9999 -in csr.csr -signkey privatekey.pem -out certificate.pem

X509 is the certificate type (Note no dash before this parameter), -sha256 avoids SHA-1, -days is how long the certificate is valid for, -in <<filename>> is the CSR file, -signkey <<filename>> is the private key and -out <<filename>> actually generates the certificate to a file.

Check the CSR
openssl req -in csr.csr -text -noout
Make sure this shows the SHA256 (older versions of SSL may default to SHA1)

Check the certificate

openssl x509 -in certificate.pem -text -noout

Friday, 20 May 2016

Is parentalcontrolsd eating your memory on your mac?

If you have a Mac, take a minute and run the Activity Monitor

(quickest way for me is to type: Cmd-Space and type 'activity' - good old spotlight)

Do you see a process called 'parentalcontrolsd'? If so, take a look at it:

If it's anything like on my Mac, you may now be saying 'HOWWW much memory?'


2.43Gb virtual? To do what? I don't even have Parental Controls switched on! When I search the web, it seems like no-one else with this problem does either - and there seem to be a lot of people having similar problems.

I'm on El Capitan (10.11.5) but I've had this for a long time. The weird thing is, it's on my 'work' Mac (15" pro retina) but not on my BYOD one that I also use for work and which has much the same software stack (13" pro retina). I've tried pretty much all the internet suggestions and got a whole load of nowhere.

Anyone any ideas?

At the moment, all I can offer is this: Macs have two useful commands for processes. Go to 'terminal' to use them:

pgrep parentalcontrolsd (or even just pgrep parental - it works with partial names)

If you get a number back, then parentalcontrolsd is running.

Then you need:
sudo pkill -9 parentalcontrolsd (you'll get prompted for your password - you need sudo to run this as root)

This kills it stone dead (as you can see in the screenshot). Use pgrep to check.

It's OK to use pkill even if it doesn't find the process - I keep it in a terminal window so I can just use 'up arrow' to run it when I need it. Which I do, because it keeps coming back . . .

More enlightened people will probably be able to create a scheduled job using cron or some such to kill it every hour or so.

**update** I've tried using Automator to run the pkill every hour or so - only problem is that I can't get automator to run a script as root/admin so I get permission errors . .any ideas? **update**

Even more enlightened people probably have a proper cure - if you do, please let me know!

Thursday, 12 May 2016

Microsoft Office / Visio not activating even though you have a license?

I use Visio 2010 at work- this is not about the product or the version!

We also have Office 365, but that doesn't include Visio - so I need to order it. The company obtains a license and sends me a link to an automated download/installer.

(For those wondering, yes, I have a Mac. Yes I also have a Windows VMWare image under Fusion)

And to be fair, it validates my internal ID, downloads and installs Visio, with the usual 'please reboot'.

Only problem is, Visio starts up with this:

"Microsoft Visio 2010 cannot verify the license for this product. You should repair the Office Program by using Control Panel."

(I can't screen-shot the dialog box as I now don't get it any more - sorry)

Control Panel offers a 'repair' but that doesn't work. Neither does uninstall/reinstall and plenty of rebooting of windows - thank goodness it's quick under VMWare on the Mac!

Control Panel lets me enter my license key: Nope, can't do that - company 'embeds' it somehow in the download - I don't know what it is.

Anyway, after LOTS of googling and thanks to many people at the Microsoft support forums, this worked for me.

1. Run cmd.exe, but right-click and use 'run as administrator'
2. Navigate to c:\Program Files (x86)\Microsoft Office\Office14
3. Type 'cscript ospp.vbs /act' (without the single quotes)

Easy and intuitive as I think you'll agree! YMMV - it worked for me . . . .