When using libreoffice inside unshare -m
session, the menubar is missing.
In the console output I see these warnings:
** (soffice:9193): CRITICAL **: 10:29:29.171:
void g_lo_menu_insert_section(GLOMenu*, gint, const gchar*, GMenuModel*):
assertion 'G_IS_LO_MENU (menu)' failed
(soffice:9193): Gtk-CRITICAL **: 10:29:29.171:
gtk_menu_bar_new_from_model:
assertion 'G_IS_MENU_MODEL (model)' failed
In my normal session, the menubar appears correctly. Also this used to work before I upgraded from 16.04 to 18.04.
The problem is caused by apparmor denying access to DBUS socket.
This can be seen in
dmesg
output:I didn't find out how to fix the actual problem with the apparmor rules, but here is how one can disable the apparmor completely for libreoffice. This has some security risks if you open untrusted files.