ads' corner

Installed the AUR Spotify client on my new Manjaro Linux system, started the app, tried to login - nothing happens. It is supposed to open a browser window where I enter my credentials, but that does not work.

Spotify Login - not working
Spotify Login - not working

First I switched from starting Spotify from the menu to starting it on the konsole. And add debug parameters:

1
spotify --debug-level=8 --show-console

That produced the same result: no login pops up. But did not produce any useful debug messages.

Asked on Mastodon, and although I got useful questions and replies, it didn’t help. When I came back from my cycling tour in the afternoon, I took another look. xdg-open works, as expected. The extra/xdg-desktop-portal package is installed.

1
xdg-open 'archlinux.org'

At some point I checked the proxy settings (previously I was running a local Squid on my Ubuntu laptop, but I switched this to a Pi-hole setup). And while the proxy configuration is fine, I spotted that KDE has no default browser set. That’s not how it is supposed to be, the user data is copied over from Ubuntu and I definitely had a default browser set before.

No default browser set in KDE
No default browser set in KDE

Dunno why this was not raising an error before, or caused trouble before. All other default applications are there, and I had the same browsers installed on Ubuntu. Anyway, time to set a default browser.

Set a default browser in KDE

Click on the “Other” setting next to “Web browser”, it will open a window with installed applications:

Select an application

From there, either find your browser by browsing the categories, or type in the name into the search field:

Select Chrome as default browser

Also tick the checkbox which says “Remember application association”. I’m using two browsers on all my systems: one where I have to login into applications, and one for regular surfing. Currently Firefox is the browser where I have all the logins, supported by a number of plugins. And Chrome is the other one, with even more privacy extensions and add-ons. Also all cookies are deleted once this browser closes. Let’s select Chrome here, and whatever other application wants to open a browser can use the “temporary browser”.

Chrome is the default browser

Selecting either Chrome or Firefox will raise a warning sign on the right side of the setting (not shown in this screenshot). Click on it, and confirm that this application can indeed handle x-scheme-handler/http and x-scheme-handler/https.

Confirm browser as scheme handler

All done, it’s working now.

Login into Spotify

Clicking on the “Login” button in Spotify will now open a Chrome window and ask for credentials:

Login into Spotify

And once logged in:

Logged in into Spotify

Mime Types: .config/mimeapps.list

The file .config/mimeapps.list stores the list of currently configured applications for mime types (or media types):

1
2
3
4
5
6
7
8
$ cat .config/mimeapps.list
[Added Associations]
x-scheme-handler/http=google-chrome.desktop;
x-scheme-handler/https=google-chrome.desktop;

[Default Applications]
x-scheme-handler/http=google-chrome.desktop;
x-scheme-handler/https=google-chrome.desktop;

If one of these entries is missing, the system doesn’t know how to handle requests for opening a website.

Summary

Dunno, maybe KDE can warn if a handler for a request is not configured. I did not spot any kind of warning, notification or error message.