How to Install Ad-Free Spotify on OpenSUSE (RPM Method)
Are you looking for pure RPM performance without using Snap or Flatpak? This guide covers how to build the Spotify package yourself and integrate a Rust-based adblocker on OpenSUSE[cite: 1, 10].
Install Prerequisites
To create the Spotify package, we need the rpm-build tool. Open your terminal and run the following command to install the necessary tools:
sudo zypper install git rpm-build wget
Source: [cite: 2]
Build and Install Spotify
Clone the Tool
Pull the tool from the source using Git:
git clone https://github.com/megamaced/spotify-easyrpm.git
Run the Script
Enter the directory and run the script manually. Do not use sudo for this step[cite: 3].
cd spotify-easyrpm ./spotify-easyrpm
.rpm file in the standard Linux packaging folder[cite: 4].
Install the RPM
You can check the generated file location with:
ls ~/rpmbuild/RPMS/x86_64/
Source: [cite: 5]
To install the newly created Spotify package, run:
sudo zypper install ~/rpmbuild/RPMS/x86_64/spotify-client-*.rpm
Compile and Install Adblocker
Since the adblocker is written in Rust, we need to install the build tools first.
Install Rust and Cargo
Paste this into your terminal (press 'y' if prompted):
sudo zypper install rust cargo
Source: [cite: 6]
Compile the Adblocker
Clone the repository and install it using the following commands:
git clone https://github.com/abba23/spotify-adblock.git cd spotify-adblock make sudo make install
Connect Adblocker to Spotify
This is the critical step. We need to edit the Spotify shortcut so that it loads the adblocker every time the app launches[cite: 7, 8].
Open the desktop file:
sudo nano /usr/share/applications/spotify.desktop
Source: [cite: 8]
Edit the Exec Line:
Find the line that starts with Exec=spotify %U. Delete it (or comment it out with #) and replace it exactly with the line below[cite: 9]:
Exec=sh -c "LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U"
Save and Exit:
- Press
Ctrl + O(Save) - Press
Enter(Confirm) - Press
Ctrl + X(Exit)
Refresh and Launch
If you are using KDE Plasma, refresh the system cache to see the changes immediately:
kbuildsycoca5
Opensuse ve reklamsız Spotify
Spotify paketini oluşturmak için rpm-build aracına ihtiyacımız var[cite: 1].
Ön Hazırlık
sudo zypper install git rpm-build wget
Kaynak: [cite: 2]
Aracı Kaynağından Çekin (Git Clone)
git clone https://github.com/megamaced/spotify-easyrpm.git
Klasöre Girin ve Çalıştırın
İndirdiğimiz klasörün içine girip scripti el ile çalıştıracağız.
Scripti Normal Yetkiyle Çalıştırın
sudo kullanmadan şu komutu girin[cite: 3]:
cd spotify-easyrpm ./spotify-easyrpm
Yedeği Kurmak
Şu klasörü kontrol edin[cite: 5]:
ls ~/rpmbuild/RPMS/x86_64/
Bu yedeği kurmak istediğinizde dosyaya sağ tıklayıp kurabilir veya terminalden şu komutu verebilirsiniz:
sudo zypper install ~/rpmbuild/RPMS/x86_64/spotify-client-*.rpm
Adblocker Kurulumu
Adblocker Rust diliyle yazıldığı için, onu derlemek (build) için bu araçlara ihtiyacımız var[cite: 5]. Aşağıdaki komutla eksik parçaları kurun ve tekrar deneyin:
Eksik Araçları Yükleyin
Terminale şu komutu yapıştırın (Onay isterse y tuşuna basıp Enter'layın ve kurulumun bitmesini bekleyin)[cite: 6]:
sudo zypper install rust cargo
Adblock'u derle ve kur
Eğer yapmadıysanız:
git clone https://github.com/abba23/spotify-adblock.git cd spotify-adblock make sudo make install
Adblocker'ı Spotify'a Bağlayın (Kritik Adım)
Spotify'ın kısayol dosyasını düzenleyerek, her açılışta bu reklam engelleyiciyi de yüklemesini söyleyeceğiz[cite: 7].
1. Dosyayı açın:
sudo nano /usr/share/applications/spotify.desktop
Kaynak: [cite: 8]
2. Exec= satırını değiştirin:
Dosyanın içinde Exec=spotify %U yazan satırı bulun. O satırı silin (veya önüne # koyun) ve yerine tam olarak şunu yapıştırın[cite: 9]:
Exec=sh -c "LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U"
Bazen Exec= satırını şöyle değiştirmeniz gerekebilir[cite: 7]:
Exec=env LD_PRELOAD=/usr/local/lib/spotify-adblock.so spotify %U
3. Kaydet ve Çık:
- Ctrl + O (Kaydet)
- Enter (Onayla)
- Ctrl + X (Çık)
Menüyü Tazeleyin ve Başlatın
KDE Plasma'nın yapılan değişikliği görmesi için önbelleği tazeleyelim:
kbuildsycoca5
Artık Başlat menüsünden Spotify'ı açabilirsiniz.
- Snap/Flatpak yok: Saf RPM performansı.
- Reklam yok: Rust adblocker devrede[cite: 10].
No comments