Identifying the real display server
Mattias Andrée
maandree at member.fsf.org
Mon Apr 13 10:33:23 PDT 2015
On Mon, 13 Apr 2015 10:14:32 -0700
Thiago Macieira <thiago at kde.org> wrote:
> On Monday 13 April 2015 12:14:02 Simon McVittie wrote:
> > (tl;dr: PREFERRED_DISPLAY="wayland mir x11" would be
> > better than PREFERRED_DISPLAY="WAYLAND_DISPLAY
> > MIR_DISPLAY DISPLAY".)
>
> If we're going to do that, why not put the full
> identifiers in the variable? Then we wouldn't have to
> look up another environment variable for the details.
Are you asking why we should have PREFERRED_DISPLAY=x11
rather than PREFERRED_DISPLAY=DISPLAY or are you asking
why we should have PREFERRED_DISPLAY=x11 rather than
PREFERRED_DISPLAY=x11=:0?
If the former:
Assume have program that uses an abstraction layer.
Then we can, for example, do something like
for proto in os.environ['PREFERRED_DISPLAY'].split():
if not proto == '':
if my_abstraction_layer.select_protocol(proto):
break
else:
my_abstraction_layer.select_protocol('dri'):
If the latter:
If we do not to it this way, it makes the example above,
and similar things, more complex.
I think that WAYLAND_DISPLAY &c should _not_ be removed.
So it would be redundant, and doing a second look up is
cheap. And a program that only supports Wayland would
have to parse PREFERRED_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/20150413/e431333f/attachment.sig>
More information about the xdg
mailing list