No, not a good idea as some cars have their lighter socket circuit switched, which means that it is unpowered when the key is off.Originally Posted by kingeorge36
It's like you are working on your home PC and someone pulls the plugs, not the greatest way to turn off a computer.
The best way to connect is throught a fuse (Escuse my spelling, English is not my native language) to the car's battery. The Switching ON-OFF proccess on properly designed power supply will have a sense wire that is wired to a wire that is live only when the key is in the ON/ACC or IGN position.
This way, when you turn the key off, the computer would turn off properly.