i made a directory in /usr/lacal/share because i think by the location you are saying,the desktop file will become available for other users too n then they will also be able to mount using that desktop file shortcut..so i think it should be in local itself right??
–
NirmikMay 23 '12 at 16:00

okay it worked for a terminal exicuting .sh file...now i want to add another bash file which has a gui and thus is not "Run in terminal".how to do that?? i tried changing terminal=false but it did not work...what should i do??
–
NirmikMay 23 '12 at 16:15

@Nirmik Can you give me script? so I can play with it.
–
virparaMay 24 '12 at 8:05

What @vipara said is mostly correct, except that I also found /usr/local/share didn't work for me. Also, you will need to run sudo update-desktop-database after adding this file in order to refresh the launcher apps. Also, there is a much easier way to create the .desktop files. First, make sure you have the gnome-panel installed (it was pre-installed on my 12.04 Ubuntu):

sudo apt-get install --no-install-recommends gnome-panel

Once you have this command, then you can run:

gnome-desktop-item-edit ~/Desktop/ --create-new

This will bring up a nice GUI window where you can select the application, icon, etc. It will dump the .desktop file on your desktop (or wherever you direct it), so you'll still need to sudo mv it to the applications folder and update the desktop database afterwards

An Ubuntu 13.10, you don't have to do anything extra like you mentioned, gnome-desktop-item-edit does it for you, and it appears on you desktop automatically.
–
xchg.caNov 8 '13 at 18:09

Sorry for the late reply : I've tried with IntellijIdea shell script, which I added into classpath, but in the desktop icon file WE MUST PUT THE ABSOLUTE PATH !
–
loloof64May 13 '14 at 6:44

In Ubuntu 14.x gnome-desktop-item-edit isn't pre-installed. After creating the desktop configuration file, just drag it to the launcher (Dock). (You can also select a custom icon: right-click the desktop configuration file, select Properties ..., click on the icon in the dialogue, select an image file.)
–
VincentJul 21 '14 at 9:33

I get an error: gnome-desktop-item-edit ~/Desktop/ --create-new gnome-desktop-item-edit: file:///root/Desktop does not have a .desktop or .directory suffix
–
Igor G.2 days ago