- Install Spotify in the usual way:
curl -fsSL https://download.spotify.com/debian/pubkey_5E3C45D7B312C643.gpg | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/spotify.gpg
sudo apt update && sudo apt install spotify-client
- Compile stubs for X-specific calls that Spotify makes:
$ cat xstub.c
#include <stdio.h>
#define X_FN(f) int f() { puts("called"); return 0; }
X_FN(XInternAtoms)
X_FN(XChangeProperty)
X_FN(XGetGeometry)
X_FN(XInternAtom)
X_FN(XMoveResizeWindow)
X_FN(XSendEvent)
X_FN(XSetClassHint)
X_FN(XSetErrorHandler)
X_FN(XSetIOErrorHandler)
X_FN(XStoreName)
X_FN(XTranslateCoordinates)
$ cc xstub.c -o xstub.so -shared
$ sudo mv xstub.so /usr/local/lib/spotify-xstub.so && sudo chmod 644 /usr/local/lib/spotify-xstub.so
- Invoke Spotify in this way:
LD_PRELOAD=/usr/local/lib/spotify-xstub.so spotify --enable-features=UseOzonePlatform --ozone-platform=wayland