Identifying the real display server

Ted Gould ted at gould.cx
Tue Apr 14 06:15:45 PDT 2015


On Tue, 2015-04-14 at 00:01 +0200, Mattias Andrée wrote:

> On Mon, 13 Apr 2015 16:32:52 -0500
> Ted Gould <ted at gould.cx> wrote:
> > On Sat, 2015-04-11 at 00:33 +0200, Mattias Andrée wrote:
> > > 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.
> > 
> > 
> > I think this is backwards. The system is more likely to
> > want to setup the environment for the application rather
> > than the application adapting to the system based on a
> > list.
> > 
> > As an example we're discussing supporting current
> > applications that required X on the Ubuntu Desktop when
> > running Mir. If a user is running applications that all
> > can talk to Mir directly we're not going to start any
> > type of X compatibility, there's no reason to have it. If
> > the application needs that X compatibility we'll start
> 
> How do you know if the application requires X?



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.


> > that proxy as part of the application startup and the
> > application will start in a world that it has X and it is
> > happy.
> > 
> > So, it seems to me, that a better solution is to add a
> > key to the desktop file that is something like:
> > 
> >   PerferredDisplayProtocol=mir;x11;wayland;
> 
> 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.



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.


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



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.


> > Then we could also not show applications (or show them
> > disabled or some such) that require a protocol that we
> > can't support on a particular system.
> 
> In .desktop files could specify a list of supported
> display servers.



I think that makes the most sense.

Ted

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xdg/attachments/20150414/7b063a43/attachment-0001.html>


More information about the xdg mailing list