[kde] Still trying for "legacy-only" menus

Waldo Bastian bastian at kde.org
Fri Aug 13 13:45:22 EEST 2004


On Thursday 12 August 2004 15:56, Bryan K. Wright wrote:
> Hi folks,
>
> 	Thanks to James Richard Tyrer <tyrerj at acm.org> for pointing
> me in the right direction.  His suggestion works fine.
>
> 	I was originally just replacing /etc/xdg/menus/applications.menu.

I just tried, and replacing /etc/xdg/menus/applications.menu with just a 
LegacyDir entry works just fine here (Although you will need to keep some of 
the stuff from the original applications.menu if you want to keep a working 
control center, see below)

Do you happen to have a $HOME/.config/menus/applications.menu file? What does 
it say?


Let me explain which line does what in the applications.menu file that James 
posted:

<Menu>

It's a menu :-)

        <Name>KDE</Name>

Internal name of the menu

        <Directory>kde-main.directory</Directory>

Defines user visible name and an icon for the menu. Not really used since this 
is the top-level menu.

        <!-- Search the default locations -->
        <KDELegacyDirs/>

This includes all files from $KDEDIR/share/applnk and $KDEHOME/share/applnk, 
somewhat similar to:
<LegacyDir>$KDEDIR/share/applnk</LegacyDir>
<LegacyDir>$KDEHOME/share/applnk</LegacyDir>
but you can't use environment vars in applications.menu and it handles the 
case where $KDEHOME is not explicitly set

        <DefaultAppDirs/>

This includes all desktop files from /usr/share/applications, 
$KDEDIR/share/applications and $HOME/.local/share/applications. Where they 
will actually appear in the menu is determined by the <Include> statements of 
the various menus. It's important to include this line, because it will make 
sure that the .desktop files for the control center items are available.

        <DefaultDirectoryDirs/>

This specifies the locations to look for .directory files. (See 
kde-main.directory above). .directory files contain the user visible name of 
the menu as well as the icon for the menu. The default locations specified by 
this command are /usr/share/desktop-directories/, 
$KDEDIR/share/desktop-directories/ and 
$HOME/.local/share/desktop-directories/

        <DefaultLayout>
                <Merge type="menus"/>
                <Merge type="files"/>
                <Separator/>
                <Menuname>More</Menuname>
        </DefaultLayout>

This specifies the default layout: the order/way the menu items are arranged 
within a menu. It is used for every (sub-)menu that doesn't explicitly 
specify a layout

        <Layout>
                <Merge type="menus"/>
                <Menuname>Applications</Menuname>
                <Merge type="files"/>
        </Layout>

This is the layout used for the current (=top-level) menu.

        <DefaultMergeDirs/>

This command instructs to include all .menu files found in the default merge 
directories. The default merge directories 
are /etc/xdg/menus/applications-merged/ 
$KDEDIR/etc/xdg/menus/applications-merged/ and 
$HOME/.config/menus/applications-merged/

This makes that the 
/etc/xdg/menus/applications-merged/X11-legacy.menu file that you created gets 
included.

It will also ensure that 
$KDEDIR/etc/xdg/menus/applications-merged/kde-essential.menu gets included 
which is needed by the control center.

        <MergeFile>applications-kmenuedit.menu</MergeFile>

This includes $HOME/.config/menus/applications-kmenuedit.menu Changes made 
with kmenuedit, the KDE menu editor, are saved here.

</Menu>

> Now that I've moved my configuration into:
>
> 	/etc/xdg/menus/applications-merged/X11-legacy.menu
>
> and substituted JRT's version of applications.menu, thing behave the
> way I want them to.

Good to hear that.

> 	One caveat for others like me who are trying to do this:
> if you copy any *.desktop files from FC2 into your "legacy" tree,
> you'll need to edit out the "Categories" lines in the files,
> otherwise the applications won't show up on the menu.

If they have a Categories line they will not be placed in the menu based on 
their location in the directory tree, but included in that menu that includes 
the mentioned category. Since you don't have any menu that includes items 
based on category, they will not appear at all.

Cheers,
Waldo
-- 
bastian at kde.org  |   KDE Community World Summit 2004  |  bastian at suse.com
bastian at kde.org  | 21-29 August, Ludwigsburg, Germany |  bastian at suse.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20040813/7de4ad28/attachment.pgp 


More information about the xdg mailing list