in reply to Re^2: Tk OSX couldn't connect to display :0
in thread Tk OSX couldn't connect to display :0

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.

non-Perl: Andy Ford

  • Comment on Re^3: Tk OSX couldn't connect to display :0

Replies are listed 'Best First'.
Re^4: Tk OSX couldn't connect to display :0
by chargrill (Parson) on Nov 27, 2006 at 04:39 UTC

    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($,,$;,$*,$/)
Re^4: Tk OSX couldn't connect to display :0
by Fletch (Bishop) on Nov 27, 2006 at 02:03 UTC

    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.