Anda di halaman 1dari 2

Ubuntu Community Ask!

Developer Design Hardware Insights Juju Shop More


signup login tour help

_
Ask Ubuntu is a question and answ er Here's how it works:
site for Ubuntu users and dev elopers.
Join them; it only takes a minute:

Sign up
Anybody can ask Anybody can The best answers are voted
a question answer up and rise to the top

How To Create Launcher For Application? [duplicate]

This question already has an answer here:


How can I edit/create new launcher items in Unity by hand? 15 answers

I am using Ubuntu 13.04, I recently downloaded Fritzing .tar.bz2 , which I extracted it & there is one .sh le, 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.

13.04 launcher

asked Aug 10 '13 at 2:23


NewbieLinuxUser
124 1 2 10

marked as duplicate by Seth , Eric Carvalho, Kevin Bowen, Jorge Castro, Luis Alvarado 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 specically 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

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

[DesktopEntry]
Name=Steam
Comment=ApplicationformanagingandplayinggamesonSteam
Exec=/usr/bin/steam%U
Icon=steam
Terminal=false
Type=Application
Categories=NetworkFileTransferGame
MimeType=xschemehandler/steam
Actions=StoreCommunityLibraryServersScreenshotsNewsSettingsBigPictureFriends

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

sudogedit

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


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

[DesktopEntry]
Name=Fritzing
Comment=
Exec=sh[linktofile]
Icon=[linktoicon(notrequired)]
Terminal=false
Type=Application
Categories=[choosewhatcategoriesyouwantthisfiletofitintosuchas
Game,Browserext.]

It is important to note that the link to the les 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 le, right click, go into properties, permissions and make sure that
Allow executing as le is ticked. Then restart, it may not be required though.

Terminal way:

1.

cd/usr/share/applications/

2.

gksugedit[yourchosendesktopfile]
or
sudonano[yourchosendesktopfile]

3.

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

4.

chmoda+x[yoursaveddesktopfile]

5.

You may need to restart you pc

sudoreboot

edited Apr 8 '14 at 2:30 answered Aug 10 '13 at 2:45


Vromoth
356 1 3 10

6 dont use "sudo gedit" use "gksu gedit" instead k1l Apr 5 '14 at 23:26

Anda mungkin juga menyukai