Sample Header Ad - 728x90

Launch BASH script by clicking icon and preserve terminal icon

0 votes
1 answer
2833 views
My problem is pretty simple, but I must admit, I don't know any elegant solution. I have a problem, that I often accidentally click different icon that I wanted. It's really very unpleasant, so I've decided to write a bash script, which will ask me if I really want to launch the program ( especially Eclipse, because it's pretty large and so it takes lots of time to load ). I had written it, then added its location to the __eclipse.desktop__ file... And now there's my problem. The Eclipse launcher works, but if I launch only Terminal, Eclipse icon shows up instead of original Terminal's. Do you know how could I solve this, if I wanted to keep my bash script working? ___ Here is my bash script __eclipseLaunch.sh__: #!/bin/bash echo "Do you really want to launch Eclipse? (yes = y)" read answer if [[ "$answer" = "y" ]]; then ~/.eclipse/eclipse fi And here is my __eclipse.desktop__ file: [Desktop Entry] Type=Application Encoding=UTF-8 Name=Eclipse Exec=gnome-terminal -e "bash -c \"~/.eclipse/eclipseLaunch.sh; exec bash\"" Icon=/home/martin/.eclipse/icon.xpm Terminal=false
Asked by Eenoku (1245 rep)
Nov 1, 2014, 12:06 AM
Last activity: Nov 3, 2014, 03:28 PM