Guides 11792 Published by

The guide walks you through installing Visual Studio Code on openSUSE Leap and Tumbleweed by importing Microsoft’s GPG key, adding the official repo with zypper, refreshing metadata, and then running `sudo zypper in code`. It explains why the key is needed to verify package authenticity and how omitting it leads to confusing GPG errors. For users who prefer isolation, an optional Snap installation is presented, though it may launch slower and occasionally trigger permission prompts for project folders. Finally, the post shows how to confirm a successful install with `code --version` and offers quick fixes for dependency clashes that can break the editor on Tumbleweed.



Install VS Code on openSUSE Leap and Tumbleweed – No Fuss, Just Code

If you’re stuck with a vanilla openSUSE installation and can’t get Visual Studio Code running, this is the quick‑and‑dirty guide that gets it up and running on both Leap (the stable branch) and Tumbleweed (the rolling one). I’ll skip the fluff and go straight to the steps that actually matter.

1. Why the GPG key matters

Before your package manager can hand you any software, it wants proof that the vendor really sent it. OpenSUSE’s zypper will refuse to install a repo unless it can verify its signature with a key you trust. If you skip this, you’ll get a cryptic “GPG error” and your terminal will look like a broken spreadsheet.

2. Grab Microsoft’s public signing key
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc

Without the key, zypper can’t be sure that the VS Code package you’re pulling is legitimate or hasn’t been tampered with. Importing it once is all you need.

3. Add the Microsoft repo for openSUSE
sudo zypper ar \
  -c \
  "https://packages.microsoft.com/yumrepos/vscode" \
  microsoft-vscode

This tells zypper to look in Microsoft’s official repository, where they ship the latest VS Code binaries. The -c flag makes it a “trusted” repo so you don’t get a warning every time.

Side‑note – On Tumbleweed I once tried installing from the old openSUSE Build Service home project (home:/bjorge:/vscode). It pulled in an older libgtk dependency that broke my GNOME panel. The Microsoft repo keeps its dependencies up to date, so stay away from those legacy sources.

4. Refresh and install
sudo zypper ref
sudo zypper in code

zypper ref fetches the latest package metadata. zypper in code pulls the actual VS Code RPM and any missing dependencies. If you’re on Leap, this will install the version that matches your kernel; if you’re on Tumbleweed, you’ll get the very newest build.

5. Optional: Install with Snap (if you want a sandboxed copy)
sudo snap install --classic vscode

Snap gives you an isolated environment that can be updated independently of your system packages. It’s handy if you don’t want to clutter zypper’s database, but the downside is slower launch times and occasional permission headaches when you try to open project folders.

6. Verify it works
code --version

You should see something like:

1.93.0+commit.b9a7d3a5-2024-01-07

Now launch VS Code from your application launcher or code in a terminal, and you’re ready to code.

Quick sanity check

I’ve seen this happen after a bad driver update on Tumbleweed: the system tried to upgrade libgtk2.0 and ended up pulling an incompatible 32‑bit version that made VS Code crash immediately on startup. The fix? Roll back the driver, clear the zypper cache (sudo zypper clean --all), then reinstall VS Code as above.

That’s it—no more “I can’t install VS Code on openSUSE” complaints. Just pick a method that fits your workflow and enjoy coding on the distro you love.