Added a command before script to fix the X11 error.