Awesome trick to fix Dia Diagram Errors in Mac OS X El Capitan, Yosemite,


Dia Diagram Editor is a useful and free tool to draw structured diagrams for both Mac OS X and Windows. Too many mac users prefer to use this tool because not only it is free under the terms of the GNU GNU General Public License, the GPLv2, but potentially also the valuable effectiveness in diagramming work.

However, many of users may not get it worked right away in Mac OS X (High Sierra, Sierra, 10.11 El Capitan, 10.10 Yosemite, 10.9 Mavericks,…) due to facing some errors such as:

  • After installing Dia Diagram, the app is not be called and run. All is a x11 terminal windows, Dia does not start.
  • The domain/default pair of (.GlobalPreferences, AppleCollationOrder) does not exist error.
  • The error trace ended with GTK warning - could not open display.
  • And there should have more errors that I can not update all in this topic.

Whatever the errors are, look at the following trick to get rid of trouble.

  1. Right click on (found in /Applications), select Show Package Contents.
  2. Using a text editor to modify the dia file in
  3. What you need to do is add the following line after the line 39, then make sure you save your change and quit.

export DISPLAY=:0

  1. Close the XQuartz if this app is running, and then Dia Diagram should work smoothly in OS X without any errors (if not, you may attempt to restart your computer after the change).

We would suggest the following alternatives for your Mac:
Free Mac Adobe Illustrator CC 2017 v21 Full Version with Paid Plugins
Get Free Latest SketchUp Pro 2017 – 2018 Full version for Mac
Download Sketch 48.1 Fully Activated for Mac


Dear Digger,
Thanks for your info.

I´ve OS X El Capitan, downloaded the X11 and the dia installation file. I´m trying to following your steps but whenever I try to edit dia file in it gives me the info that the file is locked and cannot be edited.

Do you have any suggestion?

Thank you in advance,


Thank you very much for the solution. It worked perfectly for me.



You are most welcome buddy :slight_smile:


i have a issue with dia on osx.
Saved files generate a .dia file that when reopening is empty. The done drawing is not saved in the file somehow.
Does anybody encounter the same here?
Thanks, Regards


Thank you so much :slight_smile:


It worked. Thank you!


Thanks for such a helpful tips!

Much appreciated :slight_smile:


Muchas gracias por el truco. Funciona!!!


Excelente !! Me funciono a la perfección. Gracias


I was hoping that the version you get from “brew cask install dia” would Just Work™, but it didn’t… not even with the fix. (Running El Capitan 10.11.6.)

But the plain-vanilla downloaded from Sourceforge worked with the fix just fine. Thanks!


Great, thank you very much…


Thanks a lot it worked! using macOS Sierra 10.12.5 (16F2073)


Thank you very much!


Thank you! This fixed it for me.


Thanks so much, Digger. Fixed it here for me on MacOS 10.13.1, also.


Awecome! Thanks, Worked for me too :slight_smile:


Worked for me. MacOS 10.13.4