make xorg-server a dependency of x11 ports?

Fred Wright fw at fwright.net
Thu May 21 02:09:32 UTC 2020


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 XQuartz.app 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.

>>
>> Ken
>>
>> — example of cryptic error without xorg-server installed, gives people no clue what is wrong.
>>
>>
>> =========
>> So I've tried to run this using port myself and get the following error:
>>
>> phillips321 at Mac13:~$ cherrytree 
>> /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: 
>> GtkWarning: could not open display
>
>
> "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.

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.

Fred Wright


More information about the macports-dev mailing list