Ctrl K

Arch Default Browser on KDE

Fix xdg-settings failing with 'qtpaths: command not found' and set Firefox as the system default browser on Arch Linux with KDE Plasma.

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

/usr/bin/xdg-mime: line 885: qtpaths: command not found

Check the current default browser

xdg-settings get default-web-browser

Check whether qtpaths exists

Confirm that qtpaths is missing from PATH while qtpaths6 is present.

which qtpaths
which qtpaths6

Confirm which package provides qtpaths6. Expected result: extra/qt6-base ... usr/lib/qt6/bin/qtpaths6.

sudo pacman -Fy
pacman -F qtpaths6

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/qtpaths

If the symlink already exists or needs to be replaced, use -f to overwrite.

sudo ln -sf /usr/lib/qt6/bin/qtpaths6 /usr/local/bin/qtpaths

Verify qtpaths is now available.

which qtpaths
qtpaths --version

Set Firefox as default

xdg-settings set default-web-browser firefox.desktop
xdg-settings get default-web-browser

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/http
xdg-mime default firefox.desktop x-scheme-handler/https
xdg-mime default firefox.desktop text/html

Verify the handlers.

xdg-mime query default x-scheme-handler/http
xdg-mime query default x-scheme-handler/https
xdg-mime query default text/html

Test

Open a link through xdg-open. It should launch in Firefox. No reboot or shell refresh is required.

xdg-open https://example.com