Skip to content

Instantly share code, notes, and snippets.

@Charffyyy
Forked from jclosure/install_dia_osx.md
Created September 13, 2020 19:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Charffyyy/ce2d5c3dce471b6bc3b9592452ee0749 to your computer and use it in GitHub Desktop.
Save Charffyyy/ce2d5c3dce471b6bc3b9592452ee0749 to your computer and use it in GitHub Desktop.
How to install Dia on OSX (and have it run)
brew cask install dia

After his it won't run because DISPLAY=:0 env var is not set

vim /Applications/Dia.app/Contents/Resources/bin/dia

Add the following content to line 40 (right before the oascript call)

#########################################################
# Ref: http://navkirats.blogspot.de/2014/10/dia-diagram-mac-osx-yosemite-fix-i-use.html
versionOSX=$(sw_vers -productVersion | awk -F '.' '{print $(NF-1)}')
[[ ${versionOSX} -ge 10 ]] && export DISPLAY=:0
#########################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment