This is not specific to libreoffice. The gnome-calculator snap exhibits
the same issue:
(gnome-calculator:7802): Gtk-WARNING **: cannot open display: :0
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to libreoffice in Ubuntu.
[snap] fail to launch after logging in to a wayland session then back
into an X11 session
Status in libreoffice package in Ubuntu:
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:
/snap/libreoffice/49/lib/libreoffice/program/soffice.bin X11 error: Can't
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
Rebooting my machine "fixes" the issue.
To manage notifications about this bug go to:
Mailing list: https://launchpad.net/~desktop-packages
Post to : firstname.lastname@example.org
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp