X apps (LibreOffice, Thunderbird) fail to launch with failure to open display (no Xmir is running)

Bug #1668429 reported by kevin gunn
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Alejandro J. Cura
gtk+3.0 (Ubuntu)
Invalid
Undecided
Unassigned
libertine (Ubuntu)
Invalid
High
Unassigned
ubuntu-app-launch (Ubuntu)
Fix Released
Critical
Ted Gould
unity8 (Ubuntu)
Invalid
Critical
Unassigned
xorg-server (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Feb 27 iso build of zesty, clean u8 exploration

repro:
1) open app drawer, find the thunderbird app
2) click on icon to launch
3) window closes immediately

not a very useful journal log
http://pastebin.ubuntu.com/24080860/

Related branches

kevin gunn (kgunn72)
tags: added: gtk-mir xmir
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gtk+3.0 (Ubuntu):
status: New → Confirmed
Changed in xorg-server (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Incomplete for Xmir. Running it manually from ssh launches successfully:

mirrun Xmir :1 -rootless --desktop_file_hint=unity8 & sleep 2 ; env DISPLAY=:1 thunderbird

So it sounds like U8 or Libertine isn't launching it correctly.

Changed in gtk+3.0 (Ubuntu):
status: Confirmed → Invalid
Changed in xorg-server (Ubuntu):
status: Confirmed → Incomplete
Changed in libertine (Ubuntu):
status: New → Confirmed
Changed in unity8 (Ubuntu):
status: New → Confirmed
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Oh, the reason is in your log:

Feb 27 16:40:07 kg-Studio-1737 thunderbird[7543]: Error: cannot open display: :0

That means U8/Libertine failed to launch Xmir (or wait for Xmir) prior to running thunderbird.

Changed in libertine (Ubuntu):
importance: Undecided → High
Changed in unity8 (Ubuntu):
importance: Undecided → High
Changed in xorg-server (Ubuntu):
status: Incomplete → Invalid
Changed in canonical-devices-system-image:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Strange that starting Xmir in advance of launching Thunderbird from the drawer doesn't help. This suggests Thunderbird might be having trouble finding or accessing (apparmor?) the X socket.

tags: removed: gtk-mir xmir
summary: - thunderbird fails to launch, zesty u8
+ X apps fail to launch with failure to open display (no Xmir running or
+ no access to it)
Revision history for this message
Stephen M. Webb (bregma) wrote : Re: X apps fail to launch with failure to open display (no Xmir running or no access to it)

The log shows Firefox is being run natively under Unity 8 (no Xmir). Firefox is known to not be built natively for Mir, so it's not a surprise that it it not start.

Assuming that an Xmir instance should be launched just in case for any and all applications run under Unity 8 was purposefully disabled to prevent unwanted empty black windows from covering the screen.

Revision history for this message
kevin gunn (kgunn72) wrote :

fwiw, this isn't a libertine app - this is just the preinstalled FF that's already part of the image.

Revision history for this message
kevin gunn (kgunn72) wrote :

also, the bug for LO calc is slightly different ( bug 1668425 ) even tho it was marked as a duplicate. I just want to call it out here separately since it doesn't just close the window like the other apps.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Libreoffice is a bit different yes, because of its splash screen. But your log in bug 1668425 confirms it's exactly the same problem as this one.

summary: - X apps fail to launch with failure to open display (no Xmir running or
- no access to it)
+ X apps (LibreOffice, Firefox) fail to launch with failure to open
+ display (no Xmir is running or no access to it)
summary: X apps (LibreOffice, Firefox) fail to launch with failure to open
- display (no Xmir is running or no access to it)
+ display (no Xmir is running)
Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: X apps (LibreOffice, Firefox) fail to launch with failure to open display (no Xmir is running)

The solution it seems is for Unity8 to have an Xmir -rootless started and ready at login to support legacy X apps (that are not pure GTK). Only problem with that is that you will then hit bug 1577641.

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sorry, Firefox has its own issues -> bug 1668409

summary: - X apps (LibreOffice, Firefox) fail to launch with failure to open
- display (no Xmir is running)
+ X apps (LibreOffice, Firefox, Thunderbird) fail to launch with failure
+ to open display (no Xmir is running)
summary: - X apps (LibreOffice, Firefox, Thunderbird) fail to launch with failure
- to open display (no Xmir is running)
+ X apps (LibreOffice, Thunderbird) fail to launch with failure to open
+ display (no Xmir is running)
Changed in libertine (Ubuntu):
status: Confirmed → Invalid
kevin gunn (kgunn72)
tags: added: unity8-desktop
kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
importance: High → Critical
Changed in unity8 (Ubuntu):
importance: High → Critical
Changed in ubuntu-app-launch (Ubuntu):
importance: Undecided → Critical
status: New → Confirmed
assignee: nobody → Ted Gould (ted)
Changed in unity8 (Ubuntu):
status: Confirmed → Invalid
Changed in canonical-devices-system-image:
assignee: nobody → Alejandro J. Cura (alecu)
kevin gunn (kgunn72)
Changed in canonical-devices-system-image:
milestone: none → u8c-1
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

If we could get a fix for bug 1577641 then this would be easy to solve (in the most efficient way): Just start an 'Xmir -rootless ...' at login.

That way you don't need custom launcher magic for every X app to start an X server.

Changed in unity8 (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Michał Sawicz (saviq) wrote :

Nope, shared Xmir not a solution, we need each client to connect in a separate session, to securely identify it. And there's security considerations for that as well.

Not to mention gtk, for example, just probes available display servers and uses the first one that works, which could very well result in them running under X, when they should run natively.

Changed in unity8 (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

In that case we'll actually have one Xmir process per app (which is probably OK for resources).

That's more elegant, and more secure, than trying to hack Xmir to emit multiple connections to the Mir server. And it works right now without modifying code.

Also, it appears you can uniquely identify an Xmir instance to the shell already using 'Xmir -mir <appid>'.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-app-launch - 0.10+17.04.20170307.1-0ubuntu1

---------------
ubuntu-app-launch (0.10+17.04.20170307.1-0ubuntu1) zesty; urgency=medium

  * XMir by default for Legacy apps (LP: #1668429)

 -- Ted Gould <email address hidden> Tue, 07 Mar 2017 19:07:32 +0000

Changed in ubuntu-app-launch (Ubuntu):
status: Confirmed → Fix Released
Changed in canonical-devices-system-image:
status: Confirmed → Fix Released
Revision history for this message
Daniel d'Andrada (dandrader) wrote :

With that "fix", now qt5 are unusable as they go under XMir.

Revision history for this message
Daniel d'Andrada (dandrader) wrote :

*qt5 apps I mean

Revision history for this message
kevin gunn (kgunn72) wrote :

the issue with Qt5 will be covered under bug 1670751

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.