How do I add a launcher for .sh applications?
I have installed ubuntu (11.04).
I installed phpstorm which is simply an archive for you to extract and shove in your /opt directory.
To run it you would use /opt/PhpStorm-103.243/bin/PhpStorm.sh
In unity I had created a launcher on my desktop.
Now I have installed gnome-3(gnome-shell),
And I have nothing in my desktop.
So how do I run phpstorm quickly? Can I get it to show up in "applications"?
Solution 1:
PhpStorm now has a feature to create a launcher for you. It's available under:
Tools -> Create Desktop Entry...
This will add PhpStorm to the system menu for the current user or for all users. The created launcher is also compatible with Gnome Shell.
Solution 2:
I worked it out :D
In Terminal
gedit ~/.local/share/applications/<Your App Name>.desktop
In gedit
Here you should edit:
You can find more details and more keys in the freedesktop.org docs
[Desktop Entry]
# Define which specification version this entry is using
Version=1.0
# The application name (eg. "Gnome Terminal", "Firefox")
Name=My Awesome App
# The generic app name (eg. "Terminal", "Web Browser")
GenericName=Awesome App
# The Tooltip
Comment=This app is awesome!
# The command you want to execute
Exec=/path/to/sh/file/file.sh
# Whether the app should run in a terminal window
Terminal=false
# The pretty picture :D
Icon=/opt/PhpStorm-103.243/bin/webide.png
# The type of the desktop entry (Application, Link, or Directory)
Type=Application
# Categoies the app should be in
Categories=Network;WebBrowser;
# Mime types this launcher can open
MimeType=text/html;
# Localized version of the above info
Name[en_NZ]=My Awesome App
GenericName[en_NZ]=Awesome App
Comment[en_NZ]=This app is awesome!
Save the file.
Now your application will show in searches :)
Solution 3:
Alacarte application can help you. You can also find it under "Main Menu". Use the Software Center or
sudo apt-get install alacarte
Just choose a folder (not very important if you have Gnome 3, unless you use some menu extension) and then on the right New Item
. Here you can give the new launcher a name and browse to its location. You can also provide a logo by clicking on the logo.
Solution 4:
I'm using the gnome-shell in Ubuntu 11.10 and created my launcher for PhpStorm using the same method in Gnome 3 that I would have used in Gnome 2: I used the Main Menu application.
The application shows up in search and can be added to Favorites without any hiccups.