A bundled Linux binary script integrating an already installed Stata instance into the desktop environment
The script will do the following:
- ask for some information regarding the Stata environment it is faced with (installation path, Stata version, etc);
- apply a workaround which fixes an issue where all menu icons in Stata's GUI are missing in modern Linux distributions; this is done by manually downloading and building older variants of
zlib
(1.2.3) andlibpng
(1.6.2) as well as a prior version oflibpng
(1.2.59); details on why this might be necessary can be found here on Statalist; the blueprint for the installation procedure has been sketched from this script on BitBucket by Lars Vilhuber; this workaround is no longer required with modern Stata versions, as version 16 or younger bundles all necessary libraries within its installation; - install an application menu entry for Stata's windowed and console variant;
- install all mimetypes relevant to Stata (.do, .dta, .dtas, .smcl, .gph, .stpr, .stsem);
- install file-type associations for each newly installed mimetype to Stata;
- install Stata icons for the application menu entry as well as each mimetype in several sizes;
- make Stata the default application for opening the newly installed mimetypes for each user requested
Use at your own risk. The script has been tested on Ubuntu (16.04 through 24.04), and on Fedora Workstation 39. It should work in all modern Linux desktop environments that support the freedesktop.org specifications on icons, application shortcuts and mimetypes. I, however, do no not warrant this. Actually, I do not even warrant that the script works at all. That's your own risk.
Simply run stata-integration.bin
in a terminal window and read and follow the on-screen instructions.
Many thanks to the contribution by @pedromezaq, who added the necessary resources for Stata 18. If anyone else is willing to contribute, reach out by starting an issue and / or pull request like he did!
All icons have been extracted from the official Stata for Windows binaries and are, as well as the term 'Stata', of course copyrighted property of StataCorp LLC.