I'm pretty sure the above has nothing to do with ATK inherently, seems more a general error with your X-Windows.
As for the license error, you should have a license server set up, so make sure you have a network connection to it, and that the environment variables (see
documentation) are set. To troubleshoot license errors, try running (as one single command)
LMX_EXTENDEDLOG=license.log atkpython
and look into the file license.log that will be created (in the current directory) about where ATK tries to find the license, and where it fails. Then you will see if it even tries to connect to the license server.