CAVEAT: After u install a new app, u might think that the menu entry to that app is missing. Before u read any more, just log out and log back in. If the menu entry still isnt there, then follow this HowTo. Otherwise, u might overwrite the existing newly created menu entry or have duplicate entries.
Part 1
I will illustrate how I add a Gnome menu entry by giving an example. let us say I have downloaded the game called Nexuiz in my home folder and I want to make a menu entry. herez how I do it:
save this and close it. Now I have a neat menu entry under games in Gnome menu called "Nexuiz"
Now I will explain what I have done though most of it is self-explanatory.
1) u need to choose a filename (lets say "xyz.desktop") insteadof nexuiz.desktop depending on how u want to name the file. however, it will be at the same location (/usr/share/applications/)
2) Now about the entries in the file:
The first 3 lines will be the same for all applications ie.,
Exec will contain the path of the executable
Icon will contain the path of the icon u want to choose for the menu entry (try to make sure its a .png or .xpm file)
Terminal will have a value of
true if u want to run the application in a terminal window. Most GUI apps u would NOT want to run in terminal, so u can keep it as
false
Name and
Comment are self explanatory
Categories is the crucial one.
here u CANT put in anything u want (u are restricted by certain keywords)
Make the first word
Application; (the semicolon is important)
The second word can be one of the following depending on where u want your app to appear in the menu:
Code | [In neuem Fenster öffnen] |
|
GNOME MENU
Menu Entry ---> second word that u have to put in category (followed by semicolon)
----------------------------------------------------------------------------------
Accessories --> Utility;
Edutainment --> Education;
Games --> Game;
Graphics --> Graphics;
Internet --> Network;
Office --> Office;
Programming --> Development;
Sound & Video -->AudioVideo;
System Tools --> System;
Others --> Other; |
Now u are all set. save and exit. u will immediately have a new entry in your Gnome menu.
Part 2
there are certain apps that will not run till u execute them from the folder in which they reside (in other words u have to cd to that folder or open that folder in nautilus and execute it. These are generally binary files which u have downloaded and u run them directly without installing. Example: The game CUBE.
How do u add a menu entry in this case? If u add a menu entry just like u did in part 1, the app wont run because u are not running it from its folder. even creating a shortcut doesnt work.
In this case this is what u do:
u make a small script by doing:
which looks like this:
save and close. then, to make it executable, do a
thats it! u are all set. Now point to this shell script in ur desktop menu entry. Thus for this case
Exec in
xyz.desktop will look like:
[