Guide: Compile snes9x-gtk from Source & Create .deb Package (Ubuntu/Debian)
Posted: Sat Jul 19, 2025 10:11 pm
This post is meant with the utmost respect to the developers of Snes9x. All credit and rights go to the Snes9x team. I take no ownership of this software , I'm simply a user who successfully built and packaged it for native Ubuntu use.
I'm not a developer or expert. I used ChatGPT to guide me through this process, and it worked extremely well. My goal is to help others enjoy a native `.deb` install of Snes9x-GTK on Debian-based systems (Ubuntu, Mint, etc.), complete with icons, launcher, and system integration โ all without relying on Snap or Flatpak.
Feel free to correct or improve this process. I encourage community input and respectfully defer to the developers on whether this could evolve into an official `.deb` release.
---
What This Guide Does
- Compiles the latest GTK build of snes9x from source (v1.63)
- Installs cleanly to `/usr`
- Integrates into the desktop environment (icons, launcher)
- Packages as a `.deb` using `dpkg-deb`
- Allows for clean uninstall with `dpkg -r`
---
๐ Prerequisites
---
Clone the Repo w/ Submodules
If you already cloned it but forgot `--recurse-submodules`:
---
Configure the Build
---
Build It
---
Stage Install to Package Directory
---
Create .deb Package Manually
Make the directory layout:
Create the `control` file:
Build the package:
---
Install the .deb
If dependencies are missing:
---
Confirmed Working
- Verified on Ubuntu MATE (custom build)
- Icons all appear (16x16 to 256x256)
- Menu launcher works
- Emulator launches fast and clean
- Runs games smoothly
---
Optional Uninstall
Again, I give full credit to the Snes9x team. I share this only to help others enjoy the software on native Debian-based systems. This method uses no Snap/Flatpak, just traditional Linux packaging and source building.
Thanks to the devs for making one of the best emulators of all time.
โ Monway
I'm not a developer or expert. I used ChatGPT to guide me through this process, and it worked extremely well. My goal is to help others enjoy a native `.deb` install of Snes9x-GTK on Debian-based systems (Ubuntu, Mint, etc.), complete with icons, launcher, and system integration โ all without relying on Snap or Flatpak.
Feel free to correct or improve this process. I encourage community input and respectfully defer to the developers on whether this could evolve into an official `.deb` release.
---
- Compiles the latest GTK build of snes9x from source (v1.63)
- Installs cleanly to `/usr`
- Integrates into the desktop environment (icons, launcher)
- Packages as a `.deb` using `dpkg-deb`
- Allows for clean uninstall with `dpkg -r`
---
๐ Prerequisites
Code: Select all
sudo apt update && sudo apt install git cmake ninja-build build-essential libgtk-3-dev libpulse-dev libasound2-dev libao-dev libxv-dev libxi-dev libpng-dev libzstd-dev checkinstall
Code: Select all
git clone --recurse-submodules https://github.com/snes9xgit/snes9x.git
cd snes9x/gtk
Code: Select all
git submodule update --init --recursive
Code: Select all
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -S . -B build
Code: Select all
cd build
ninja
Code: Select all
DESTDIR=~/snes9x-pkgroot ninja install
Make the directory layout:
Code: Select all
mkdir -p ~/snes9x-deb/DEBIAN
mkdir -p ~/snes9x-deb/usr
cp -r ~/snes9x-pkgroot/usr ~/snes9x-deb/
Code: Select all
cat > ~/snes9x-deb/DEBIAN/control <<EOF
Package: snes9x-gtk
Version: 1.63
Section: games
Priority: optional
Architecture: amd64
Maintainer: (Unofficial) Community Build
Description: GTK frontend for SNES9X emulator โ clean native build with full desktop integration.
EOF
Code: Select all
dpkg-deb --build ~/snes9x-deb ~/Desktop/snes9x-gtk_1.63-1_amd64.deb
Code: Select all
sudo dpkg -i ~/Desktop/snes9x-gtk_1.63-1_amd64.deb
Code: Select all
sudo apt --fix-broken install
- Verified on Ubuntu MATE (custom build)
- Icons all appear (16x16 to 256x256)
- Menu launcher works
- Emulator launches fast and clean
- Runs games smoothly
---
Code: Select all
sudo dpkg -r snes9x-gtk
Thanks to the devs for making one of the best emulators of all time.
โ Monway