Spotify Adblock Fedora 35/36/37/rawhide


Install Spotify

First install the spotify package from negativo17 ’s repository.

Enable negativo17 repo:

dnf config-manager --add-repo=

Then install:

dnf install spotify-client

Build Adblock

Install the dependencies:

dnf install rust cargo

Clone and build:

git clone
cd spotify-adblock

Install to system path:

sudo make install

Usage - Important Last Step

Normally on other GNU/Linux distribution users add the LD_PRELOAD value to the desktop file, but this method didn’t work on Fedora 34 (I really don’t know why). So we will add LD_PRELOAD to spotify’s executable: /usr/bin/spotify.

Add LD_PRELOAD value to /usr/bin/spotify:

export LD_PRELOAD=/usr/local/lib/

Look like this:

# Wrapper script for Spotify.

# The spotify binary has a RUNPATH of its origin folder. It requires a few
# librares compiled with minimum options (no external dependencies).
# The FFMpeg library is loaded ONLY on the system path libraries, ignoring the

# So remove the RUNPATH from the binary, put all the libraries in its private
# folder and make sure that only the spotify binary can access them.

export LD_LIBRARY_PATH="/usr/lib64/spotify-client${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
export SCALE_FACTOR="$(/usr/lib64/spotify-client/"
export LD_PRELOAD=/usr/local/lib/

exec /usr/lib64/spotify-client/spotify --force-device-scale-factor=$SCALE_FACTOR "$@" &
exec /usr/lib64/spotify-client/ &

That’s all! Run it.

otherfedora 34adblockfedoraspotify

Rojen Zaman

Anarchist | GnuPG: 0x9089BB25

Bash Script to get HTTP Status Message With Return True or False.

How to change author of all commits?