Quartz no longer launching when an X application is invoked

Kenneth Wolcott kennethwolcott at gmail.com
Thu Nov 30 22:01:00 UTC 2023


Hi Chris;

  Thank you for your response.

  1. I manually use /Applications/MacPorts/X11.app (/usr/bin/open -a
/Applications/MacPorts/X11.app when inside a script) when invoking an
app (such as /opt/local/bin/xtern) which then fails:

~: which xterm
/opt/local/bin/xterm
~: xterm &
[1] 6134
[1]  + exit 1     xterm
~: xterm: Xt error: Can't open display: :0

~: open -a /Applications/MacPorts/X11.app
~: xterm &
[1] 6423
~: echo $DISPLAY
:0

2. I uninstalled and re-installed xorg-server per your instructions.
This did not solve the problem.

3. My DISPLAY environment variable is set to ":0";
I do not know where this variable is not being set properly or is
being overridden.

I do have an emacs server launch:
~/Library/LaunchAgents/gnu.emacs.daemon.plist

Should I create something similar for X? If so, what app needs to do
the work? org-server?

Thanks,
Ken Wolcott

On Thu, Nov 30, 2023 at 2:55 AM Chris Jones <jonesc at hep.phy.cam.ac.uk> wrote:
>
> Hi,
>
> 'Quartz' has nothing to do with X11, its the primary compositor used by
> macOS itself to render graphics.
>
> I assume you are actually taking about the X11 server, which in MacPorts
> is provided by the 'xorg-server' port and historically was provided by
> the 'XQuartz' package.
>
> Some basic questions.
>
> 1. What installation of the X11 server are you using ? the MacPorts
> provided one or something else ?
>
> 2. Regardless of your answer to 1., try (re)installing the MacPorts
> provided one
>
>   > sudo port uninstall xorg-server
>   > sudo port install xorg-server
>
> Then log out and back in again. This step is important as if you skip it
> things do not work correctly.
>
> 3. Finally, in order for the automatic starting of the X11 server on
> demand to work, you need your DISPLAY variable set correctly. It should
> look something like
>
> $ echo $DISPLAY
> /private/tmp/com.apple.launchd.TwDg8TRtvI/org.macosforge.xquartz:0
>
> i.e. it needs to refer to a launchd socket. If you see something else
> instead you like are overriding this somewhere and you need to find and
> remove this.
>
> Chris
>
> On 30/11/2023 5:30 am, Kenneth Wolcott wrote:
> > Hi;
> >
> > Quartz no longer launching when an X application is invoked
> >
> > The first time I had installed some ports that were dependent on
> > Quartz I had difficulty getting them to start because Quartz was not
> > running.
> >
> > The first solution was to manually invoke Quartz, which worked ok.
> >
> > I then was able to get Quartz to start via Launch when an X
> > application was invoked.
> >
> > Recently (?) it stopped working and I'm not sure why.
> >
> > All research I've done so far has been fruitless, I'm just not asking
> > the right questions...
> >
> > I'm back to manually starting Quartz.
> >
> > Please show me how to diagnose the problem and also to solve it.
> >
> > Thanks,
> > Ken Wolcott


More information about the macports-users mailing list