Tue, 11 Dec 2018

Adding a menu location for locally installed xdg .desktop application links

I ran into an issue recently trying to install a application menu link on a debian system (desktop was mate in this case, but I think it applies to any gnome based desktop). The issue was that I would install a new .directory file for a new menu entry along with the .desktop file, and when I did, the application would show up under "Other" and not under the menu category I was trying to add.

The processes being:

Running this as the local user, correctly installs the files in ~/.local/share/, but it does not write a menu file. And so the application will show up under Applications->Other

If you run the command as root, it will install system wide, and creates the menu for you under /etc/xdg/menus/applications-merged/company-company.menu

But if you don't want this installed system wide, it seems like the only way to fix this is to setup the .menu file manually? I feel like I'm doing this wrong, and there is a way to specify the menu in a user folder, but at the time I can't seem to figure this out.

To fix the issue I created the /etc/xdg/menus/applications-merged/company-company.menu file manually like this:

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
  "http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
<Menu>
    <Name>Applications</Name>
<Menu>
    <Name>company-company</Name>
    <Directory>company-company.directory</Directory>
    <Include>
        <Category>Company</Category>
    </Include>
</Menu>
</Menu>

This added the menu entry, and the locally installed applications now show up in the correct location.

posted at: 23:43 | path: /linux | permanent link to this entry


2019-Jun
2019-May
2018-Dec
2018-Jan
2017-Aug
2017-Jun
2017-May
2016-Nov
2015-Dec
2015-Nov
2015-Oct
2015-Jul
2015-Jun
2014-Dec
2012-Oct
2012-Sep
2012-Jun
2012-Feb
2012-Jan
2011-Dec
2011-Sep
2011-Aug
2011-May
2011-Feb
2010-Jun
2010-Apr
2010-Jan
2009-Sep
2009-Jul
2009-May
2009-Jan
2008-Oct
2008-Sep
2008-Jun
2008-May
2008-Jan
2007-Nov
2007-Oct
2007-Aug
2007-Jun
2007-May
2007-Mar
2007-Feb
2007-Jan
2006-Nov
2006-Oct
2006-Sep
2006-Aug
2006-Jun
2006-Apr
2006-Jan
2005-Dec
2005-Nov
2005-Oct
2005-Sep
2005-Aug
2005-Jul
2005-Jun
2005-May
2005-Apr
2005-Mar
2005-Feb
2005-Jan
2004-Dec
2004-Nov
2004-Oct
2004-Sep
2004-Aug
2004-Jul
2004-Jun
2004-May

Powered by PyBlosxom | RSS 2.0