I'm trying to set up a URL router script that looks at urls and opens them with a different browser instance (firefox profile in my case) depending on the result of pattern matching performed against the url.
I've made myself a desktop file, and installed it with desktop-file-install
(details below). I'd expect that it should be visible in the main menu, and as an option when running cinnamon-settings default
(which appears "Preferred Applications" in the main menu. Neither of these things happens.
cinnamon-settings default
, update-alternatives
and xdg-settings
each has it's own list of options. My script doesn't appear in any of them. Which ones matter? How do I registered my script or desktop file as an available alternative for use by these systems?
My Desktop file:
[Desktop Entry]
Type=Application
Name=Url Router
Comment=Route to browser instances based on URL
# TryExec=url-router
Exec=url-router %u
# X-MultipleArgs=false
StartupNotify=true
Terminal=false
NoDisplay=true
MimeType=x-scheme-handler/http;x-scheme-handler/https
Icon=firefox
Categories=Network;WebBrowser;
# StartupWMClass=Firefox-esr
... which I've installed like so:
desktop-file-install --dir=$HOME/.local/share/applications/ \
--mode=755 \
--rebuild-mime-info-cache \
url-router.desktop