Problem with $DISPLAY

Chris Jones jonesc at
Mon Oct 13 04:06:36 PDT 2014

On 13/10/14 11:50, René J.V. Bertin wrote:
> Come to think of it, I can't (or maybe, refuse to) see a good, compelling reason why a local X11 server would have to use a non-human-readable $DISPLAY spec if it can be identified uniquely through :0 (or :1, :2 etc for subsequent instances). It's also how Linux manages things if additional users log in.
> What the client X11 library does with that to get to a local (file-based or not) socket is its own internal affair with which the client has no business, but IMVHO the protocol has no business breaking assumptions that have always been valid and thus (again, IMVHO), became a de-facto standard.
> I do have scripts that parse $DISPLAY to determine if they're dealing with a local or remote server, possibly even to identify the particular host being displayed on, and/or whether they're dealing with a main or secondary server (there were times I used a 2nd X11 server deliberately). Of course I could rewrite the scripts to deal with any kind of "blatheblathebla:X[.Y]" scheme, again, I fail to see a compelling reason why I would have to (or want to impose it on anyone).

Any scripts that make any assumptions on what $DISPLAY looks like are 
flawed by designed...

More information about the macports-users mailing list