Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abba23/spotify-adblock-linux
Spotify adblocker for Linux
https://github.com/abba23/spotify-adblock-linux
adblock ads blacklist dns linux spotify whitelist
Last synced: 6 days ago
JSON representation
Spotify adblocker for Linux
- Host: GitHub
- URL: https://github.com/abba23/spotify-adblock-linux
- Owner: abba23
- License: gpl-3.0
- Archived: true
- Created: 2018-12-12T18:16:00.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-05T11:30:09.000Z (over 3 years ago)
- Last Synced: 2024-08-01T19:44:17.727Z (3 months ago)
- Topics: adblock, ads, blacklist, dns, linux, spotify, whitelist
- Language: C
- Homepage:
- Size: 65.4 KB
- Stars: 720
- Watchers: 21
- Forks: 70
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# This project has been deprecated in favor of its rewrite in Rust (https://github.com/abba23/spotify-adblock).
# spotify-adblock-linux
Spotify adblocker for Linux that works by wrapping `getaddrinfo` and `cef_urlrequest_create`, blocking non-whitelisted domains and blacklisted URLs.### Notes
* This does not work with the snap Spotify package.## Build
Prerequisites:
* Git
* Wget
* tar
* Make
* GCC
* libc headers (e.g. `libc-dev` on Debian-based distributions)---
$ git clone https://github.com/abba23/spotify-adblock-linux.git
$ cd spotify-adblock-linux
$ wget -O cef.tar.bz2 https://cef-builds.spotifycdn.com/cef_binary_88.1.6%2Bg4fe33a1%2Bchromium-88.0.4324.96_linux64_minimal.tar.bz2
$ tar -xf cef.tar.bz2 --wildcards '*/include' --strip-components=1
$ make## Install
### Debian Package
$ sudo make install### Flatpak
$ mkdir -p ~/.spotify-adblock && cp spotify-adblock.so ~/.spotify-adblock
$ flatpak override --user --filesystem="~/.spotify-adblock/spotify-adblock.so" com.spotify.Client## Usage
### Command-line
#### Debian Package
$ LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify#### Flatpak
$ flatpak run --command=sh com.spotify.Client -c 'eval "$(sed s#LD_PRELOAD=#LD_PRELOAD=$HOME/.spotify-adblock/spotify-adblock.so:#g /app/bin/spotify)"'### Desktop file
You can integrate it with your desktop environment by creating a `.desktop` file (e.g. `spotify-adblock.desktop`) in `~/.local/share/applications`. This lets you easily run it from an application launcher without opening a terminal.Examples:
Debian Package
```
[Desktop Entry]
Type=Application
Name=Spotify (adblock)
GenericName=Music Player
Icon=spotify-client
TryExec=spotify
Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify
```
Flatpak
```
[Desktop Entry]
Type=Application
Name=Spotify (adblock)
GenericName=Music Player
Icon=com.spotify.Client
Exec=flatpak run --file-forwarding --command=sh com.spotify.Client -c 'eval "$(sed s#LD_PRELOAD=#LD_PRELOAD=$HOME/.spotify-adblock/spotify-adblock.so:#g /app/bin/spotify)"' @@u %U @@
Terminal=false
MimeType=x-scheme-handler/spotify;
Categories=Audio;Music;Player;AudioVideo;
StartupWMClass=spotify
```
## Uninstall
$ sudo make uninstall