initial linux/cairo support + lots of tweaks