How to Install and Use Spotify on Arch Linux
Categories:
5 minute read
Spotify is one of the most popular music streaming services worldwide, offering a vast library of songs, albums, and podcasts. If you’re using Arch Linux, you might be wondering how to get Spotify up and running on your system, especially since Spotify does not provide a native package for Arch Linux directly. Fortunately, Arch’s flexibility and access to the Arch User Repository (AUR) make installing Spotify relatively simple.
In this article, we’ll walk through the different ways to install Spotify on Arch Linux and how to use it efficiently. Whether you’re new to Arch or a seasoned user, this guide will help you integrate Spotify into your desktop environment with ease.
Prerequisites
Before you begin, make sure:
- You have Arch Linux installed with a working desktop environment (GNOME, KDE, XFCE, etc.).
- You have sudo privileges.
- Your system is up to date:
sudo pacman -Syu
- You have an AUR helper like yay installed (for Method 1).
If you haven’t installed yay
, you can do so with:
sudo pacman -S git base-devel
cd ~
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
Method 1: Installing Spotify via yay (AUR Helper)
Spotify is available in the AUR as a community-maintained package. This is often the most straightforward and native-feeling method for Arch users.
Step 1: Install Spotify
Use the following command to install Spotify:
yay -S spotify
This will download and build the Spotify package from the AUR. Depending on your system and internet speed, this may take a few minutes.
During the build process, yay might prompt you with questions (like editing the PKGBUILD); you can usually press Enter
to accept defaults.
Step 2: Launch Spotify
Once installation is complete, you can launch Spotify from your application launcher or via terminal:
spotify
Method 2: Installing Spotify via Flatpak
If you prefer sandboxed applications or want to isolate Spotify from the rest of your system, Flatpak is a great alternative.
Step 1: Install Flatpak
If Flatpak is not already installed:
sudo pacman -S flatpak
Enable the Flathub repository:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Step 2: Install Spotify
flatpak install flathub com.spotify.Client
This will install the official Spotify Flatpak.
Step 3: Launch Spotify
Once installed, run Spotify via terminal or your app launcher:
flatpak run com.spotify.Client
Launching and Using Spotify
Spotify’s interface on Linux is consistent with other platforms. After logging in with your credentials, you can:
- Browse the Home, Search, and Library tabs.
- Play music, create playlists, follow artists, and more.
- Use the Connect feature to control Spotify playback on other devices.
Keyboard Shortcuts
Shortcut | Action |
---|---|
Space | Play/Pause |
Ctrl + Right | Next Track |
Ctrl + Left | Previous Track |
Ctrl + L | Focus on Search Bar |
Ctrl + W | Close current view/window |
These shortcuts improve productivity, especially when using a tiling window manager or keyboard-centric workflow.
Enabling Media Keys and Desktop Integration
To control Spotify with media keys and integrate it into your system tray, you may need additional tools:
1. Spotify Tray Icon
Spotify on Linux does not natively support system tray icons anymore, but third-party tools like spicetify-tray or sn-spotify-tray can help.
To install a tray utility (optional):
yay -S spotify-tray
2. Media Key Support (MPRIS)
For GNOME and KDE users, Spotify integrates well via MPRIS. You can control playback with media keys by default. If it’s not working:
On GNOME
Ensure gnome-shell
extensions like Media Player Indicator or Sound Menu Integration are enabled.
On KDE
Ensure the “Media Player” widget is added to your system tray.
On XFCE or i3
Use playerctl
to bind media keys manually:
sudo pacman -S playerctl
Then, bind your media keys using your desktop environment’s keyboard settings or tools like sxhkd
.
Troubleshooting Common Issues
1. Spotify Won’t Launch
Check for missing libraries or permission issues:
spotify
If you see a libcurl
or similar missing library error, try:
sudo pacman -S libcurl-compat
2. Black Screen or UI Glitches
Try launching Spotify with the --disable-gpu
flag:
spotify --disable-gpu
Or set an environment variable:
export ELECTRON_DISABLE_GPU=1
spotify
You can add this to a wrapper script or .desktop
entry.
3. Slow Performance or High CPU Usage
Spotify is an Electron-based app, and it can be resource-heavy. Consider using a lighter alternative client if needed (like ncspot
or spotifyd
):
yay -S ncspot
Optional: Using Spotify from Terminal
ncspot – Terminal-Based Spotify Client
ncspot
is a TUI (text user interface) client for Spotify using the Spotify Web API. It’s lightweight and great for terminal lovers.
yay -S ncspot
Then launch it:
ncspot
You’ll be prompted to authenticate via a browser. After that, you’ll have full terminal control over your Spotify library and playback.
Conclusion
Spotify is a must-have app for music lovers, and thankfully, it’s easy to install and use on Arch Linux through multiple methods. Whether you prefer a full graphical experience via the AUR or Flatpak or want to go lightweight with ncspot
, Arch gives you the freedom to choose what works best for your setup.
To recap:
- Use yay to install Spotify from the AUR for a native-like experience.
- Use Flatpak for sandboxing and potentially easier updates.
- Enhance your experience with media key integration, system tray tools, or even terminal clients.
No matter your desktop environment or workflow style, Spotify can fit in smoothly with a bit of configuration. Enjoy the music!
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.