running in gnome-terminal solved
Quote:
I put this at the top of my bash scripts:-
Code:
tty -s; if [ $? -ne 0 ]; then konsole -e "$0"; exit; fi
If the script is not running in a terminal then it restarts itself in Konsole.
|
For Gnome-Terminal you run it like this:
Code:
tty -s; if [ $? -ne 0 ]; then gnome-terminal -x "$0"; exit; fi
Last edited by Schlammsuhler; 11-26-2012 at 02:33 PM.
|