<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">One of my machines has:<div><br></div><div>% echo $DISPLAY<div>:0</div><div><br></div><div>Digging deeper, I find in ~/.zprofile</div><div><br></div><div><div># MacPorts Installer addition on 2020-12-29_at_06:08:54: adding an appropriate DISPLAY variable for use with MacPorts.</div><div>export DISPLAY=:0</div><div># Finished adapting your DISPLAY environment variable for use with MacPorts.</div></div><div><br></div><div>My other machine also has a <span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">~/.zprofile, but it only sets the PATH.  it does not set DISPLAY.</span></div><div><span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br></span></div><div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);">I surmise that MacPorts stopped fiddling with DISPLAY sometime between late 2020 and late 2021.  Maybe there should be some automatic check of DISPLAY in .zprofile, and a it could offer to clean it up if needed.</span></font></div><div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);"><br></span></font></div><div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);">Cheers,</span></font></div><div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);"><br></span></font></div><div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);">Kevin</span></font></div><div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);"><br></span></font></div><div><font color="#000000"><span style="caret-color: rgb(0, 0, 0);"><br></span></font></div><div><br><blockquote type="cite"><div>On Dec 1, 2023, at 03:42, Christopher Jones <jonesc@hep.phy.cam.ac.uk> wrote:</div><br class="Apple-interchange-newline"><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On 1 Dec 2023, at 6:52 am, Kenneth Wolcott <kennethwolcott@gmail.com> wrote:</div><br class="Apple-interchange-newline"><div><div>Hi;<br><br>  So what is the proper way for X to be started?<br></div></div></blockquote><div><br></div><div><br></div>If properly configured the X11 server will automatically start on demand. You really should never need to manually start it.</div><div><br><blockquote type="cite"><div><div><br>  Do I need to manually create a launch entry like I have for the<br>emacs server?  If so, what is the invocation? What is being invoked?<br>xorg-server?<br><br>  Now that the DISPLAY is null, invoking xpdf fails even after an open<br>-a /Applications/MacPorts/X11.app, complaining about the DISPLAY<br>variable setting</div></div></blockquote><div><br></div><div>Having DISPLAY null is as bad as setting it to :0.0</div><div><br></div><div>It should look something like what I posted before</div><div><br></div><div><span style="caret-color: rgb(0, 0, 0);">$ echo $DISPLAY</span><br style="caret-color: rgb(0, 0, 0);"><span style="caret-color: rgb(0, 0, 0);">/private/tmp/com.apple.launchd.TwDg8TRtvI/org.macosforge.xquartz:0</span></div><div><br></div><div>This is the launchd socket, the magic if you like, that triggers it to be started on demand.</div><div><br></div><div><font>Please try as I posted in my first mail completeing uninstalling org-server, then re-install it. Then log out and back in again (this is <span style="caret-color: rgb(0, 0, 0);">important) and then see. If it is still null then you have something else setting that and you need to figure out what.</span></font></div><div><font><span style="caret-color: rgb(0, 0, 0);"><br></span></font></div><div><font><span style="caret-color: rgb(0, 0, 0);">Chris</span></font></div><div><font><br></font></div><blockquote type="cite"><div><div><br>Thanks,<br>Ken<br><br>On Thu, Nov 30, 2023 at 10:47 PM Kenneth Wolcott<br><kennethwolcott@gmail.com> wrote:<br><blockquote type="cite"><br>Hi Ryan;<br><br>  It was defined in ~/.zprofile and created by MacPorts in 2021 :-)  I<br>commented it out. I'll source the .zprofile and see what happens.<br><br>Thanks,<br>Ken<br><br>On Thu, Nov 30, 2023 at 10:23 PM Ryan Schmidt <ryandesign@macports.org> wrote:<br><blockquote type="cite"><br>On Nov 30, 2023, at 16:01, Kenneth Wolcott wrote:<br><blockquote type="cite"><br>3. My DISPLAY environment variable is set to ":0";<br>I do not know where this variable is not being set properly or is<br>being overridden.<br></blockquote><br>You need to figure out where DISPLAY=:0 is being set, and remove the code that does so. It's probably in your shell startup file. Depending on which shell you use, there are many possible names for startup files in your home directory: .zshrc, .zprofile, .bashrc, .bash_profile, etc.<br><br>Setting DISPLAY=:0 was correct in Mac OS X 10.4 and earlier but it has not been correct since Mac OS X 10.5.<br></blockquote></blockquote></div></div></blockquote></div><br></div></div></blockquote></div><br></div></body></html>