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.

307 comments:

«Oldest   ‹Older   201 – 307 of 307
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.

Unknown said...

Thanks! That worked great!

PharcydeWolf said...

Worked great! Thank you very much!

Vlax said...

LIfesaver!

Unknown 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. :-(

Dr. Nurzal Effiyana Ghazali said...

It works!!! Thank you very much!

Nike62 said...

It worked fine also for me: great!

BlueRoo2 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 said...

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

G said...

Thanks! Work like a charmed.

Unknown said...

Works for OS X El Capitan

Unknown 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!!!

Unknown said...

Thanks for sharing it worked

Unknown 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.

Unknown 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

Unknown said...

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

Unknown said...

Thanks. Worked!

Unknown 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?

Unknown 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!

Unknown 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!

Unknown said...

Works for me. Thanks!

Jen said...

It worked! Thank you!!

Unknown said...

Thanks !!!

Unknown 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 :-)

Unknown 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?

Unknown said...

It works for me, thanks !

Unknown said...

Still working on Sierra ! Thanks!

ed said...

FUNCIONO GRACIAS

Unknown said...

Thank You very much

Unknown 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 said...

Yes, it worked. Thank you.

Unknown said...

Thaaaaaanks!

Joseph said...

This solved my problem. Thanks!

Unknown said...

Move all iTunes data from old Mac to new Mac
click here

Unknown said...

This solves my problem. Thanks

Alex said...

I only just tried this in 2018 on high sierra and it is still the appropriate fix - well done.

Ricardo Rezende said...

Just one more "Thanks a Lot!"
I'm also on High Sierra and the same fix worked.
I'm wondering why it's not already fixed on the Dia script.

Many thanks.

msdisme said...
This comment has been removed by the author.
msdisme said...

+1 - Thanks!

L.A #4 said...

Thank you, worked well

Maria said...

Thank you so much, it worked for me!

Unknown said...

I solved it using XQuartz "Application" manager.

Click on Add Item
In the Name column added "Dia"
in the Command column added "/Applications/Dia.app/Contents/Resources/bin/dia"
Didn't add a Shortcut.
Close X11 Applicaiton Menu
Dia is now available under XQuartz's Application menu.

It's a kludge but it works. DISPLAY=:0 didn't work for me on macOS High Sierra 10.13.4

Cornelius said...

Thanks for this easy fix, it helped a lot. As I am still new to MAC and command line this level of debugging is over my head.

Unknown said...

Well done ! Thanks

Ankit Mathur said...

Worked For Me Too....... Cool Trick.

Thanks Buddy

Unknown said...

thanks!, works for me, OS/X High Sierra 2018

Unknown said...

Thanks!

Jhonny Cash said...

Thank you!!

acoustrics said...

Thanks so much for this! I'm on El Capitan (10.11.6) and it worked for me.

Anna said...

Thank you!!

Anonymous Geek said...

Still works on El Cap 10.11.6. May your bitcoin wallet always be full!

Unknown said...

Thank you sharing your hack! Worked for me, too!

jayeola said...

X years later - Thanks!!!

ProductsRace said...

Please do make a detailed review of the new upcoming models of the Apple one of them I just went through was Apple Mac Pro 2019 Preview Looking forward to read it

Anonymous said...

It works... thank you so much.

LooseCanon said...

Four years later and the download isn't fixed and your fix still works. Thanks!

Unknown said...

it works, thank you very much !

intrigue said...

Thanks very much...Saved my day...

Unknown said...

Its work for me. Simple and help me. I am using MacOS Mojape. Thank you.

austinhelp20 said...

Hello, I’m Austin. I’m a support adviser living in USA. You can read my blog as I also help in providing solutions regarding Technical Support you can contact me at SBCGlobal Email Support Number
SBCGlobal Email Phone Number
SBCGlobal Email Technical Support

Paul Zones said...

There are times when people face issues while loading their Mozilla Firefox account. If you also are facing the same problem, then you don’t need to worry because you can take help from experts. You can reach out to the experts via Mozilla Firefox Customer Support number, which stays available round the clock in 24 hours. The experts of the customer care team will first hear the issue and then will give you the best solution, which will eradicate the problem from the roots itself. The team of professionals is known for their professional behavior and prompt response.
Read More : Mozilla Firefox Customer Care Phone Number
Mozilla Firefox Customer Support
Mozilla Firefox Customer Support Number

Camzilla54 said...

Well, I had no idea how to edit a file that default opens with the terminal but I do now! computer knowledge +10%

annewilliam said...

Lovely post thanks for sharing. Read mine also:
How to Fix Mozilla Firefox Internet Download Manager
Error 2324

OSKAR said...

Unsubscribe

Unknown said...

you are god!

regards from argentina!

AfroCode said...

Excelent bro! It's working now.

Unknown said...

Works!

Unknown said...

thanks mate. It's 2020 and this is still what saved me.

Angel said...

2021 And it still works. Thank you!!!

Unknown said...

yes, adding "export DISPLAY=:0" at line 39 of "/Applications/Dia.app/Contents/Resources/bin/dia" and restarting XQuarz did the trick. Thank a lot for the hint.

Unknown said...

uups, sorry. Adding "export DISPLAY=:0" _after_ line 39, not _at_ line 39.

Anonymous said...

Still VERY useful in 2021, THANKS!!!

Skelkelbel said...

Thanks so much for this, it still work for Big Sur!

Unknown said...

It's 2021 and I still needed this fix from 7 years ago! Thank you soooooooooo much!
Also hello from the future :)

Unknown said...

Thank you. It works for me!

ShredMustaine said...
This comment has been removed by the author.
jusblad said...

Smart cookie!

Your solution looks to work well, and consistently, without the per-session command line workaround I found on bugzilla.gnome.org:

$: nohupp Xephyr etc.

I wasn't looking forward to doing this command-based workaround each time I wanted to use Dia, either through the terminal, or an adjustment to scripts.

So thanks again, a simple one-line change to the dia file and away we go on my old, old OSX machine!

Natasss said...

Gracias buen hombre!!

Unknown said...

Thanks a lot after days of trying to run dia this steps helped and it works now

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