Open vanyossi opened 11 years ago
Tested in ubuntu. And it will probably work on any system running X11
if [ $TERM != "xterm" ] ; then xterm -e "$(pwd)/krita-install.sh" ; fi
Might not be pretty but it will launch a terminal with the script running Otherwise you could ban the script from the filemanagers More info here http://bash.cyberciti.biz/guide/Get_the_name_of_the_current_terminal But I didn't test this.
I have no idea if this will work on every system but on xfce it I call the terminal with the "-e" flag I get the terminal running the script.
The flag also works with "aterm", probably it would be a good idea to check with terminals are available, using "which" or some sort of bash witchcraft
The command if [ $TERM != "xterm" ] ; then terminal -e "$(pwd)/krita-install.sh" ; fi
I placed it before the line containing "# Script version"
This word on xfce. when I double click in thunar it launches the terminal with the script running.
*UPDATE: on my machine I erased "xterm" in favor of "aterm", so the comment below won't work on my particular gentoo customization but It could be a safe bet to use "xterm" as the comment below states because i explicitly removed xterm"