modify script for remove terminal emulater