Identifying the real display server

Mattias Andrée maandree at member.fsf.org
Mon Apr 13 15:01:54 PDT 2015


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?

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

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.

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

A solution for this, when .desktop files are not used,
that I'm planning to implement is to have programs in
separate directories:
  /{,s}bin   Programs that run in the terminal or
             can run anywhere.
  /{,s}nbin  Programs that can only run in the VT
             (they use the the framebuffer some other
             subsystem that is no accessible from a
             display.)
  /{,s}xbin  Programs that support X
  /{,s}wbin  Programs that support Wayland
  and so on.

> 
> Ted
> 

-------------- 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/20150414/554cbe4c/attachment.sig>


More information about the xdg mailing list