This took a lot of work to get right, and i am no longer using it in my private project so here you go. This is tested on ubuntu server and fully installs google-chrome along with a custom plugin.