Ubuntu Support

Preliminary support for Ubuntu. It seems to work on my ubuntu and osx machines.