[snap] fail to launch after logging in to a wayland session then back into an X11 session

Bug #1749484 reported by Olivier Tilloy
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
libreoffice (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

My default session is "Ubuntu" (/usr/share/xsessions/ubuntu.desktop). If I log out, then log in to "Ubuntu on Wayland", then out again and in to "Ubuntu" again (so I'm back to my initial session), the libreoffice snap fails to start:

osomon@bribon:~$ /snap/bin/libreoffice
/snap/libreoffice/49/lib/libreoffice/program/soffice.bin X11 error: Can't open display:
   Set DISPLAY environment variable, use -display option
   or check permissions of your X-Server
   (See "man X" resp. "man xhost" for details)

osomon@bribon:~$ env | grep DISPLAY
DISPLAY=:0

Rebooting my machine "fixes" the issue.

Tags: snap
Revision history for this message
Olivier Tilloy (osomon) wrote :

This is not specific to libreoffice. The gnome-calculator snap exhibits the same issue:

(gnome-calculator:7802): Gtk-WARNING **: cannot open display: :0

description: updated
Revision history for this message
Olivier Tilloy (osomon) wrote :

After logging into to wayland and then back into X11, a wayland socket is lingering:

$ ls -l /run/user/`id -u`/wayland*
srwxrwxr-x 1 osomon osomon 0 févr. 14 16:54 /run/user/1000/wayland-0
-rw-rw---- 1 osomon osomon 0 févr. 14 16:54 /run/user/1000/wayland-0.lock

Removing those two files "fixes" the issue.

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

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

Changed in libreoffice (Ubuntu):
status: New → Confirmed
Revision history for this message
Ken VanDine (ken-vandine) wrote :

I have reproduced this issue on 17.10. After logging out of a wayland session, the socket is left behind.

Revision history for this message
Vadym K (hmvs) wrote :

Same for 18.04

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

Other bug subscribers

Remote bug watches

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