Identifying the real display server

Mattias Andrée maandree at member.fsf.org
Fri Apr 10 15:33:50 PDT 2015


We are now getting a few new display server that can
emulate the X-interface. Notably X programs can run under
Wayland and Mir because of that have compatibility layers
for X. If you are running Wayland with the X compatibility
layer. Both of the environment variables DISPLAY and
WAYLAND_DISPLAY are set, and we can from this deduce that
Wayland is running with a X compatibility layer.

However if Wayland and Mir add compatibility layers for
each other, we will have the environment variables DISPLAY,
WAYLAND_DISPLAY and MIR_DISPLAY (I assume that is what Mir
is using). If both compatibility layers are costly and we
want the optimal performance we cannot be sure either we
should use Wayland or Mir (or even X if X adds
compatibility layers for Wayland and Mir,) by looking at
these environment variables.

Is there another way to identify which display server is
actually running? If not, I propose we add the environment
variable REAL_DISPLAY. The value of REAL_DISPLAY should be
then name of the environment variable used by the display
server that is actually running. For example if Wayland is
running with an X compatibility layer, the value of
REAL_DISPLAY should be WAYLAND_DISPLAY.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/xdg/attachments/20150411/75eba385/attachment.sig>


More information about the xdg mailing list