Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

I am using Ubuntu 13.04, I recently downloaded Fritzing .tar.bz2 , which I extracted it & there is one .sh file, which I have to execute everytime from terminal to run the application.

My question is, Is it possible to create a launcher of Fritzing & make it show up in Applications in Dash ? If it is, then please help me out with steps.

Thank you.

share|improve this question

marked as duplicate by Seth, Eric Carvalho, Kevin Bowen, Jorge Castro, Luis Aug 10 '13 at 10:40

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Not really a duplicate since it doesn't specifically ask how to do it by hand. A reply with a GUI would have been welcome –  David V. Dec 11 '13 at 9:08

1 Answer 1

Ok this is quite simple, what you want to create is a named file with a .desktop extension such as below(Here is an image):

[Desktop Entry]
Name=Steam
Comment=Application for managing and playing games on Steam
Exec=/usr/bin/steam %U
Icon=steam
Terminal=false
Type=Application
Categories=Network;FileTransfer;Game;
MimeType=x-scheme-handler/steam;
Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends;

What you can do is run gedit(or your favorite text editor) with sudo by using the terminal application.

sudo gedit

Browse to the /usr/share/applications/ directory. It should look something like this:

enter image description here

Select any .desktop file, it should look something like the steam.desktop example above. After you have edited it it should be close to this:

[Desktop Entry]
Name=Fritzing
Comment=
Exec=sh [link to file]
Icon=[link to icon(not required)]
Terminal=false
Type=Application
Categories=[choose what categories you want this file to fit into such as Game,Browser ext.]

It is important to note that the link to the files has to be the full link not a short ~/ link. Also if you want to run your script as root add "gksudo"(gksudo has been removed from ubuntu as of 13.04, you can install it by running the command "sudo apt-get install gksu" in the terminal) before the sh command on the Exec line.

Once you have saved your file, right click, go into properties, permissions and make sure that Allow executing as file is ticked. Then restart, it may not be required though.

Terminal way:

1.

cd /usr/share/applications/

2.

sudo gedit [your chosen desktop file]
or
sudo nano [your chosen desktop file]

3.

Edit it then save as what you want to call it.

4.

chmod a+x [your saved desktop file]

5.

You may need to restart you pc

sudo reboot
share|improve this answer
    
dont use "sudo gedit" use "gksu gedit" instead –  k1l Apr 5 at 23:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.