Arch Default Browser on KDE
On Arch with KDE Plasma, apps that use the system default browser may open Chromium or Chrome instead of Firefox, and xdg-settings fails with ‘qtpaths: command not found’. The cause is that qt6-base ships qtpaths6 but xdg-mime expects a command named qtpaths on PATH. The fix is a symlink plus setting the default explicitly.
Typical error
Section titled “Typical error”/usr/bin/xdg-mime: line 885: qtpaths: command not foundCheck the current default browser
Section titled “Check the current default browser”xdg-settings get default-web-browserCheck whether qtpaths exists
Section titled “Check whether qtpaths exists”Confirm that qtpaths is missing from PATH while qtpaths6 is present.
which qtpathswhich qtpaths6Confirm which package provides qtpaths6. Expected result: extra/qt6-base … usr/lib/qt6/bin/qtpaths6.
sudo pacman -Fypacman -F qtpaths6Symlink qtpaths6 as qtpaths
Section titled “Symlink qtpaths6 as qtpaths”Create a symlink so xdg-mime can find qtpaths on PATH.
sudo ln -s /usr/lib/qt6/bin/qtpaths6 /usr/local/bin/qtpathsIf the symlink already exists or needs to be replaced, use -f to overwrite.
sudo ln -sf /usr/lib/qt6/bin/qtpaths6 /usr/local/bin/qtpathsVerify qtpaths is now available.
which qtpathsqtpaths --versionSet Firefox as default
Section titled “Set Firefox as default”xdg-settings set default-web-browser firefox.desktopxdg-settings get default-web-browserSet MIME handlers explicitly
Section titled “Set MIME handlers explicitly”xdg-settings alone does not always cover every link type. Set the http, https, and html handlers directly.
xdg-mime default firefox.desktop x-scheme-handler/httpxdg-mime default firefox.desktop x-scheme-handler/httpsxdg-mime default firefox.desktop text/htmlVerify the handlers.
xdg-mime query default x-scheme-handler/httpxdg-mime query default x-scheme-handler/httpsxdg-mime query default text/htmlOpen a link through xdg-open. It should launch in Firefox. No reboot or shell refresh is required.
xdg-open https://example.com