Indeed.
I don't recall if it's actually necessary on OSX, but some time ago I ended up putting the following in my .profile or .bashrc so I never have to think about it ever again:
export DISPLAY=localhost:0.0
--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; =
qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
| [reply] [d/l] [select] |
Which could be OK in your case, but if you use ssh and X forwarding, your exported DISPLAY will overwrite the special one that ssh gave you.
The result will be that your X app will try to run on the machine that you ssh'd to instead of the machine that you ssh'd from.
Usually not what you want.
| [reply] |
That would indeed jump up and bite me in the rear if I were to ever SSH into the box where I have added that to my .bashrc - so sage advice to be sure.
In this case, it's my laptop - and if my laptop isn't the box closest to me, it's not on, and thus un-ssh-to-able :)
I do ssh out to a remote FreeBSD host, occasionally with X forwarding, and works as I intend.
--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; =
qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)
| [reply] [d/l] |
If you set it in ~/.MacOSX/environment.plist (if you don't already have one you can use the developer tools GUI property list editor to create one; it should be a dictionary, the keys being the environment variables to set and the string values the . . . erm . . . values to which to set them). Next time you log in and out (not just a Finder restart; have to go through loginwindow) anything started by the OS X GUI (such as iTerm or Terminal.app) should get those values in its environment.
| [reply] |