How to create a submenu to a registered category with xdg-desktop-menu?

Orcan Ogetbil oget.fedora at gmail.com
Fri Sep 4 10:09:58 PDT 2009


2009/9/4 Frédéric Mercille
>> 2009/9/3 Frédéric Mercille:
>> > I know I can use xdg-desktop-menu to add an application to a "registered
>> > category" (e.g. Office) in the desktop menu with a *.desktop file, and I can
> also
>> > add a new submenu at the root of the desktop menu with a *.directory file.
> What
>> > I would like to do, however, is create a submenu in a submenu that is
> already
>> > present.
>> >
>> > Here's an example of what I would like to have :
>> >
>> > (MENU)
>> >  |
>> >  +-- Games
>> >  +-- Graphics
>> >  +-- [...]
>> >  |
>> >  +-- Office
>> >  |     |
>> >  |     +-- MyVendorName
>> >  |     |       |
>> >  |     |       +-- MyAppName1
>> >  |     |       +-- MyAppName2
>> >  |     |       +-- MyAppName3
>> >  |     |
>> >  |     +-- OpenOffice.org
>> >  |     +-- Evolution
>> >  |     +-- Kontact
>> >  |     +-- [...]
>> >  |
>> >  +-- Settings
>> >  +-- System
>> >
>> >
>> > Using xdg-desktop-menu install MyVendorName.directory MyAppName.desktop
>> > creates a submenu at the root of the menu (sibbling of Games, Graphics,
> Office,
>> > etc.), but I don't want to pollute the root with my apps which clearly
> belong
>> > under the Office category (and the Category key is ignored for an entry of
>> > Type=Directory). Does xdg-desktop-menu allow that?
>> >
>> > Thanks.
>> > _______________________________________________
>>
>>
>> The documentation in freedesktop.org should be sufficient for you.
>> Here is an example for submenus and subsubmenus to multimedia menu
>> that I wrote using that documentation:
>> http://oget.fedorapeople.org/multimedia-menus/SOURCE/
>>
>> Orcan
>>
>
>
> If I understand your example correctly, at no point did you use any of the
> xdg-utils (either xdg-icon-resource for the icons, or xdg-desktop-menu for the
> menus), nor the $XDG_CONFIG_DIRS or $XDG_DATA_DIRS environment variables? From
> what I gather from your example and from the documentation, the answer to
> "Does xdg-desktop-menu allow the creation of a submenu in a submenu?" is "No
> it doesn't". You just copy your files to /usr/share and to /etc/xdg and pray
> for the best

Pretty much so. I use Fedora and adding the files to /usr/share and to
/etc/xdg is sufficient for them to appear in the desktop menu. Maybe
Fedora has some sort of "magic" that automates the changes to take
effect rightaway. Honestly, I don't know much about what's going on
behind the scenes, maybe other folks can help. Does your
distribution/Desktop Environment not make such changes visible
immediately?

Orcan


More information about the xdg mailing list