Page 1 of 1

SOLVED How to install new apps without changing menu?

Posted: Mon 02 Jul 2007, 15:57
by bugman
Every time I install a new app (pet) it overwrites the menu, and I have to go find my old menu (which has a number of customized additions pointing to favorite docs and such) and re-name and move and etc.

Is there a way to avoid this? Or am I doing the menu mods wrong in the first place...

[edited to add I'm using icewm but I think I've had this problem with jwm as well]

Posted: Mon 02 Jul 2007, 18:37
by headfound
Doesn't a .pet just add a .desktop file to
/usr/share/applications
and then fixmenus?
The proper way to add menu entries is to make a .desktop file for each one which will show up in jwm or icewm.

EDIT - you could always rename the .pet to .tar.gz and extract it, remove the .desktop file plus the commands pertaining to any menu entries, then rezip it and install. (Yeah, I know, a little pointless!)

Posted: Mon 02 Jul 2007, 19:22
by stargazer
edit

Posted: Mon 02 Jul 2007, 21:37
by bugman
Thanks, headfound and stargazer! I was unaware of the process, and of fixmenus, which must be what is destroying my old menus.

:D

Posted: Tue 03 Jul 2007, 01:15
by John Doe
bugman wrote:Thanks, headfound and stargazer! I was unaware of the process, and of fixmenus, which must be what is destroying my old menus.

:D
Hey, you can make some custom *.desktop files for your custom entries and then forget about it all together.

put this in a file named NameOfFile.desktop and put it in /usr/share/applications. Then run fixmenus, restart X and you will have a custom entry.

This one will go under "multimedia". Check the other .desktop files for what Category you want.

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Link to my-documents
Comment=Open my-documents
Exec=rox ~/root/my-documents
Icon=/usr/local/lib/X11/mini-icons/mini-folder.xpm
Terminal=false
Type=Application
Categories=Application;AudioVideo;
StartupNotify=true

Re: How to install new apps without changing menu?

Posted: Tue 03 Jul 2007, 02:29
by WhoDo
bugman wrote:Is there a way to avoid this? Or am I doing the menu mods wrong in the first place...
You need to edit the template for icewm menu rather than editing the resulting menu file.

The template lives in /etc/xdg/templates and is the framework around which changes are made. fixmenus takes the template, adds the submenus and programs from .desktop files and creates a new menu file in /root/.icewm each time. That is what is happening to your old links.

If you put your modifications in the template file, fixmenus will only add to that rather than replacing it.

Hope that helps.

Posted: Tue 03 Jul 2007, 11:08
by bugman
More outstanding help! Somebody tell DistroWatch!

Marking this thread 'solved' now, and getting to work on that template file...