How do you get a KDE .desktop file to show in menu?
I am trying to create a binary RPM that will install and app, icons, etc. and put an icon in the Menu.
I am able to get everything else working. All the files go where they should, etc. And the newapp.desktop (which I'll call it for this example) is in the /usr/share/applications directory with the other KDE .desktop shortcuts. Now when I go to the menu it doesn't show up! I even tried rebooting and it still doesn't show up. I've noticed other KDE apps in RPMs would add icons to the menu. How do they do that? I'm trying to put let's say "newapp" in the Multimedia/Graphics menu. here's the newapp.desktop file: Code:
[Desktop Entry] |
Mandriva uses its own menu structure so many apps won't appear in the Mandriva menu unless they are designed for their menu. You could use menudrake to add the app to the menu or look into the structure of the Mandriva menu and change your .desktop file into their format.
|
Unfortunately, I already knew that. I am looking for how they did it. My desktop file is exactly the same format as the ones that installed and put an icon in the menu just fine. It should have worked but didn't. Even Open Office put menu items in ok. And the structure above is exactly like those files as well.
Problem is, nothing works even though it should. I need more detailed information. |
Look at the Mandriva Cooker website. I remember reading some articles about how to build rpms and configure menu entries.
|
Sorry, but that doesn't help me because that is a huge site and I have no idea where to look. Searches only turn up things that have no relevance to what I need to get done. I've also been googling, reading web sites (incluing Mandriva sites), and even followed the instructions in this site:
http://www.rpm.org/hintskinks/buildtree/mdk-rpm/#AEN642 I been reading up until 4am last night and started reading again around 11am this morning. I STILL can't get it working. Even though I added this to the RPM spec file: Code:
%install It would be very helpful if someone would kindly give me a URL to the answer, or some code examples or something. |
The Solution: How To Get RPM To Create KDE Menu Items
Ok, I've finally solved the problem after more googling and reading. :) Here is an example .spec file that one can use to build RPMs that will put a menu item into the KDE menu. It's heavily commented for your convenience.
Note that if this still doesn't work, you can always right click on the KDE menu, edit menu, then click the Save (diskette) icon and then after it's done, the icon should be in the menu. Though you shouldn't have to do this if you put it together based on this spec file as it should place the icon in the menu and update it automatically. Also this assumes that you are creating a $HOME/rpm directory with the appropriate BUILD, SOURCE, SPEC, etc. directories. In the BUILD directory, create a subdirectory for your application. Make sure it's the same as the application name. as that is what it uses here. Code:
|
All times are GMT -5. The time now is 06:54 AM. |