<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.8.5">
</HEAD>
<BODY>
On Tue, 2015-04-14 at 00:01 +0200, Mattias Andrée wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On Mon, 13 Apr 2015 16:32:52 -0500
Ted Gould <<A HREF="mailto:ted@gould.cx">ted@gould.cx</A>> wrote:
<FONT COLOR="#737373">> On Sat, 2015-04-11 at 00:33 +0200, Mattias Andrée wrote:</FONT>
<FONT COLOR="#737373">> > Is there another way to identify which display server is</FONT>
<FONT COLOR="#737373">> > actually running? If not, I propose we add the</FONT>
<FONT COLOR="#737373">> > environment variable REAL_DISPLAY. The value of</FONT>
<FONT COLOR="#737373">> > REAL_DISPLAY should be then name of the environment</FONT>
<FONT COLOR="#737373">> > variable used by the display server that is actually</FONT>
<FONT COLOR="#737373">> > running. For example if Wayland is running with an X</FONT>
<FONT COLOR="#737373">> > compatibility layer, the value of REAL_DISPLAY should</FONT>
<FONT COLOR="#737373">> > be WAYLAND_DISPLAY.</FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> I think this is backwards. The system is more likely to</FONT>
<FONT COLOR="#737373">> want to setup the environment for the application rather</FONT>
<FONT COLOR="#737373">> than the application adapting to the system based on a</FONT>
<FONT COLOR="#737373">> list.</FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> As an example we're discussing supporting current</FONT>
<FONT COLOR="#737373">> applications that required X on the Ubuntu Desktop when</FONT>
<FONT COLOR="#737373">> running Mir. If a user is running applications that all</FONT>
<FONT COLOR="#737373">> can talk to Mir directly we're not going to start any</FONT>
<FONT COLOR="#737373">> type of X compatibility, there's no reason to have it. If</FONT>
<FONT COLOR="#737373">> the application needs that X compatibility we'll start</FONT>

How do you know if the application requires X?
</PRE>
</BLOCKQUOTE>
<PRE>

</PRE>
Right now we're using how it's installed. If it is a Click package we assume that it wants Mir unless otherwise specified, and backwards if it is a deb.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#737373">> that proxy as part of the application startup and the</FONT>
<FONT COLOR="#737373">> application will start in a world that it has X and it is</FONT>
<FONT COLOR="#737373">> happy.</FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">> So, it seems to me, that a better solution is to add a</FONT>
<FONT COLOR="#737373">> key to the desktop file that is something like:</FONT>
<FONT COLOR="#737373">> </FONT>
<FONT COLOR="#737373">>   PerferredDisplayProtocol=mir;x11;wayland;</FONT>

It works fine for .desktop files, we will just have to
patch all programs that start programs based on .desktop
files. But it is completely useless if I start from
dmenu, a terminal or a similar program.
</PRE>
</BLOCKQUOTE>
<PRE>

</PRE>
In Unity 8 we only allow starting applications via a desktop file, so that isn't a concern for us. I could see how it is a concern for others, but in that case I think they should only allow their display servers protocol (i.e. not start any proxies or compatibility layers) in that case.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
But there seems to be a misunderstanding here.
It is not about what the program prefers, it is about
what the real display server supports best, probably
best performance. So the list to .desktop files does
not solve _this_ problem, the list is specific to what
display server is running and its compatibility layers.
</PRE>
</BLOCKQUOTE>
<PRE>

</PRE>
So then, for us, it will always be set to "mir" as there will be no other compatibility layers running unless we think the application needs them.<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#737373">> Then we could also not show applications (or show them</FONT>
<FONT COLOR="#737373">> disabled or some such) that require a protocol that we</FONT>
<FONT COLOR="#737373">> can't support on a particular system.</FONT>

In .desktop files could specify a list of supported
display servers.
</PRE>
</BLOCKQUOTE>
<PRE>

</PRE>
I think that makes the most sense.<BR>
<BR>
Ted<BR>
<BR>
</BODY>
</HTML>