Package Search
Members: 353 | Topics: 767 | Posts: 3211
We welcome our newest member: ClintBarton
» You aren't logged in, login or registerOnline: No members and 9 guests | Time: 17:54
HOWTO: create a gnome menu entry
paldo Support Forum    paldo    General Support
Reply Reply   Subscribe Topic Subscribe Topic
2 posts found.
 HOWTO: create a gnome menu entry
Posts: 1187
Registered: 2006-11-23
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:
Code[In neuem Fenster öffnen]
sudo gedit /usr/share/applications/nexuiz.desktop

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.,
Code[In neuem Fenster öffnen]
[Desktop Entry]

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]
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:
Code[In neuem Fenster öffnen]
sudo gedit /usr/bin/

which looks like this:
Code[In neuem Fenster öffnen]
cd /home/amnon/cube/

save and close. then, to make it executable, do a
Code[In neuem Fenster öffnen]
sudo chmod 755 /usr/bin/

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:
Code[In neuem Fenster öffnen]
Profile   Private Message   E-Mail
Created: 2006-12-26 12:42
Highlight selected Text   Edit   Delete   Quote Reply
 Re: HOWTO: create a gnome menu entry
Posts: 426
Registered: 2004-09-09
Thanks for writing the HOWTO. This is useful information for anyone packaging an application without menu entry for paldo. Users who just install an application locally, i.e. without Upkg, don't have to manually create menu entries as described in your HOWTO; right-clicking on the Applications menu reveals a graphical menu editor.
Profile   Private Message   Web
Created: 2006-12-28 17:48
Highlight selected Text   Edit   Delete   Quote Reply
Subscribe Topic Subscribe Topic
powered by bitron board 1.23a