Better detections and installing on Ubuntu