Saturday 29 January 2011

Googley Earth - tip "could not write to the current cache"

Google Earth runs great on ubuntu as do many applications, in fact many are developed on open source or linux environments and ported to Windows rather than the other way around.

Anyway, I noticed when I put Ver 5 and Ver 6 in that I had an obvious permissions error when starting, it would say "Google Earth could not write to the current cache or myplaces file location. The values will be set as follows:

My Places Path: "/home/username/.googleearth"
Cache Path: "/home/username/.googleearth/Cache"

Clearly the program has a default path which is not in the permissions route, normally you would expect to see this if for example you installed a program under your own user ID and not as root, if the default directory for storing files was under the ownership of root then clearly you cannot write here.

A simple fix though, the configuration file is held in this location:
/home/your_username/.config/Google
This is a hidden directory, the directory is case sensitive so Google is capital G.

The default for the two store locations are /root so this is obviously the issue as we're running the program as ourselves.

A quick check also shows we have the Google Earth cache in a subdirectory of our home in this case my home directory is "kevin" so the directory is:

/home/kevin/.googleearth
In there is the KML files and the Cache subdirectory.

To get everything going nicely just edit the config file (as sudo)

To save typing let's assume I've changed into the /home/kevin/.config/Google directory ?

sudo gedit GoogleEarthPlus.conf

right near the start edit the two lines below to show the path to your cache and main folder i.e the ones you have permissions for as in my example.

[Original]
KMLPath=/root/.googleearth
CachePath=/root/.googleearth/Cache

[Edited]
KMLPath=/home/kevin/.googleearth
CachePath=/home/kevin/.googleearth/Cache

Save the file and start Google Earth and the error is gone

It's clear to see here the original location is /root, if your running the program as yourself then you have no user rights in the /root folder unless the folder is chmod to 777 (or whatever permissions you would need) or your user is in the permissions group, this is not a clean way of doing things and you may as well mess about in the low security environment of Windows if your going down that route.
All that's been done here is to point Google Earth to your folder settings, in this case the cache files in /home/kevin i.e my files, I have permissions on my own files so when I launch the program by simply double clicking the desktop icon I am launching it with permissions "kevin", this all matches up and it means no one has messed about with security to open any holes etc.

In fairness I don't think I would expect the installer to make this change, in fact I would prefer to make it myself and define the KML and Cache paths for these exact reasons and that way I ensure I know where they are and the permissions they will need etc.

Tuesday 18 January 2011

Still trucking

It's been a short week with the Passat since the Astra went back to hopefully a watery grave.

Even in the short time I've had it the work run on a mixture of urban roads and winding country roads is giving me 7mpg more than the Astra and almost 5mpg more than the Avensis.

There are a couple of things I've noticed  on the Passat, the windscreen is strangely flat and actually smaller than the Avensis and perhaps the Astra but you only notice this if your hunting around the car looking for obvious things, in reality you will notice the roof struts and doors are pretty substantial, you get the feeling that in a crash this is the place to be.

Cruise control is a little different to the ones I'm used to, every one I've used so far takes the speed up or down about 1 or 1.5mph per click ,this takes it 5mph so I was taken by surprise when I engaged it and clicked it 4 times.

Engine is literally silent when idling, none of the normal tractor noises or body shaking that accompanies most diesels and apart from some noise when gunning it (might check the exhaust as I've no idea what the previous owner did to it) you would not know it's not a petrol car.

Quite a lively character, if you use the throttle gently then it obeys and whisks you along with a purr and a sense of purpose, if you stab it all the way then something is unleashed under the bonnet and you notice several warnings from the traction control if your not lucky.

Lots and lots of torque at low rev's considerably different engine mapping to any diesel I've driven before, you always had to give them some revs to get the power out and get the turbo kicking in or if you had a low pressure turbo you would get power low down then have to rely on the engine revs to deliver the rest.
With this you get a huge surge of power very low in the rev range, encouraging you to change up far earlier than you normally would, in fact you can pop into 4th gear at 40mph or less and accellerate quite comfortably, no engine banging or complaints.
If you resist changing gear and thrust the throttle forwards then it obliges with a force that makes you think somethings just ran into the back of you.
Although not the higest horsepower engine by far the torque is delivered where you want it and I find it's getting me to change gear like I used to 30 odd years ago when I had driving lessons (i.e correctly) and it has enough power to get up steep hills etc without dropping gear, in fact there is a very steep hill on the way to work and i've noticed yound lads in their pimped up Corsa's tear off at the traffice lights, as they hit the hill they start to sag and the Passat just whisps by with hardly a murmor.

It's certainly not as nippy as the Astra but that was perhaps the only thing in the Astra's favor and to be fair there are plenty of cars that will leave the Astra standing so that was a poor mans go kart.

Little touches like the quick warm up in the morning (4 mins to defrost this morning) and you see the difference to the 15 minutes the Vauxhall took, nice instruments and a nice cockpit to be in, you feel relaxed and in fact don't feel the need to drive around gunning the engine, you enjoy the drive and relax more - I've noticed already I woudl rather cruise along now and let everyone else race for pole position rather than drive like fury and get to work feeling i've done 5 laps.

Surprisingly VW now have a 1.6 td engine that delivers exactly the same HP and torque so this would be interesting to drive, I would estimate it's a little lighter so would enchance the feel but the tax bracket is considerably lower so a tempting engine to look at. Most modern diesels are bullet proof anyway you can mess about with throttle mappings and fuel injections etc and put as much power down as you like i've seen shoguns mapped to deliver more than you would feel safe with so I suspect the Germans have simply applied this and proven the engine won't self destruct.
Much like the old F1 days were BMW were building a new F1 engine on a budget, at the rear of a building (so the story goes) was a jumbled mess of engine bodies sitting exposed to the weather and covered in grass etc, in fact the story says the engineers there used to go for a wee wee over them as well.
On a budget they looked at these engine blocks and were surprised that they had no defects, the weathering had toughened up the blocks and effectively removed stress from them, they went on to build the first 1000hp turbo charged engine from these.

Anyone who takes rusty scrap and makes a F1 winner or puts touches like an umbrella slot in the drivers door has only one thing on their mind, a dedication to what they do.
My short time in Germany showed me the people are proud to be German and proud to do things to the best of their ability, the difference sitting in a "cheaper" Passat to the poorly conceived Astra says the Astra had few influences from across the water.

I'm pretty pleased with myself there, I went all the way through an article and never once mentioned the war ... oops

Saturday 8 January 2011

'Tis Witchcraft I tell ye

Finally the Astra has gone back, the recent snow was a similar match with the Astra to a large spark is to a leaking petrol pump, somethings got to happen.

The Astra was not cutting the mustard, turning a mere 34.7mpg regardless of how careful I drove it and in fact on motorways where you would expect economy (as your in 6th gear) the fuel consumption was hardly any better at all, I never got above 37mpg on it.

I will admit in the dry the car had very good road holding but always felt light and "tinny", the noise above 40mph meant you left the radio off for most of the journeys and it was as comfortable as sitting on an old bus.

Even better was the hire company noticed a large portion of the front lower fascia missing which must have snapped off during the cold period or simply decided it no longer wanted to be on the car so threw itself into a gutter.

As a final insult the windscreen washers blew a fuse and vauxhall use those tiny micro blade fuses so despite have a load of spare car fuses, none were suitable for this pile of junk.

It went back and I'm not sorry to see it go.

In return I picked up a pool car for a short while, a Passat 1.9Td saloon, amazingly the car is some £3000 cheaper and although a couple of years old the different is staggering.

The seats are deep and comfortable, the noise levels are considerably different, in fact at the same speeds I would do every day to work you hardly notice the engine is on and running, road noise is almost non existent and the whole car just purrs along.

Despite being the same size engine i.e 1.9 Td the power difference is not that noticeable, the  Astra needed some dubious use of the right foot to make it move or a prod of the "Sport" button to make it leap forwards, I found on twisty country roads such as the Pennines that the Astra needed considerable work to keep the engine providing power, if you went into a bend in the wrong gear you would lose all momentum and it would not pull itself out the bend unless you quickly dropped a gear.

With the Passat the engine gives an enormous amount of power at low rev's, you feel the torque and despite being a 5 speed gearbox can change up quite early in the rev range knowing the engine will simply apply the same high levels of torque in that gear as well, in fact you almost run out of torque if you simply floor the throttle, it's very similar to the first LET (Low End Torque) engines I first saw in the Fiat, Nova etc of their day, you had a short stroke engine giving lots of torque at the low end and it make for some great driving.

While this engine is providing you with more than enough torque your also finding on the country run to work I'm seeing about 7 mpg more at the moment - topping almost 42mpg. The previous owner decided to return it without the usual oil in the engine so I'm going to check the levels over the weekend and hopefully get the oil back as it should be.

Equipment is good, it has a feature I used to love in my Vectra, a simple LED light shining down into the car so at night the area around the gear lever is illuminated in a soft glow, the Vectra had a yellow LED, the Passat is Red, I don't mind the colour I just love the fact you can see what's what without too much messing.

The Radio is fine, I can hear it now and that makes a change, the heaters are more than ample, the Astra was often very cold - it was difficult to get the heating right and the fans were very loud on settings 3 or 4, the controls were placed so your hand obstructed the view when you were driving, on the Passat they are in fingertip reach of the gear lever and the fans are not only quieter but more powerful, rear passengers have their own air vents as well which is nice.

Defrosting is about 3 minutes on the Passat, about 10 minutes quicker than the Astra !

Nice touches such as heated wing mirrors (although they don't fold like the Avensis used to), the boot is perhaps crossing two time zones it is simply cavernous, although the car is a saloon and the first one i've had I have never seen a boot so large. The remote will open the boot for you which pops up nicely and you lose any bags in there due to the amount of space on offer.
The car has a keyless starting system, insert the fob into a slot and press and your started and ready to go, a really nice touch, no more keys bashing my knees as i'm driving along.

The Witchcraft ? Ah that will be the hand brake or rather the lack of it, if you instinctively put your hand down to grab the brake lever you will pick up some bottles, cans or sunglasses, this car has an electronic hand brake.
Pull up to a stop and press the "P" button and it apparently applies brakes to all 4 wheels, to release the brake you can simply drive off !
You can release manually but surely this is the work of the Dark one himself and a sign that no one can deny of Witchcraft ?

Despite expecting the car to simply roll backwards down hills etc it's actually a very clever idea, I now have a lovely range of cup holders in the center console, air conditioned glove box and center storage and more leg room than you can shake a cat at.

It's surprising the difference between the two cars, in many ways the Passat is very similar to the Avensis and you can see the difference, the Avensis had more gadgets (sat nat as standard, rain sensitive wipers etc) but you feel the build quality more in the Passat, not that I felt the Avensis was cheap and tatty - in many ways I miss the Avensis, had the previous owner not decided to dent every single body panel I would have considered purchasing it for my own use.

Time though to give the German auto industry some miles and I'm sure the Passat will not dissapoint...

One last thing, I noticed a pocket in the drivers door for ... an umbrella - the Germans REALLY know the British Market !

Saturday 1 January 2011

Lock it up for New Year



The subject on many lips lately is hackers and security, even more so with the announcement that someone can crack into your mobile phone calls and listen in with noting more than a cheap Motorola phone and some cunning skills.
An irony is that i have a firm belief that some of our greatest software advances are due to people cracking security in areas like Playstations, Xbox, WEP etc, this brings security forwards as people develop countermeasures and also brings skills out in testing and breaking those measures, I'm sure a time will come when a status quo will exist in the time and effort needed to break security will be far more than the rewards and people will simply not bother.

How can you help yourself ? I teach several subjects in my role and during the Desktop and Notebook course we discuss some basic security and their advantages.

Drivelock - if your system supports drivelock then this is one of the first defences.
This puts a password on the hard drive itself so in the event that someone powers up your system the drive will not mount itself or be accessible, what's important is to understand that Drivelock is a function of the hard drive not of the BIOS so although you set it through the BIOS if you remove the hard drive and attempt to bypass the operating system (for example putting it into a USB caddy) the drive will still be locked.

When setting Drivelock you will need to secure your BIOS (Drivelock will tell you it won't continue until you set a Bios password), set a good strong password then for Drivelock you normally have two passwords, the user level (your day to day password to unlock the drive) and the master password (In case you forget the user password or need to over ride it).

Once set the system will prompt for Drivelock password when booting the system, even if you intend to boot from USB drive or CD-Rom the system will still ask for it. This will prevent people using a boot disk such as Ubuntu live or a Windows recovery CD to bypass your OS login passwords and gain access to your data.

Drivelock is so efficient that if you remove the drive, put it in a USB caddy then to all intents you do not have a drive connected, you have not put the password in so the drive is not even visible as a device. To use it in an external caddy you must put it back in your system (or a compatible PC), enter the Drivelock password and in the BIOS disable the lock, at that point the drive behaves as any non protected drive.

People often ask me what happens if the encrypt their drive i.e will Drivelock work, Drivelock works BEFORE any OS is mounted it is at the drive firmware level so as an example, think of a car, you unlock the door and open it, get in, sit down and start the engine. Think of the engine as your Operating system, think of Drivelock as the car door (locked), in normal situations the door is not locked, you simply walk up to the car, open the door and start the engine.

With Drivelock you Unlock the door then start the engine (with a different key).

As another example imaging leaving your laptop on a train, could you power it up and get as far as the Operating system (where it asks you to log in) ?
If so then anyone with a live CD or Windows boot CD can easily start your system up, bypass any need for passwords and simply gain access to your files.

If you have some letters to the bank, perhaps a list of your passwords etc then everything on your laptop and far more is compromised.

Drivelock will secure your drive even when it is removed from your machine and attempts made to break into Drivelock cause it to lock the drive out after three attempts, at that point you must power down to try again.

If you have TPM (Trusted Platform Module) fitted then take control of your TPM chip, put ownership information in and secure your TPM.
TPM works by generating random numbers/keys, these are used for passwords such as https sessions, encryption and even drivelock.
One option in BIOS is normally to enable TPM Drivelock, this puts a 256bit (32 character) random password onto the drive, only Drivelock and the drive know the true password so you will never know it.

TPM will challenge you to prove your ownership (perhaps a fingerprint swipe), at this point TPM will unlock the drive - the beauty of this is that you can't use an obvious password as TPM chooses it, the strength set by TPM and it removes the weak point (you) from the password option.


TPM is also used if you decide to implement Bitlocker, this is Windows whole drive encryption, once Bitlocker is enabled then TPM will hold the master and run time keys that Bitlocker needs - should TPM fail (and your keys be lost) you can export a master recovery key for Bitlocker (make sure you keep this in a very very safe place).


As TPM is used more and more it will hold keys for just about everything, banking, log on passwords, file encryption passwords etc - should your TPM chip fail (or motherboard) then obviously the passwords are lost, TPM software allows you to export your keys to pen drive but you should NEVER export your master and public keys together, you can export your public keys and simply put the pen drive into a convenient drawer or even hang it on your wall, these are public keys and offer no security risk if others know them. Your public keys would be sent to others to allow them to send you an encrypted email, they encrypt it using YOUR public key.


With your master keys you would export them and take these to your bank and lock your pen drive away in the deepest vault, should your master keys be compromised you should dissolve them and immediately create new ones then refresh any applications that relied on these keys.
If someone sends you an encrypted email then you would decrypt it by using your master key, this confirms your credentials to the public key (used to encrypt the message in the first place) and is therefore of such importance you never reveal the master keys to the outside world.


Passwords - Where possible remove the human factor by using TPM to generate and secure your passwords, if not then use a long and secure password at least 14 characters/numbers, a non dictionary word and use special characters where possible.


You can increase a passwords security quite considerably by using special characters and numbers, take the following password "cheddar", now I like cheddar cheese so it's a simple word to pick (strength tests done using Microsoft password checker -


Password strength is weak, it is a dictionary word so easy to crack.
Cheddar - still weak.
C43dd4r - Strong
C43dd4r&! - Still Strong
1+L1k3+C43dd4r&1973 - Still Strong

One trick is to think of a passphrase (A sentence) and take key letters to form a password, let's consider "The Quick Brown Fox Jumps Over the Lazy Dog" - lets take the first letters of each word - TQBFJOTLD, it's not a long password so still considered weak.

How about the first and last letters, TEQKBNFXJSORTELYDG - this is now strong, the reason its not a very strong password is there are no numbers or special characters to increase the permutations.

Lets go back as step to TQBFJOTLD, lets put some numbers and special characters with it, let's assume we like the year 1986, let's put (using just 86), 8+TQBFJOTLD-6  we are now getting stronger but if you try this you will be amazed how easily you remember the password if you define some simple rules.

To explain in more detail, let's assume you have only 2 characters as your password and you use letters or numbers, this gives 26 lowercase characters plus 26 Uppercase plus 10 numbers per position = 62 possible characters for the first password position x 62 for the 2nd = 3844 permutations.

There are 32 special characters you can use so you can appreciate adding them into the equation makes each positions 26+26+10+32 = 94 possible characters, for our 2 character password this makes   8836 permutations for 2 characters.

If you have 14 character passwords, using combinations of all these then your password will have 94 to the power 14 or 4,205,231,901,698,742,834,534,301,696 permutations (more info here) .

TPM will generate 32 character passwords so you should by now appreciate that his is a significant amount greater in permutations for anyone to crack (I have no idea what this number is in English, surely more than a Trillion?)

 1,380,674,536,088,650,126,365,233,338,290,905,239,051,505,147,118,049,339,937,652,736



 Using TPM will generate passwords that are technically challenging for anyone to break through, it will remove the "human" weak point - we like to use dictionary words, it removes the need to remember complex passwords and as far as we are concerned there will simply be a challenge from the TPM chip to us to confirm ownership and then it will deploy the necessary password.

Once your rolling with Drivelock and perhaps TPM then start looking at using encrypted folders or containers to hold key files, Truecrypt is excellent for this as it is effectively a software representation of TMP functionality but in a program that runs in Windows, Linux etc and best of all - it's FREE !

Within 5 minutes you can have it installed and secure your key files in encrypted containers, their tutorials are excellent but all of this is useless if you don't use strong passwords.

Truecrypt allows one feature to help humans remove weak passwords, it allows "Keyfiles", these can be nothing more than a text file or a JPG, they form an additional file with your password to provide strength, if you encrypt a file container than you can put a password on it AND use a keyfile (perhaps a file held only on a seperate pen drive), you must then provide the password AND the keyfile to decrypt the data.

It has many other features but start at the beginning and go from there.