|
|
Be careful setting your display
I have to say this every time a comment like this comes out...
Don't set your DISPLAY to 0! It's the cause of innumerable hard-to-diagnose problems because it's a fundamentally broken assumption. It breaks when you ssh in somewhere (as the poster of this hint has noticed) and it also breaks on multi-user Macs, and in some other less common situations. If you must have your DISPLAY variable set in non-X11 applications (which is the situation when you need to have something like the snippet of code in the hint) then use a method that not only checks that it isn't already set, but which then checks for what value it should take. There are several ways of doing this. One is to use open-x11 to open a script from inside X11.app that writes out the DISPLAY setting to some file (this is the method used by Gimp.app for example) or by searching /tmp/.X11-unix/ for the file with the appropriate ownership (see this article).
Be careful setting your display
Thank you! I was about to say the same thing... |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.65 seconds |
|