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
#########################################################
The original script seems to not parsing macOS major version as it should (it's returning "
6
" instead of "12
" on macOS Monterey 12.6.7), so you'll need to add before the line 40 the following code instead:For users that installed Dia using Homebrew and uses macOS on a language different than English, it seems that parsing AppleCollationOrder to detect user locale isn't working anymore (used to work on Tiger machines) and is returning
pt
instead ofpt_BR
on my system, soLANG
is wrong and Dia is loading Portuguese-Portugal instead of Portuguese-Brazil UI.Replace the lines 125-126 with:
LANGSTR=`defaults read "Apple Global Domain" AppleLocale 2>/dev/null`
Also notice that Dia doesn't seems to provide access to protected folders (like User personal folders and Volumes), so it's not possible to access them through Dia by default.