Updating my fork script recently and noticed that the "export DISPLAY=:0.0" makes for epic fails and lots of MIT-MAGIC-COOKIE failures. Resolved by simply commenting out the export statements. Also note that running the script as root via sudo will result in a fair number of errors throw, based on the new 2017.3 Kali.