Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 18638

Summary: Global Menu System
Product: Portage Development Reporter: Heinrich Wendel (RETIRED) <lanius>
Component: UnclassifiedAssignee: Sergey Kuleshov (RETIRED) <svyatogor>
Severity: enhancement CC: deviantgeek, hanscats, jjk3, jrmalaq, k, mccary, pauldv, seemant, ska-fan, svyatogor, tawesley,, tom, wolfjb
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Heinrich Wendel (RETIRED) gentoo-dev 2003-04-02 09:00:23 UTC
There have been 1 or 2 bugreports regarding this and a discussion in the forums, but there is still nothing be done. So are there any efforts to put a menu-system in portage, so that I can use the same menu in gnome, kde, icem, fluxbox, etc. as I can in Debian?
Comment 1 Heinrich Wendel (RETIRED) gentoo-dev 2003-04-02 09:33:28 UTC
Forum Thread:

Bug 5510
Bug 10429
Comment 2 Seemant Kulleen (RETIRED) gentoo-dev 2003-04-06 05:56:23 UTC
*** Bug 17727 has been marked as a duplicate of this bug. ***
Comment 3 Peter Penkala gentoo-dev 2003-04-06 15:48:49 UTC
Just throwing in my vote for this being optional.

More of a rhetorical question as food for thought.  I haven't reviewed the standards yet, so ignore if this is already accounted for in some way.  

Would it be reasonable to allow some customization to be done automatically?  For example, lets say internet apps are installed into a submenu option called "Internet".  Would it be possible to tell a configuration file to interpret Internet as WWW?
Comment 4 Heinrich Wendel (RETIRED) gentoo-dev 2003-04-07 10:23:16 UTC
>> For example, lets say internet apps are installed into a submenu option called "Internet". Would it be possible to tell a configuration file to interpret Internet as WWW?

The freedesktop standard supports .directory files in which you can tell how the directory should be named.

Besides from this, I think it should be no problem to add an application to the menu, e.g. with an dodesktop call in portage or somewhat like that, but what to do with the native applications of gnome/kde? Should the gnome/kde ebuild contain a .desktop entry for every app?
Comment 5 Sergey Kuleshov (RETIRED) gentoo-dev 2003-05-31 11:29:43 UTC
I guess this is very useful.
Here is my suggestion on who it should work.
On the system we have a central location for the menu, say /etc/menu.d/
Here all subfolders represent categories and files - menu entries
respectively. The file contains three entries, something like this:


These entries are created when a pckage is merged by a special domenu command
in a ebuild. E.g. domenu Editors, GVim, gvim
In addition to the categories folder the menu.d/ would contain a folder
"rules", which has the ebuild style files describing how the menus for each
installed wm/de should be generated. It would look like this:

init_menu() {
#Do all nessecary init. here. Eg. touch the menu file.

start_menu() {
#Wright whatever should be in heading of the menu.
#Especially important for one file menus file fluxbox.

write_entry() {
#Ovious. Here we have ${Cat} ${Name} ${Com} vars defined and set.

end_menu() {
#whatever should be done to finish the menu.

Now the most important step: genrating users menu. First of all a user should
have a choice of whether to use this system or not. If the user likes it he
should add a call to syncmenu (a bash scipt) to the .bash_profile or whatever

When the syncmenu starts it first of all syncronises the ~/.menu with
/etc/menu.d (It will basically sync everything except the files that have
Custom tag - means edited by user and don't touch). Then this file sources
the files in the /etc/menu.d/rules and calls the functions in the order:
init, start, write (for every entry), end.

I guess the system is quite flexible and allows to support any wm,
irrespectively of the menu style it uses. 
I'll try to implement it.
Comment 6 Sergey Kuleshov (RETIRED) gentoo-dev 2003-06-01 13:53:16 UTC
I am already developing this system, so for the time being I'll accept it. When it'll be ready i'll reasign it to soemone with nessecary permisions.
Comment 7 Heinrich Wendel (RETIRED) gentoo-dev 2003-06-01 13:54:15 UTC
This could also be interesting:
Comment 8 Heinrich Wendel (RETIRED) gentoo-dev 2003-06-01 13:57:04 UTC
Instead of your own app files, you should use .menu files described in the free desktop standard, they are natively supported by kde and gnome and also support i18n.
Comment 9 Spider (RETIRED) gentoo-dev 2003-06-04 09:55:30 UTC
I agree with the previous poster.

Along with that, the standard files are rather easy to parse, and lets you just merge the menus into other formats with some creative shell or python scripting.

also, I think the idea of adding a .desktop /.menu file inside an applications "files/" section , instead of doing an additional "domenu" for each ebuild is a good one.

Comment 10 Sergey Kuleshov (RETIRED) gentoo-dev 2003-06-04 11:21:12 UTC
Yep, Spider, I did think already about adding the .desktop entries into files/ dir, but I need to check if it is ok with regards to the current policy. 

However, it doesn't save us from domenu commands for the following reason: the menu entries might depend on USE flags. E.g.: We don't want Mozilla Mail menu entrie to be installed if moznoirc is in USE.
Comment 11 Heinrich Wendel (RETIRED) gentoo-dev 2003-06-05 00:15:04 UTC
I don't see the problem ;D Each app has to supplie one or more .desktop files and they can easily be inserted in /etc/menu.d (or whereever) by a domenu command :)
Comment 12 Heinrich Wendel (RETIRED) gentoo-dev 2003-06-05 08:33:33 UTC
Let me give you some more problems to discuss :)  
first: we need a good menu structur, take a look at the debianish one  
(, vfolder  
(, and the categories metioned  
in the freedesktop standard  
second: how to add all the applications supplied by kde and gnome to the menu, the only possibility  
I see atm is that the packages have to supply a .desktop entry for each application. A problem could  
be some DE specified entries, like KDE ControlCenter, but there is a keyword "OnlyShowIn" in the  
freedesktop standard that could be used for this purpose.  
third: we need i18n support, but this shouldn't be a big problem, as it is also supported by 
fourth: how to script all the convertes for the different WM's and DE's, one script for each wm or 
one config file (this must be very flexible) which will be parsed and then generates a menu. 
Comment 13 Heinrich Wendel (RETIRED) gentoo-dev 2003-06-19 12:15:35 UTC
for development status take a look at
Comment 14 Seemant Kulleen (RETIRED) gentoo-dev 2003-06-25 06:20:03 UTC
*** Bug 5510 has been marked as a duplicate of this bug. ***
Comment 15 Heinrich Wendel (RETIRED) gentoo-dev 2003-07-16 08:30:49 UTC
*** Bug 10429 has been marked as a duplicate of this bug. ***
Comment 16 SpanKY gentoo-dev 2003-07-16 14:59:13 UTC
i added a `make_desktop_entry` to eutils some back because this came up when we 
were unifying app-games install processes ... 
i do not really like the file/.desktop idea because you'd have things duplicated ... but it 
may be the only way to go for proper NLS support ... 
Comment 17 Heinrich Wendel (RETIRED) gentoo-dev 2003-08-04 11:52:59 UTC
*** Bug 4884 has been marked as a duplicate of this bug. ***
Comment 18 Heinrich Wendel (RETIRED) gentoo-dev 2003-09-15 12:02:09 UTC
*** Bug 25797 has been marked as a duplicate of this bug. ***
Comment 19 Heinrich Wendel (RETIRED) gentoo-dev 2003-09-27 11:39:15 UTC (just another thread that
refers to this topic)
Comment 20 John Richard Moser 2003-10-30 19:11:02 UTC
Ugh this is confusing me ;-)  Well, better safe than sorry, so I'll spread
my peace.

At any rate, it seems that if you install ONLY IceWM, and install a lot of
crap, nothing shows in icewm's menus.

I have nothing under Gnome, KDE, or Programs in Icewm.  I don't have Gnome
or KDE installed.  I have a lot of stuff installed.

At any rate, some sort of core menu system is needed, I'll agree, but it
will probably involve patches to applications.  As for users' menus, there
should be some sort of overlay in $HOME for users involving IGNORing specific
menu entries and ADDing your own entries.  These systems shouldn't need to
have strange and mystical bendiness for odd WM's; just PATCH THE WM if it
doesn't use those menus, and ASK THE MAINTAINERS to include the patch in
the next release.  That way the system will spread.

Use a separate library to read menu entries.  That will make patching apps
easier, and make matinence so much easier too.
Comment 21 Heinrich Wendel (RETIRED) gentoo-dev 2003-12-16 07:11:10 UTC
This is now handled by the following glep:
Comment 22 Seemant Kulleen (RETIRED) gentoo-dev 2003-12-16 07:24:08 UTC
*** Bug 35929 has been marked as a duplicate of this bug. ***
Comment 23 Seemant Kulleen (RETIRED) gentoo-dev 2003-12-16 07:24:15 UTC
*** Bug 35930 has been marked as a duplicate of this bug. ***