I found some trouble getting my spotify client to scale correctly to my HiDPI screen after installing it. Hopefully this tutorial will help someone having the same problem.
- Install spotify via flatpak using the instructions on flathub.
- You can force spotify to scale to your display using the
--force-device-scale-factor=Xcommand line option. I find
X=1.6works the best for me, but this will change depending on your setup. So, full command to do this in your terminal emulator is
flatpak run com.spotify.Client --force-device-scale-factor=1.6.
- In order to make this change permanent, you can modify the desktop file to send this command line option whenever Spotify is launched via the icon. cd /var/lib/flatpak/exports/share/applications/ and edit the com.spotify.Client.desktop file as root with your favorite text editor. Change the
Execvariable to include the above command line option. Note that these changes will be overridden if Spotify updates. You can instead copy the desktop file to
~/.local/share/applications/and make your changes there. It should look similar to this:
Restart your computer and Spotify should correctly scale the next time you launch it!Update:
sudo update-desktop-databaseand then launch Spotify from your application launcher.
Thanks to Daniel Aleksandersen for catching a few mistakes with this tutorial!