I have a c program that runs well from xterminal. I enter ./prog1 and it does what I expect, displaying what I want to see in the window. Now I want to run this program from a desktop icon but I cannot find a way to do it, again within a terminal window. I am sure this is a simple task but I can find nothing on the web that helps guide me to the solution. I would like to click on an icon and have a terminal window open and my program run. My program required input to terminate. Any assistance is appreciated.

Last edited by gaumaugher on Wed Oct 17, 2012 6:14 am, edited 2 times in total.

Ok will assume it's cinnamon, so to answer your question, right mouse the menu and choose Edit menu. In the menu editor, select the category on the left you want the item to be in then click the New Item button. fill in the details for your application ensuring you tick the Run in terminal box. Save exit the editor and test it works. Once you're happy, right mouse the item in the menu and select Add to desktop.

[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.

You are good! That worked perfectly but I ran into one roadblock I cannot get around. I can click on the icon and it runs perfectly but I cannot add it to the startup group. I can go to menu->preferences->startup and add a program but the edit box does not have the type selector required to specify it to run in a terminal. I couldn't find a way of copying an icon into this group or dragging it in. Is there a back door to adding a program to the startup group from another group?

gaumaugher wrote:Is there a back door to adding a program to the startup group

Now that you have the desktop icon, the easiest way is to open the file manager at your home, turn on hidden files in the view menu or using Ctrl+H, then copy the .desktop file for your app from your Desktop folder to ~/.config/autostart where ~/ means your home and . indicates a hidden folder. It should then appear in Startup Apps but 'may' not run properly due to various quirks. If that is the case there are other options.

[Edit] your original post and add [SOLVED] once your question is resolved.

“The people are my God” stressing the factor determining man’s destiny lies within man not in anything outside man, and thereby defining man as the dominator and remoulder of the world.

That did get it into the startup group and it shows up when I open preferences->startup but unfortunately it doesn't run. I thought maybe it was attempting to run and then exiting before the system was completely ready so I added a 30 second sleep to the start of the program. No such luck.

I can create a terminal session in a script with:/usr/bin/gnome-terminalI put the script in the the startup group and it starts fine. Is there a way to feed in my startup command into the terminl from the script?

All of the higher level solutions I tried did not work but by adding a desktop entry file to ~/.config/autostart worked beautifully. The format was:[Desktop Entry]Type=ApplicationExec=gnome-terminal -x /home/user1/projects/prog1Hidden=falseX-GNOME-Autostart-enabled=trueName[en_US]=prog1.desktopName=prog1Comment[en_US]=My C test programComment=

With this, if you can create a program launcher that works from the desktop, it appears to work from the autostart. Thanks for all the help!