This is my dilemma. I have a program that can only be launched through terminal. So, right now I am always having to first open the terminal and then do the following ./theGUIScript
. It runs but I want to have a link or a executable script or application on the desktop that does the same thing but with double click. So, whenever I want to start this program, I double click on this link or script. I have looked at all the self-help online on this issue, but there seems to be no definitive answer. And whatever I try it doesn't seem to help. When I think I solved this issue, Ubuntu opens the file with gedit or popups a message saying there is a problem with the shortcut or link.
Asked
Active
Viewed 997 times
0

ThN
- 223
- 3
- 12
1 Answers
0
Just move your executable from the directory where it is to the desktop using the mouse. Or if you want to keep it in it's original directory, create a symlink.
Depending of whether I use a shell script with the extension .sh or a compiled c-program (with just the name a.out) the icons look different, the symbolic links showing some additional arrow, but the programs are being executed ok.
From what you write, the program is obviously executable by you.
What happens, when you right-click on the file? Do you see an option to execute the program?

nlu
- 101
-
I have a GUI application that can only be launched by running its own script in a terminal. I did try your suggestion and the application won't even run at all. So, I am having to always open a terminal and initiate the execution of this script just to run this GUI APPLICATION. I want to skip this step and simply want to click on a shortcut or a link on the desktop to this script which should execute. – Jan 30 '15 at 16:51
-
So this is an issue with this setup script or with the application itself. To debug this, call set -x at the start of the script, redirect output to some file and look, where and why the processing stops. Can you call this script from the terminal from your ~/Desktop directory too? – Jan 30 '15 at 16:55
-
no this is not a debug issue. The script and GUI application works as expected, but I am just looking for another way to start this GUI application instead of having to always manually start the GUI program by opening the terminal and typing
./myGUIscript
. I just want to simply click on shortcut or a link on my Desktop to this SCRIPT to start my GUI Application. – Jan 30 '15 at 17:01 -
Yes, got that and this works as described - you can try with any other program you know to work. That's why you have to look at the output of the script, when clicked (or start by executing from terminal, but in the same directory, where your to-be-clicked scripts reside, which is ~/Desktop). – Jan 30 '15 at 17:05
-
the script itself is within a folder. I can't seem to move it out of the folder and to the desktop. If I do, Ubuntu locks the file. So, you can't edit or run the file. – Jan 30 '15 at 17:24
-
Exec=
line in simplyExec=/path/to/your/executable_file
. If it needs to run from its own directory:Exec=/bin/bash -c "cd /directory&&./executable_file"
. If it is not executable:Exec=<language> /path/to/your/executable_file.extension
– Jacob Vlijm Jan 30 '15 at 20:55