The Spotify client installed from the snap store is barely usable on HiDPI displays and there seem to be no built-in options to scale the UI. Is there a workaround to scale it?
To scale the UI you can set a different scale factor at the application launch. So you want to edit the .desktop file Ubuntu uses to launch spotify to adopt a custom scale factor. As you've installed it from the snap store it will likely be located at /var/lib/snapd/desktop/applications/spotify_spotify.desktop. If not you can use find like this:sudo find / -type f -iname spotify.desktop.
Then you just have to edit the Exec directive of this file to include the --force-device-scale-factor=X option, where X is the scale factor multiplier:
Here I use vim for editing the file but nano or gedit can be used as well.
sudo vim /var/lib/snapd/desktop/applications/spotify_spotify.desktop
And then you change the Exec directive to include the option:
Your browser should now present the installation of the website as a PWA (it can be discrete, in Chrome a little install icon will appear at the end of the address bar). Install it.
Since it renders in the native browser scaling, no issues with the display's pixel density.
Moreover, the PWA brings advantages over the snap version like faster startup times, better music track control integration with keyboard shortcuts, and obviously less storage if that interests you!
There is a fairly stable workaround for this. This is discussed in the Spotify forum.
To scale the UI you can set a different scale factor at the application launch. So you want to edit the .desktop file Ubuntu uses to launch spotify to adopt a custom scale factor. As you've installed it from the snap store it will likely be located at
/var/lib/snapd/desktop/applications/spotify_spotify.desktop
. If not you can use find like this:sudo find / -type f -iname spotify.desktop
.Then you just have to edit the
Exec
directive of this file to include the--force-device-scale-factor=X
option, where X is the scale factor multiplier:Here I use
vim
for editing the file butnano
orgedit
can be used as well.And then you change the
Exec
directive to include the option:You save the file, close Spotify, and open it again: it should be scaled properly now.
More of a hack than a solution.
Install the PWA:
Since it renders in the native browser scaling, no issues with the display's pixel density.
Moreover, the PWA brings advantages over the snap version like faster startup times, better music track control integration with keyboard shortcuts, and obviously less storage if that interests you!
In recent versions you can:
CTRL
++
: increase the sizeCTRL
+-
: decrease the sizeCTRL
+0
: reset the sizeWarning: