make xorg-server a dependency of x11 ports?

Ryan Schmidt ryandesign at
Thu May 21 02:19:41 UTC 2020

On May 20, 2020, at 21:09, Fred Wright wrote:

> On Wed, 20 May 2020, Ryan Schmidt wrote:
>> On May 20, 2020, at 08:30, Ken Cunningham wrote:
>>> Should xorg-server should be made a dependency of some key x11 component, so that when people install an x11 application, xorg-server installs and it actually works for them “out-of-the-box”.
>>> For example, CherryTree is apparently a very popular gtk application, and there was some pressure for the past few years for a Mac version. I just stumbled across it recently — took about 15 minutes to write the Portfile (and a couple of minor edits after to get it completely right :>).
>>> But when people try "sudo port -v install cherrytree” it delivers a broken installation due to no xorg-server (see below).
>>> It’s one more step to go back and explain how to install the server, but really, as is really out of date now, and MacOS no longer comes with any X11 window server, I think we could just make our xorg-server a dependency of some key part and have it installed automatically.
>>> Otherwise, it seems like just one more needless headache for people that they should not have to worry about, and we’re all about making this work “out of the box” for people, right? — or we should be, if we want to recruit keep users.
> Just because XQuartz is "out of date" doesn't mean that it might not be adequate in many cases, and I've found that switching from one X11 to another involves wrestling with some poorly documented configuration stuff, sometimes unsuccessfully.  So forcing someone who already has XQuartz (or Apple's X11, for that matter) installed and working to switch to the MacPorts xorg-server could inflict unnecessary pain.

XQuartz and xorg-server are the same software, maintained until a few years ago by the same person. He has become unavailable due to other commitments and has stopped updating XQuartz and contributing to MacPorts. Someone else has taken over keeping the MacPorts ports updated. But they are the same software and should require no different configuration.

Apple's X11 only exists on Mac OS X 10.6 and earlier so it's not very interesting to talk about at this point.

>> "could not open display" is a pretty normal error for an X11 app to give when it can't find the X11 server. I don't see an entry in our FAQ wiki page for this error. We could add one that tells the user how to install and set up the xorg-server port.
> That's also the error that one gets when there's a perfectly good X11 server installed but DISPLAY isn't set appropriately, so a distinction needs to be made between those cases.  I've also seen a case where a missing DISPLAY results in a segfault from Gtk.

macOS sets DISPLAY properly for you, ever since Mac OS X 10.5. So talking about a misconfigured DISPLAY isn't very interesting either; it would take a concerted effort on the user's part to deliberately set a wrong value.

> The best approach might be simply to have a conditional port note in any X11 app, that checks to see whether *some* X11 server is present, and gives a warning with an installation suggestion if not.

What I'm trying to avoid is having to add boilerplate code to hundreds of ports. So I guess that means yet another portgroup to do this. But even that -- editing hundreds of possibly optionally X11-using portfiles to insert the inclusion of that portgroup only when X11 is actually going to be used -- is a big effort.

More information about the macports-dev mailing list