Adopted to run on Ubuntu.