3 ms·
I'm grateful for this article, and hope I will one day figure out how to change my URL opener for xdg-open :)
by forgotmypw17 6y ago
I'm grateful for this article, and hope I will one day figure out how to change my URL opener for xdg-open :)
- vermaden 6y agoThanks. I use BROWSER environment variable for that. It seems to even override XDG settings. % xdg-settings set default-web-browser firefox.sh.desktop xdg-settings: $BROWSER is set and can't be changed with xdg-settings % echo ${BROWSER} firefox Hope that helps. EDIT: You also got me nice idea - to add http(s):// and ftp:// support for mine see.sh opener :)
- stonesweep 6y agoEach DE can have slightly different paths, but in general find the file mimeapps.list. It's typically looked for in the traditional manner of /etc/, /usr/share/ and /usr/local/share/ and $HOME to find global, local and personal configurations. In your $HOME it's usually something like this: ~/.local/share/applications/mimeapps.list ~/.config/mimeapps.list In here you find the MIME type pointing at a .desktop file (app launcher), it's a matter of changing that. Mine for example related to using Firefox: [Default Applications] x-scheme-handler/http=firefox.desktop x-scheme-handler/https=firefox.desktop Find the .desktop file you want to launch and just update that bad boy. Most DEs have a GUI tool to manage this for you without having to resort to manual editing...
- forgotmypw17 6y agoWhat does it mean that I don't have the desktop file?
- yrro 6y agoThen you don't have a program that can handle the URL scheme, at least according to desktop-entry-spec[0], which is the source of data that xdg-utils consults. [0] https://www.freedesktop.org/wiki/Specifications/desktop-entry-spec/ https://www.freedesktop.org/wiki/Specifications/desktop-entr... On my (Debian) system, firefox and chromium ship their .desktop files.
- stonesweep 6y agonod and the .desktop file is just an INI-style file that one can hand create for anything at all, the launched app just needs to accept the URL as a parameter input as if typed on the CLI for this scheme.