80

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"?

Bruno Pereira
  • 74,715
Hailwood
  • 5,017

11 Answers11

78

PhpStorm now has a feature to create a launcher for you. It's available under:

Tools -> Create Desktop Entry...

Ubuntu 12, PhpStorm 6 /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.

Ubuntu 12, PhpStorm and Unity launcher

quantme
  • 163
Rowno
  • 1,121
53

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 :)

Dan
  • 14,180
Hailwood
  • 5,017
37

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.

Sina
  • 1,063
13

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.

Launcher Properties

The application shows up in search and can be added to Favorites without any hiccups.

esoltys
  • 331
4

More "graphical " way of doing this:

  1. Go to folder ~/.local/share/applications using Nautilus or whatever file explorer.
  2. Copy and paste some existing shortcut with icon you like.
  3. Right click on new shortcut and change property to point to your script or application.
  4. Drag it on launcher/taskpan.
  5. You can also open it in text editor and do more fine tuning.
1

You could install the MyLauncher extension. It will produce a menu on the panel which you can edit by right-clicking. Just about anything can go in it: links, folders, shell scripts, etc.

MyLauncher Gnome Shell Extension

mark
  • 43
mark
  • 41
  • 2
1

For 12.10

gnome-desktop-item-edit --create-new ~/Lauchers/for/example/

or

sudo gnome-desktop-item-edit --create-new /usr/share/applications/
Zamp
  • 26
1

Getting the program to show up in the search seems to be difficult at best, which I'm sure will get better as Gnome3 matures and progresses. (The state of Gnome3 right now will certainly not be the same in a month.)

In order to add an application as a favorite (so that it shows up in the launcher on the left of the "Activities" screen), simply hit Alt+F2, and run the application or script you want. While it is running, enter the "Activities" screen, and drag the running application to the favorites. I have used this only for programs that use a GUI, but feel free to play with it.

Hope that helps.

I will add: I'm not in love with Gnome3 as it currently stands, but it's a step ahead of Unity, and I'm excited to see where it goes in the future. One great thing about open software, it moves fast. We should see a rapid progression in changing and adding features. These are critical times in the evolution of the desktop metaphor.

Dave
  • 11
0

source : github
link: https://github.com/darkridene/external-app-runner
the easiest way to manage sh file is using an app name external-runner it is based on python3 and opensource visit to the author site

there will be an debian package named external-runner-0.8.2_all.deb download it, then cd in to the folder in which package is downloaded install it by

sudo apt install ./external-runner_0.8.2_all.deb

than open the app from your menu named External-runner

click on add option screenshot of the app

after that an dialog will open screenshot of the dialog then click on browse button select the name of the app in filedialogimage of filedialog

after the selection of the app click ok it will add an shortcut on left corner of the app click the app name in the left corner to execute that app

0

I'm not familiar with Gnome3, but with an older Gnome, you can right-click on the application menu, and click on Edit Menus - that'll allow you to modify the menu tree. Select the submenu you want your launcher to appear in, then click New Item and point it at the path to your shell script.

Erigami
  • 4,536
0

if PhpStorm.sh is a terminal application Find a method to create new launcher or lense and populate it with following command

gnome-terminal -x sh -c "<path to PhpStorm.sh>"

else if it is a greaphical shell script using zenity or equivalent use similar method to create and populate launcher with following commad

sh -c "<path to PhpStorm.sh>"
puneet
  • 1,302