Changed test.sh to work with GUI