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:

1 – 200 of 307   Newer›   Newest»
DF said...

Worked for me, thanks a lot!

Nav said...

Great to hear thanks :)

Unknown said...

Thanks man. Works for me as well. I was wondering why it doesn't work and already started to install in in the virtual machine :-P

Nice job. Thanks again.

Stefci

Nav said...

:)

Unknown said...

Hooray! This worked for me, too. Many thanks!

Nobby said...

Thank you, your fix worked for me. Hero of the day!

Mark A. F. Knight said...

I need help guys...can't seem to get this to work...

Nav said...

Hey....what seems to be the problem?

Unknown said...

Great, thanks a lot for the help - worked perfectly!

Anonymous said...

Thank you! Thank you! Thank you!

Unknown said...

Struggling! Is there anything I'm missing? Just insert the line below line 39? What does line 39 say?

Unknown said...

Also struggling! Please be more precise about line 39. Thanks1

Unknown said...

Sadly it didnt work out for me, both ways...
It opens x11 but dia is not opening, just comes up bounces a few times and disappears.

Andreas Pørtner Karlsen said...

I just want to give a big thumbs up for the post, much appreciated!

Worked wonders for me.

Nav said...

I have updated the blog and put in a screenshot of the .dia file contents, which displays the exact location of the DISPLAY variable. This is for those who were asking me where I added the one liner. Hope this helps!

Unknown said...

Thank you very much!!!

Unknown said...

Thank you very much, Nav!
Your screenshot was very helpful!
Dia works again the way it should.

Phiphy said...

It's alive again! Thank you so much!

Unknown said...

Thanks dude, it was just one semicolon too much for me :-D
without it's workin.

Much Appreciate it!!!

Unknown said...

Worked for me!! Thanks man!

Unknown said...

Wow!! You saved my day. This worked like a champ. Thank you so much!

John H. said...

Nice insight! Fixed Dia for me, too.

Anonymous said...

¡Great! ¡Thanks again!

Nisrina Rahmah said...

Thank you for your kindness. I've tried it before but now it's clear after seeing your screenshot. works like charm!

Nav said...

Makes me really happy it works for so many people :)

Alex Clark said...

Another Dia fixed here, thanks!

Unknown said...

Thanks so much! Saved me :)

Noa said...

Thanks a lot men.

Regards.

Unknown said...

Worked a treat, thanks!

Unknown said...

Thanks a lot, it worked!

Richard Le Gitanne Turilli said...

Thanks a lot and greetings from México. :)

DavidH said...

Thank you.

Very, very much appreciated :)

David

Justin said...

Oh Glorious Day! Your fix worked wonderfully! I, too was going to begin running it in my Win8 VM but decided to Google once more for a fix. Thank you for sharing!

Unknown said...

Thanks from Mexico!!!

Unknown said...

thanks from China.

Unknown said...

thanks a lot from China

Unknown said...

Had to wait some time for it to load, and dia icon keeps jumping after start, but works, thanks!

Unknown said...

Thanks so much!

Nav said...

@everyone - I am elated to hear that this helped so many :)

ken said...

this only works if you've tried to run Dia.app after copying to /Applications first. otherwise you get a message about a corrupt file.

1. install by dragging to /Applications
2. attempt to run for first time
3. edit dia

JM said...

Thank you!!! Really helpful.... Cheers

Juan Manuel Ramón Vigo said...

Thank you! thank you! thank you!

Oh, I forgot... Thank you very much!! :D

Rev. Criss Ittermann, Life Facilitator said...

Worked for me, thank you so much :) Didn't need to reboot, first fix adding line 39 worked.

Anonymous said...

thanks a lot!

Admin said...

Super, funktioniert wieder!

Dee Jeff 74 said...

Great job ! it worked. Thanxxxx ! Pls note : X11 update extraction does not work, so I'm going to do a clean install of .dmg package from Apple website

Unknown said...

This works, thank you!

Unknown said...

Thanks for the tip! Helped a lot :)

Vineeth Chandran said...

Awesome! Thanks a lot!

Unknown said...

I can't seem to get it to work. I add the code on line 39 and try to run it and OSX tells me the package is damaged and can't be opened. I think it may work if I can get it to run it. Please help!

Allan said...

You are a HERO! Thanks so much for posting this . . . worked like a charm! This saved me an enormous amount of time!

TerrapinJess said...

Worked for me! Thank you!

LM said...

Many thanks....worked like a charm

Tweener said...

Thanks a lot

Unknown said...

My 'dia' file doesn't look like that, it has less code in the x11 discovery, for one
https://www.dropbox.com/s/0iysl7uenm8uag9/Screenshot%202015-02-10%2014.31.29.png?dl=0

I also got an error message about a damaged app.

PigSnowballer said...

Thanks that worked!

Andrew Barss said...

Hadn't used Dia for a couple of months, and not since I upgraded to Yosemite. And, of course, it wouldn't launch.

Found your blog post, which solved the problem beautifully.

Thanks SO much for taking time to share this information. Really appreciate it!

markM said...

I was about to give up on using Dia on my OS X box. I even considered converting it to Linux, where Dia works out of the box. Then I found your blog. Thank you very much for taking time to share the solution.

max said...

Thanks, it worked!!!

Unknown said...

Thank you very much!!!

Ramya said...

Hi, I edited the dia file in the Macintosh HD ▸ Applications ▸ Dia ▸ Contents ▸ Resources ▸ bin and I opened Dia in Applications after closing the X11 and restarting, but doesn't work (says, dia file is corrupted and move to trash) but when I open the dia executable in the bin directory, it works. Please help me here.

Fonso said...

Thank you very much it was very useful :)

Unknown said...

thanks worked for me too :))

Unknown said...

works for me, Thx

utka said...

Thank you! It works now!

[Rey] said...

Thank you, smart person, for being smarter than me, walking the path less trodden and paving the way for the rest of us meandering elephants. I applaud you.

Unknown said...

Thank you very much! Still Dia takes some time to come up, but after it finally does, all is fine.

Carlos Miranda Levy said...

Worked for me :p
Takes some time for Dia to open, so I thought it was not working, but then, bam Dia came up :-)

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

hey, thanks a lot, you really saved me here.

Unknown said...

Thank you SO much. Finally, I can use Dia again!

LCastedo said...

Thank you, it worked fine without restarting.

monkey card said...

Thank you!

Unknown said...

Thank you ! It works well.

Anonymous said...

That works perfectly !!!! many thanks !!!

silvelito said...

That worked just fine! Thanks mate.

silvelito said...

That worked just fine. Thanks mate.

Unknown said...

It's ok for me! Tks very much

Unknown said...

Have you ever heard of Lucidchart? It's cloud based, and makes it pretty easy on any computer. I'm not a pro with all of the software, but it worked great for me.

Fer said...

You are god, thanks it works, I wonder why they dont patch their package....

Anonymous said...

Not working for me with 10.10.3
Message is "app corrupt put in in trash".....
Thanks for help.

Anonymous said...

Not working for me with 10.10.3
Message is "app corrupt put in in trash".....
Thanks for help.

Unknown said...

THANKS YOU!!! It's working

Stephanie said...

Does not work, unfortunately, but gives me a complete system hang. (OS X Yosemite 10.10.3) Would be better, if the dia installer could be fixed to work with Yosemite.

JMSL said...

Worked for me! Thanks a lot! :)

Evan said...

I gave up the problem when there was no fix and started using creately online diagram and collaboration software

Unknown said...

For those who are struggling with this fix, i.e. you add the fix to the dia script at line 39 as suggested and still nothing happens, you may think that you closed X11 but you haven't really, so:

Make sure that you kill all the Quartz processes (the X11 replacement), that is, run

# ps awux | grep quart

and start killing all the processes listed there using the kill command (or just kill the one named startx, which should take the rest down).

after the process list no longer lists any quarts related processes, then manually run

# startx

After that and the fix above, Dia should start normally.

Unknown said...

Many thanks. This worked for me.

Unknown said...

worked as you mentioned!
thanks a lot!

Unknown said...

Thanks a lot....working now :)

Unknown said...

Thank you a lot, DIA is working again for me.

Unknown said...

Thank you very much. I like it when it's easy for me, but it must have been a pain for you

Unknown said...

Thank you, Thank you, Thank you!

I didn't have to restart XQuartz either.

Bryan Harris said...

Wonderful! Thank you so much!

Steja Blog said...

Thanks a lot for the information. Work for me !

Unknown said...

Thanks for the info. Worked for me too!

Miner2049er said...

Thank you - your guide allowed me to use Dia again!

Unknown said...

Thank you so much for this blog post.

JMAG said...

Thanks, it really works. I was worried for not been able to work with it any more.

Unknown said...

It worked, but Dia icon keeps bouncing all the time in my dock :O It does not bother me, but that doesn't seems to happen

Dimitri Ognibene said...

In my case it did not work but I launched it form the xterm and it worked... (without the modification suggested)

Ahmad Imanudin said...

Hi,

Thanks for your tips. It works for me. Thanks a lot

Unknown said...

Worked like a charm. You rock! Thanks!

Milan Lempera said...

Thanks, it works great!

Unknown said...

Worked like a charm. Thank you so much.

Narayan Bhandari said...

Thank you very much. I helped a lot. In mine line number was more than 39

selim said...

Wow that works. Thank you very much.

Unknown said...

Thank You! Works fine.

Anonymous said...

Awsome !! thanks!

Unknown said...

Awesome! Worked like a charm.

Unknown said...

Thank you!

Unknown said...

Realmente gracias, lo leo desde colombia e hiciste un gran aporte, espero en un futuro agradecértelo, vuelvo y repito, realmente gracias...

Unknown said...

Worked for me on mac os x 10.10.2

Unknown said...

Work on me too. mac os x 10.10.5

zydeoN said...

Nice! Thank you! Working on mac OS X 10.10.4. How did you find out about the DISPLAY variable?

Darcy said...

For those of you having trouble with an "App Corrupt - Send to Trash" message, the problem is that you didn't try to start Dia before you edited the file. Once you edit the file, Mac OS sees the edited program as corrupt because it is not in the state that you downloaded it in. The fix: Download and install Dia. Try to run it (it will fail). Edit the file, add the line to export the display, save and run. That works for me.

Unknown said...

Thanks a lot, you saved me a lot of trouble. Couldn't start Dia on Mac OS X 10.10.5

Pandora said...

Thanks a lot, man! I am a frequent user of Dia for many types of diagrams. You just saved a scientific paper.

Unknown said...

Thanks a lot, Working on Mac OS X 10.10.5

Unknown said...

Thanks mate!

OSKAR said...

Humm...don't seem to work for me. I use Mac Yosemite. However my Dia file does not have the sections shown in your picture, in regards to checking and starting X11. In my case when I try to the open app, the icon bounces for a few secs and then disappears. I don't see the Quartz app attempting to start and I know I have it cause I use it with Wireshark. Any ideas?

Shraddha said...

I have the same problem as OSKAR.
Despite all the changes and log-out/log-ins, the icon bounces for a few seconds and then disappears. X11 starts but Dia does not.
Does anyone know how to resolve this problem?

Darcy said...

I would try a full reboot if you haven't yet. I had problems like this using X11 where the program's wouldn't work without a full reboot.

OSKAR said...

I found that I was using an older Dia version that I had downloaded sometime ago. After downloading and installing the latest available for Mac, the app appears to be working fine after applying the fix.

Unknown said...

It worked for me! Thanks!!!

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

It worked for my wife, thanks :)

Anonymous said...

You are scholar and a gentleman. Thanks, it fixed my problem.

tukaram said...

great . works like a charm.

Unknown said...

cheers m80. your tip worked perfectly (on yosemite). took a while for the Dia icon to stop bouncing though. just need to find the best method of importing a mindmap from freemind.

if the mac version and linux version's of freemind had been compatible i wouldn't be here.

but they aren't, so i am.

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

so good! worked even without restarting the mac. Thanks a lot man!!

Unknown said...

Being a new apple user I have been facing many problems to operate it. Among many others, for now I need a statistical software to instal in my macbook pro 10.10.5. But when I tried I could not. But it is essential for me. If anybody can help me to solve this problem.


Thank you.

Anonymous said...

worked like a charm, thanks

Unknown said...

Thank you very much! It's now working...

Unknown said...

Thank you very much from Brazil!

Unknown said...

thanks from france

Benson Fan said...

Worked! Thanks!

Unknown said...

Thanks a lot ! Your post helped me.

Unknown said...

If anyone had problems opening Dia on mac they can also see: https://discussions.apple.com/thread/6663397?start=0&tstart=0

Additionally, I had the problem of not being able to use arguments for /ApplicationsDia.app/Contents/Resources/bin/dia. eg:
dia -e test.eps -t eps test.dia

I found out that my arguments was not passed to the execution of dia-bin, at the last line (144) of /ApplicationsDia.app/Contents/Resources/bin/dia:
exec "$CWD/dia-bin" --integrated
The solution is to add the arguments by replacing the line with:
exec "$CWD/dia-bin" --integrated "$@"

Unknown said...

Worked for me, thank you!

Thyago F.S. said...

Thanks!

Anonymous said...

This worked for me too. Thanks so much!

Unknown said...

Thank you so much!!!!

lisovskiy# said...

Worked! Thanks man!!

Unknown said...

hey !!!!works for me too!!!!
thanks a lot

boriel said...

It worked for me! Thanks!!

Unknown said...

Thank you very much. It worked for me as well. :D

Unknown said...

Thank you, it works!

Unknown said...

This worked great for me on 10.11.2 - thanks very much.

With Text Editor, the line number looks wrong because it doesn't number the lines and long lines wrap (so you count one line as more than one when pressing the down arrow).

Follow the image and all is good :-)

Unknown said...

It worked on El Capitan. Many thanks kind sir :D

Patricia Rodrigues said...

Thank you! It works on El Capitan.

Szindbád said...

Worked for me as well, Thx.

Paulo Sequeira Gonçalves said...

Did worked for me at OSX Yosemite.
thx a lot :-)

Unknown said...

Thnx a lot! It worked

Unknown said...

Awesome work! Thank you so much!

Unknown said...

Thanks a lot! Now it works!

Unknown said...

nice...it works

Unknown said...

Thank you so much!

Unknown said...

Excellent. Thanks a lot.

Unknown said...

Thanks Nav, your fix worked for my newly upgrade OX. Hero of the day!

Unknown said...

Thank you so much! It helps a lot!

Unknown said...

Try to change the read/write permission level on the file, with: "sudo chmod 777 "

I'm not sure of what level, to give the file, is the most "correct", but 777 opens the file to everything.

Unknown said...

Awesome Dude!!!

Unknown said...

Kudos. Well done.

Berta said...

I have EL Capitan and I had the same problem.

This solution works perfect!! Thanks

Unknown said...

OSX EL Capitan 10.11.3

Also works after that modification on
/Applications/Dia.app/Contents/Resources/bin/dia

Unknown said...

Works for me on El Capitan 10.11.3 as well. The first time I tried it, I missed the word "export" .. maybe that will help other people. Also no restart needed and took a minute to launch but no crash! THANKS!

Unknown said...

Thanks a lot dude, now I can finish my homework :D really appreciate this!

K.Seek said...

You saved me couple hours of trying to solve this, thank you body!!!

Ben said...

Oh yeah! Thanks for the fix. Now I can live the open source dream.

Unknown said...

Fantastic! Worked with El Capitan 10.11.4 and Dia 0.97.2-7 (downloaded today 05Apr2016). Note to reference the screenshot for the location to add the export line, following line 39 may no longer be correct. Also, no restart required here.

KSobo said...

Thanks so much!

KSobo said...

Thanks so much!

Pasażer said...

Thanks!!!

Unknown said...

THAAAAANKS A LOT! I had no idea what to do and I ended up working with W8 in a virtual machine :v
this is really helpful <3

aa said...

unfortunately it didn't work for me neither. I'm using Yosemite 10.10.5.

When modifying the line 39 in dia file and trying to execute Dia, I get an error message saying that the file is corrupted if I want to move it to trash. :/

And after adding the line in the .profile and executing it with source .profile, I tried to open Dia but only X11 is launched. No Dia windows at all. :(

Unknown said...

thx very much!!!

Unknown said...

OS X EL Captain 10.11.4, dia-bin 0.97.2.

It worked out for me as well, Thank you very much.

sim said...

Woooow.. u r great..i was searching for almost 2 days in google and started installing some unnecessary packages & libraries.. finally i found your blog & u saved my time from searching for the solution..

Manuel said...

It worked for me, thanks.

Unknown said...

It worked for me, thanks.

Unknown said...

Thx worked for me as well!

Unknown said...

WORKED FOR MEH. OS X El Captain. thanksss

desablogo said...
This comment has been removed by the author.
Unknown said...

Fix still working for dia 0.97.2 with OS X 10.11.5 El Capitan.
Thanks a lot.

Unknown said...

Really, it's a great solution

Anonymous said...

Like a charm!!!

OldSoldier said...

Another satisfied customer!!! Thanks for this great tip!!

Unknown said...

It worked for me too! Great!!
OSX El Capitan!

hitesh said...

Thanks for this blog.

taro said...

It works, Thank You.

arnS said...

Perfect trick, worked like a charm. Thanks

Mike said...

Here is a complete guide to Save your Mac from Thunderstrike-2

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

It works! Many thanks! Maybe you can also provide help with uml2php5 plugin which only works on PC not on Mac.

Unknown said...

Thank you, your fix worked for me, is the only information that is in the whole web , was a success

Hélène said...

Nice trick, it works !

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

«Oldest ‹Older   1 – 200 of 307   Newer› Newest»