logo

Hcody

🚀 Promote your brand here — Reach our amazing audience!
Home/ Articles / install-tar-gz-app-on-linux

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.

ℹ️
Pro Tip: Always extract third-party software to /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.

⚠️
Since new version of Linux defaults to Wayland, traditional tools like xprop may fail. Use the built-in GNOME debugger instead.

Finding the correct WM_CLASS:

  1. Launch your application.
  2. Press Alt + F2, type lg, and hit Enter.
  3. Click on "Windows" in the top-right of the overlay.
  4. Find your app and look for the wm_class property.
  5. Copy that value and paste it into your .desktop file as StartupWMClass=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
Success! Your manual installation is now indistinguishable from a native system app. It will now support pinning, high-resolution icons, and global search.
🚀 Promote your brand here — Reach our amazing audience!