xdg-settings "Bad substitution" error when kde config tool missing, read_kde_browser returns empty string
- xdg-utils 1.1.3-1ubuntu2
- KDE Plasma 5.14.90
- KDE Frameworks 5.54.0
$ xdg-settings check default-web-browser firefox.desktop
/usr/bin/xdg-settings: 735: /usr/bin/xdg-settings: Bad substitution
https://gitlab.freedesktop.org/xdg/xdg-utils/blob/master/scripts/xdg-settings.in#L231
This error stems from kreadconfig5 --file kdeglobals --group General --key BrowserApplication
producing a blank line as output (no BrowserApplication in the General section of my ~/.config/kdeglobals) and kde5-config
not being installed.
I am following up with KDE and [k]ubuntu folks to find out why kde5-config isn't present, and I am not sure what the behavior will be once I have kde5-config installed. Regardless, the script should probably fail a bit more gracefully when read_kde_browser()
returns an empty string.