Spotify no longer starts after a hostname change (Linux)
Spotify won't open and exits with code 1 after a hostname change: an orphaned Singleton* lock, and how to remove it.
Also available in Français

The symptom
Spotify (official .deb package, spotify-client 1.2.95, Debian 13) no longer opens. No window, no message. From the launcher, nothing happens. From a terminal:
$ spotify
$ echo $?
1
With --enable-logging=stderr, a single line is printed:
INFO:cef/libcef/common/crash_reporting.cc:209] Crash reporting enabled for process: browserThen the process exits with code 1.
False leads
- The GPU:
--disable-gpu,--in-process-gpu,--ozone-platform=x11|wayland,--use-gl=eglchange nothing, the exit code stays 1. - The package: no recent Spotify update, the binary is intact.
- The config:
~/.config/spotify/prefsis readable and consistent.
A test with a clean profile (XDG_CONFIG_HOME and XDG_CACHE_HOME pointed to a temporary folder) did start. So the problem came from the existing profile, not from the installation.
The cause
Spotify is a CEF (Chromium Embedded Framework) application. Like Chromium, it only allows one instance per profile, with three symbolic links in ~/.cache/spotify:
SingletonLock -> huntervcx-imac151-10745
SingletonCookie -> 11476635766705238864
SingletonSocket -> /tmp/org.chromium.Chromium.sCe4Pv/SingletonSocketThe content of SingletonLock is <hostname>-<pid>. At startup, Chromium reads this link:
- if the hostname matches the current machine, it checks whether the PID is still running and takes over the lock if it is dead;
- if the hostname differs, it assumes the profile is used by another machine (profile on a network share) and leaves everything alone.
Here, the lock had been left the day before by a session that hadn’t closed the app properly, under the old hostname huntervcx-imac151. In the meantime, the machine had been renamed iMac-Arthur. Spotify therefore saw a lock from “another machine” and quit silently.
The fix
Make sure no Spotify is running, then delete the three links:
pgrep -af spotify
rm ~/.cache/spotify/SingletonLock \
~/.cache/spotify/SingletonCookie \
~/.cache/spotify/SingletonSocketThese files contain only the lock: no account, no track cache, no preferences. Spotify starts normally again.
Key takeaways
- Changing the hostname while a Chromium/Electron/CEF app has crashed or is still open leaves an orphaned lock that the app can no longer recover from.
- The same symptom can occur with Chrome, Edge, VS Code, Discord, etc.: run
ls -laon the profile folder and look at theSingleton*files. - An exit code of 1 with no message is often a lock or a profile issue, not a GPU problem.
- If you change the hostname, close your applications first, or clean up the
Singleton*files afterwards.