How to Install and Integrate .tar.gz Apps in Linux
By Hisham Al Nahas · Published on December 27, 2025
A complete guide to extraction, desktop shortcuts, and fixing broken dock icons.
Not every Linux application provides a convenient dnf or flatpak installer. Often, developers distribute software as a .tar.gz archive. While functional, these archives don't automatically appear in your app menu or dock. In this guide, we’ll walk through the "pro" way to integrate these apps into your Linux desktop environment.
/opt/ to keep your home directory clean and organized.
1. Extraction and Placement
First, we move the archive to a permanent location and extract it. Using /opt/ is the standard for "optional" software packages.
# Create directory and extract
sudo mkdir -p /opt/myapp
sudo tar -xvzf myapp-linux.tar.gz -C /opt/myapp --strip-components=1
cd /opt/myapp
2. Creating the Desktop Entry
To make the app searchable in your Activities overview, you must create a .desktop file. This acts as a bridge between the binary file and your GUI.
nano ~/.local/share/applications/myapp.desktop
Paste the following configuration, ensuring paths are absolute:
[Desktop Entry]
Version=1.0
Type=Application
Name=My Application
Comment=Deep description of the app
Exec=/opt/myapp/bin/launch-executable
Icon=/opt/myapp/resources/icon.png
Terminal=false
StartupWMClass=AppName
3. Fixing the "Generic Icon" in the Dock
Have you ever pinned an app, but when it launches, a second "gray gear" icon appears? This happens because the window manager doesn't recognize the running process as the same one in your shortcut.
xprop may fail. Use the built-in GNOME debugger instead.
Finding the correct WM_CLASS:
- Launch your application.
- Press
Alt + F2, typelg, and hit Enter. - Click on "Windows" in the top-right of the overlay.
- Find your app and look for the
wm_classproperty. - Copy that value and paste it into your
.desktopfile asStartupWMClass=Value.
4. Adding the Binary to your $PATH
If you want to be able to type the app name in any terminal window to launch it, you should update your environment variables:
echo 'export PATH=$PATH:/opt/myapp/bin' >> ~/.bashrc
source ~/.bashrc
Quick Reference Table
| Requirement | Path / Flag |
|---|---|
| Extraction Flag | -C (Target Directory) |
| Local Shortcut Path | ~/.local/share/applications/ |
| Dock Linking | StartupWMClass |