applications-merged xml example

detlef oertel oertel at uib.de
Fri Jan 28 10:34:13 EET 2005


Hello Waldo,

thank you for the example,
I was near this, but I didn't had the double <menu> tags.

I will test it in the next days.

thanks
detlef


Waldo Bastian wrote:
> On Wednesday 26 January 2005 15:42, detlef oertel wrote:
> 
>>I have problems to build a well formed and functional xml file for the
>>applications-merged directory.
>>The Desktop Menu Specification say in:
>>C. How to add your application to the menus
>>"Install an XML menu file to sysconfdir/desktop/menus/applications-merged/
>>to add any submenus, if your desktop entries aren't already included in
>>some common categories."
>>
>>Is here anybody who can help me over the first step with an example file ?
> 
> 
> Yes, see the attached message.
> 
> 
>>And one second question: will be there a standard for the tasks:
>>- putting a .desktop file to the Desktop
>>- putting a .desktop file to Autostart?
> 
> 
> Let's hope so. At the moment I can only tell you how to do it in KDE. If you 
> run as normal user you can do so by using
> 	$(kde-config --userpath desktop)
> resp.
> 	$(kde-config --userpath autostart)
> 
> If you run as root and want to install for all users on the system you can 
> use:
> 	$(kde-config --expandvars --install data)/kdesktop/Desktop
> resp.
> 	$(kde-config --expandvars --install data)/../autostart
> 
> Cheers,
> Waldo
> 
> 
> ------------------------------------------------------------------------
> 
> Subject:
> Re: adding menu items during installation
> From:
> Waldo Bastian <bastian at kde.org>
> Date:
> Thu, 3 Jun 2004 13:27:47 +0200
> To:
> kde-devel at kde.org
> 
> To:
> kde-devel at kde.org
> 
> User-Agent:
> KMail/1.6.52
> References:
> <33259.24.74.181.26.1086230678.squirrel at webmail.ncsu.edu>
> In-Reply-To:
> <33259.24.74.181.26.1086230678.squirrel at webmail.ncsu.edu>
> MIME-Version:
> 1.0
> Content-Disposition:
> inline
> Content-Type:
> Text/Plain; charset="iso-8859-1"
> Content-Transfer-Encoding:
> quoted-printable
> Message-ID:
> <200406031327.47122.bastian at kde.org>
> 
> 
> On Thu June 3 2004 04:44, swmcquig at ncsu.edu wrote:
> 
>>>Hello -
>>>
>>>I have been searching for answers on how to add a menu item with submenu
>>>items
>>>attached during application installation.  I have read about the menu
>>>editor and I am hoping someone would be kind enough to provide me with
>>>more information on .desktop and/or .directory file writing as this may or
>>>may not be a solution.  I have taken a look at a few items on the net and
>>>have viewed some of the .desktop and .directory files.  Some of what I
>>>have read has referred to XML files????  Please help.
>>>
>>>Summing my problem, I would like my installer to load the application,
>>>place an icon on the desktop, and add menu items to the menu.
> 
> 
> To install an application + submenu in the KDE menu see:
> http://pdx.freedesktop.org/Standards/menu-spec/menu-spec-0.7.html
> 
> For a submenu you will need to create a XML file describing the contents of 
> the menu and install it in /etc/xdg/menus/application-merged/
> 
> You should install a .directory file for the menu in 
> $(prefix)/share/desktop-directories/ The directory file specifies which icon 
> to use and contains translations for the menu-title.
> 
> For each individual menu-entry (that is part of the sub-menu) you must install 
> a .desktop file in $(prefix)/share/applications/
> 
> $(prefix) is typically /usr, /usr/local or $KDEDIR
> 
> Make sure you prefix all files with a vendor-id, e.g. "novell-" or "novell/". 
> If you write a non-commercial KDE application you can use "kde-" or "kde/".
> 
> To install an icon on the desktop copy a .desktop file to:
> 	$(kde-config --userpath desktop)
> 
> ===========================================================
> Menu Example
> ===========================================================
> 
> The company ShinyThings Inc. creates an application WebMirror 1.0 and wants to 
> install WebMirror and WebMirror Admin Tool in the KDE menu in a submenu of 
> its own. It will use "shinythings" as vendor id.
> 
> First of all we need two .desktop files:
> 
> $(prefix)/share/applications/shinythings-webmirror.desktop:
> 
> [Desktop Entry]
> Encoding=UTF-8
> Type=Application
> 
> Exec=webmirror
> Icon=webmirror
> 
> Name=WebMirror
> Name[nl]=WebSpiegel
> 
> 
> $(prefix)/share/applications/shinythings-webmirror-admin.desktop:
> 
> [Desktop Entry]
> Encoding=UTF-8
> Type=Application
> 
> Exec=webmirror-admintool
> Icon=webmirror-admintool
> 
> Name=WebMirror Admin Tool
> Name[nl]=WebSpiegel Administratie Tool
> 
> 
> We also need a .directory file for the submenu:
> $(prefix)/share/desktop-directories/shinythings-webmirror.directory:
> 
> [Desktop Entry]
> Encoding=UTF-8
> 
> Icon=webmirror
> 
> Name=WebMirror
> Name[nl]=WebSpiegel
> 
> 
> And finally, a .menu file that brings it all togther:
> /etc/xdg/menus/application-merged/shinythings-webmirror.menu:
> 
> <!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 0.8//EN"
>           "http://www.freedesktop.org/standards/menu-spec/menu-0.8.dtd">
> <Menu>
>   <Menu>
>     <Name>WebMirror</Name>
>     <Directory>shinythings-webmirror.directory</Directory>
>     <Include>
>       <Filename>shinythings-webmirror.desktop</Filename>
>       <Filename>shinythings-webmirror-admin.desktop</Filename>
>     </Include>
>   </Menu>
> </Menu>
> 
> 
> Cheers,
> Waldo
> -- 
> bastian at kde.org  |   Novell BrainShare Europe 2004   |  bastian at suse.com
> bastian at kde.org  | 12-18 September, Barcelona, Spain |  bastian at suse.com

------------------------------------------------------------------------

_______________________________________________
xdg mailing list
xdg at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xdg



More information about the xdg mailing list