How to install the latest native Spotify on Fedora 43 or later
An automated script is provided that handles all the steps below in one go:
sudo dnf install -y curl alien rpmrebuild xdg-utils
chmod +x install-spotify.sh
./install-spotify.shThe script will:
- Fetch the available
.debpackages from the Spotify repository - Let you choose which version to install
- Download, convert to
.rpm, rebuild, and install it - Set up the
.desktopfile and icons - Optionally apply the Wayland window-frame fix
- curl
- alien
- rpmrebuild
Download a Spotify .deb package directly from the repository:
Browse https://repository.spotify.com/pool/non-free/s/spotify-client/ and download the desired .deb file, then convert it to .rpm with alien:
sudo dnf install -y curl alien
curl -LO https://repository.spotify.com/pool/non-free/s/spotify-client/<chosen-file>.deb
sudo alien -r ./spotify-client_*.debModify the .rpm package:
sudo dnf install rpmrebuild -y
rpmrebuild -pe --notest-install ./spotify-client-xxxx.rpmEdit the spec file as follows:
- Locate the
%filessection. - Remove all lines that do not contain the text
spotify. - Save and exit. Wait for
rpmrebuildto finish. - Install the generated
.rpmfile (usually located in~/rpmbuild/...).
Copy the .desktop file:
cp /usr/share/spotify/spotify.desktop ~/.local/share/applications/Install Spotify icons:
cd /usr/share/spotify/iconsCreate a script named install_icons.sh in that directory and run it:
#!/bin/bash
# Check if running as root (write permission needed for icon installation)
if [ "$(id -u)" -ne 0 ]; then
echo "Error: Please run this script with sudo (e.g., sudo bash install_icons.sh)"
exit 1
fi
# Check if xdg-icon-resource tool exists
XDG_ICON_RESOURCE="$(command -v xdg-icon-resource 2> /dev/null)"
if [ ! -x "$XDG_ICON_RESOURCE" ]; then
echo "Error: xdg-icon-resource not found. Cannot install icons." >&2
exit 1
fi
echo "Scanning for icon files in the current directory..."
count=0
# Iterate over png files matching the naming pattern
for icon in ./spotify-linux-*.png; do
# If wildcard matches nothing, break
[ -e "$icon" ] || break
# Get filename (e.g., spotify-linux-512.png)
filename=$(basename "$icon")
# Extract size:
# 1. Remove prefix "spotify-linux-" to get "512.png"
temp="${filename#spotify-linux-}"
# 2. Remove suffix ".png" to get "512"
size="${temp%.png}"
echo "Installing: $filename -> Registered as spotify-client (Size: ${size}x${size})"
# Call system tool to install icon
# Parameters:
# --noupdate: Do not update cache yet, wait until all are installed
# --size: Specify icon size
# "spotify-client": The icon name recognized by the system (matches Icon=spotify-client in .desktop file)
"$XDG_ICON_RESOURCE" install --noupdate --size "$size" "$icon" "spotify-client"
count=$((count+1))
done
if [ $count -eq 0 ]; then
echo "Warning: No 'spotify-linux-*.png' files found in the current directory."
echo "Please ensure you are running this script inside the extracted icons folder."
exit 1
else
echo "Installed $count icons."
echo "Refreshing system icon cache..."
"$XDG_ICON_RESOURCE" forceupdate
echo "Done!"
fichmod +x install_icons.sh
sudo ./install_icons.shFix window frame issues (Wayland only):
nano ~/.local/share/applications/spotify.desktopChange the Exec= line from spotify %U to spotify --ozone-platform=x11 %U.
Log out and log back in. You can now use Spotify like any other application.