Wednesday, October 29, 2014

Dia Diagram Mac OSX Yosemite Fix


Dia Diagram Mac OSX Yosemite Fix



I use the Dia tool for all my diagramming work. I have worked with many tools, but find Dia the easiest to use and is the most responsive, apart from it being a great OpenSource tool :).

I recently upgraded to the new Mac Operating System Yosemite and I could no longer use Dia. Each time I clicked on the Dia icon, it would jump up & down and do nothing. I finally tried opening the app via the command line, which gave me the following error:

The domain/default pair of (.GlobalPreferences, AppleCollationOrder) does not exist

The error trace ended with GTK warning - could not open display.

I could not find anything on the internet that was Dia specific, so I thought of writing this blog, in hope of helping someone in the same situation as me. So here is what I did:

  1. Goto your Applications directory where Dia.app exists (mine was located at: /Applications)
  2. Right click the icon and click on Show Package Contents
  3. Goto the directory Dia.app/Contents/Resources/bin
  4. Edit the file dia, in your favourite text editor.
  5. After line 39, add the line: export DISPLAY=:0
  6. Save and exit.
  7. Close XQuartz if its running.
  8. Now Dia should come up.
  9. If it does not come up, try restarting your computer.
If not, try and add the line - export DISPLAY=:0 to your ~/.bash_profile, re-login and hopefully you should have Dia working once again. 

Let me know if this helped you out :)





The red rectangle shows where I put the DISPLAY variable for Dia to start responding.

263 comments:

«Oldest   ‹Older   201 – 263 of 263
Paul Schoonheyt said...

Many thanks Bro !! You saved my journey xD

Victoria Kio said...

Worked perfectly for me even for El Capitan 10.11.6, thank you!!!

Mike said...

If your Mac time machine backup get fails and you desperately wants to recover your valuable files then you can get solutions here.Read more...

Chris Westland said...

Thanks ... solved the problem!

Rick Riehle said...

Two years later and it still fixes the problem. Thank you!

Lucas said...

Thank, you note really help me a lot.

Steve Bailey said...

Thanks! That worked great!

Alfredo Cole said...

Worked great! Thank you very much!

Vlax said...

LIfesaver!

Sam Abdul said...

it does not work for me! I've added export display =:0 to bash_profile and Dia. Is there any way run it ?

Lukas said...

It works for me too! Thank you very much! OSX 10.11.6 (El Capitan)

Zteve said...

Hey it works for me on El Capitan, too. Thank you. I note that the export should be made conditionally further up the script; but apparently the test is wrong. :-(

Kak Yong said...

It works!!! Thank you very much!

Nike62 said...

It worked fine also for me: great!

Arthur Berrill said...

Excellent. Thanks for taking the trouble to document the fix. Worked perfectly.

Jose Antonio said...

IOS 10.10 it works. Thanks

Unknown said...

Thank you, this was very helpful. May I suggest you update the post to tell people to make sure they have tried to run the program at least once before doing this to avoid the Gatekeeper corruption error that has showed up in the comments? I had the same problem until I found the comment from Darcy dated September 16, 2015 at 7:18 AM where he explained how to get around it. I had been trying numerous ways to solve this and apparently had reinstalled it, but never tried that instance when I found your post.

Ruwan Indika said...

Wow ...works, how did you figure that out ?

G said...

Thanks! Work like a charmed.

Vladimir Guzenko said...

Works for OS X El Capitan

Илья Шумилкин said...

Thanks, work for me
macOS 10.12.1 (16B2657)

Antonio Vera said...

From Spain. Thanks so much

Jai Madhav said...

Nice Trick it worked form me as well!!!

Edvin Jarosevic said...

Thanks for sharing it worked

Ronnie Linao said...

Thank you so much. Works on my Os X Sierra!

Kishore said...

Worked like a charm!!!!!

lbmsx08 said...

Thanks a lot, it did work for me too !
lbmsx08

Khalandar Nawal Sheikh said...

Worked fine for me... Just the right thing to do!

preseaos said...

thank you so much. but, how do you get to this solution?

Chris Paterson said...

Thankyou for this! Worked for me.

Jorge Eduardo Ayala Eslava said...

open http://xquartz.macosforge.org
exit
fi
fi
fi
export DISPLAY=:0
export DISPLAY =: 0
osascript -e 'tell app "XQuartz" to launch'
for i in `seq 1 30`; do
if [[ `ps aux | grep -v grep | grep startx | wc -l` -lt 1 ]]; then
sleep 1
fi

Work con MacO Sierra 10.12.3
Had the same problem, add the two lines as shown and the program runs well

SemiCondiment L said...

omg I can't believe it worked. thank you so much for taking the time to contribute to the internet!

Samira Niafar said...

Thanks. Worked!

Jorge Eduardo Ayala Eslava said...

Installation of diashapes-0.3.0.dmg and Mono runtime in MacOS Sierra in Espeañol:

Download (http://dia-installer.de/diashapes/index.html) diashapes-0.3.0.dmg and Mono runtime, first install Mono-Framework. Then mail diashapes-0.3.0.dmg, but do not install it, copy it into a folder and after the cikp right shows package contents. Go to: Contents / MacOS and in the Diashapes file, give cikp right edit with the text editor and modify the path:

MONO_FRAMEWORK_PATH = MCINTOSH / Library / Frameworks / Mono.framework / Versions / Current
to
MONO_FRAMEWORK_PATH=MCINTOSH/Biblioteca/Frameworks/Mono.framework/Versions/4.9.0

(For better security, better verify the path with finder and the name of the folder)

Save, close the text editor and double-cick the file Diashpes, it takes a while but then the dialago appears to instill the commas of the diagrams

Unknown said...

Worked for me on OSX 10.11.6. Thanks.

I'm surprised that, after 2.5 years, this has not been fixed by the Dia team. Any idea why?

Jorge Eduardo Ayala Eslava said...

Hi, I really do not know.
I am an unexpected in the subject, I wanted an option to visio and searching the internet I found with Dia, I did not work and I looked for this blog, which helped me to solve the problem, then look for Diashpes and I presented the problem, Restless I found the solution and wanted the one who had that problem could solve it as I solve mine.

Thanks!

Natan said...

you are sexy man!! grrat! TY!!

BASIL B.C. said...

still works.. thanks.

Amer said...

This worked for me! Thank you

Muhammad Alfian Wahyu Gumelar said...

This works for me! Thanks :D
How can this work?

Mr. Twigs said...

Fix works on macOS Sierra 10.12.3. I also confirmed that it did not work without your fix being applied. Thanks!

Ivan Huang said...

Works for me. Thanks!

Jen said...

It worked! Thank you!!

M de Vries said...

Thanks !!!

Venkat L S said...

Great. Works like a charm

FP said...

Works with El Capitan. Thanks!

Nathan said...

Yay, a bit late to the party, but THANK YOU!

BayArea_Dev said...

It works for me! thanks for sharing this!

J-P said...

Works fine on Sierra. Thanks :-)

Antonio Brunel said...

Great, it worked!

Unknown said...

Still works! Thanks!

Helena said...

I tried this method with textEdit, but that didn't work since it was locked. After installing emacs, everything worked out. So happy after all this time! Thanks!

Gostdog said...

Thank you!! it worked !!!

Unknown said...

What is the extension name of the program opened in text editor. I typed in the line of code and I saved it as .exe and .txt but it doesn't work?

Julien Ferrier said...

It works for me, thanks !

Valentin Mayr said...

Still working on Sierra ! Thanks!

ed said...

FUNCIONO GRACIAS

Abdelaziz Misbah said...

Thank You very much

Simon Ball said...

It's late 2017 and this fix still working, great :D

Clan Dunedin said...

Yay works for me on El Capitan. Thank you for taking the time to post this blog

I used Adobe Brackets as the (free) code editor (cause text edit doesn't show line numbers and notepad plus plus from sourceforge looked dodgy - asks for a password to open the DMG file.)

Alper Paksoy said...

Yes, it worked. Thank you.

Andreas Bresch said...

Thaaaaaanks!

Joseph said...

This solved my problem. Thanks!

«Oldest ‹Older   201 – 263 of 263   Newer› Newest»