Linux Mint Mate: Menu Scripting

Posted on Categories UncategorizedTags ,

I have been playing around with the Mate menus. Specifically I wanted a convenient way to create desktop files and stick them into the menu, or specifically into a submenu. I know there is webapp, but I wanted something a bit more customizable.

So, I wrote two scripts:

  1. mksubmenu, which takes a name and an icon and creates an xdg *.directory file in $HOME/.local/share/desktop-directories. This effectively creates a new submenu under “Applications“.
  2. mkwebapp, which takes a name, url, icon, menu, and Chromium custom parameter and constructs an xdg desktop item in $HOME/.local/share/applications to call the url via the Chromium browser, with an optional Chromium custom parameter, using the specified icon and sticks it into the specified submenu or into “Other” if none is specified. I prefer this to the app shortcuts created from within the browser using the “Create Shortcut” (Chrome/Chromium/Iron/etc) or “Save as an App” (MS Edge) commands because my script creates shortcuts which are easier to edit and which survive browser changes or re-installs.

I have yet to create a script to create and install a desktop item for some random program, and there are some things I have not yet figured out:

  1. How to install a desktop item into one of the system submenus for which no xdg *.directory file exists, such ad Office or Internet;
  2. How to place new menus anywhere other than at the very top of the menu tree, just under Applications.

So I still need to use the “Edit Menus” feature to move things around.

I do not permit comments on this blog. The reason for this and further information can be found on the page Privacy Policy.