#!/bin/bash # set the application below application="gslapt" # set the path to the splash script below path="/usr/local/bin/splash_screen.py" /usr/sbin/gslapt& splash_screen.py& gwin="" while [ -z "$gwin" ] do gwin=`wmctrl -l | grep Gslapt` sleep 1 done splashpid=`ps -aux | grep "$path" | grep -v grep | awk '{print $2}'` kill -9 $splashpid exit 0