Fix for missing Stata icons on Linux
Switch branches/tags
Nothing to show
Clone or download
Latest commit b8d01be Oct 5, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information. Update to clarify use of sudo Oct 5, 2018 Make ~/local/bin before putting links there Aug 14, 2018
stata-png-fix.spec Still working on it Apr 26, 2014 Add to, don't replace LD_LIBRARY_PATH Jul 16, 2018
stata-png.patch Initial commit Apr 26, 2014

Fix for missing Stata icons on Linux

Stata has a bug on newer versions of several Linux distributions, among them Ubuntu 18.04 and openSUSE ^1, in that it doesn't like the libpng that comes with the system, and shows no icons. This fix solves the problem.

The problem

Here's the original description on StataList.


This git repository was forked from Lars Vilhuber's Bitbucket repository. The main difference is that I don't like to run programs with sudo when I don't have to, so this script doesn't require sudo.

To install this:

  1. Install dependencies (gcc, wget)

    sudo apt install build-essential wget
  2. Clone this repository:

    git clone
    cd stata-png-fix
  3. Change the value of STATA_DIR in the file to the directory with your Stata installation. For me this is ~/local/stata. (Don't include a trailing /). This folder should contain the xstata, xstata-se, or xstata-mp binary.

  4. Run

  5. Add ~/local/bin/ to your PATH.

Clarification about use of sudo

Lars Vilhuber's linked script is better for situations where the Stata program will be used by several users. This script is easier on a single-user machine. See for Lars' comment.


Lars Vilhuber for creating most of the original script.