I want a script to check if it has been started from within a terminal window. If it was started without window, it shall re-run itself in a visible terminal window.
If found this script line:
tty -s; if [ $? -ne 0 ]; then konsole -e "$0"; exit; fi
It works fine. However since it uses konsole
, it is specific to KDE. Is there a more portable solution that runs on Linux system without KDE as well?