LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Xfce's Appmenu plugin doesn't show menus of any window. (https://www.linuxquestions.org/questions/linux-software-2/xfces-appmenu-plugin-doesnt-show-menus-of-any-window-4175647766/)

david von tamar 02-06-2019 08:43 PM

Xfce's Appmenu plugin doesn't show menus of any window.
 
I'm having a problem with XFCE's Appmenu plugin for its panels. Appmenu is basically a Macintosh-like global menu for all GTK/QT-based GUI programs that are running on your desktop.

Here's my current setup situation:
  • Debian 10 NetInst "Testing", with "Stable" repositories included (i.e. both Buster & Stretch packages are available in my apt).
  • i3wm, my X Window Manager.
  • Xfce4's "panels" and their related dependencies.
  • GTK3's and GTK2's configurations are all set with ".xsettingsd" and ".Xresources".
  • There's no DE. Most of my apps are curses-based (like MC & Aptitude). But I have a few GUIs like Firefox, Quodlibet, Textadept and Transmission-gtk.

The actual problem with Appmenu is that it won't show the actual menubars of any GTK2 or GTK3-based GUI program that has a menubar.

Textadept for example, has stopped rendering the menubar in its own window after installing Appmenu, but Appmenu itself (within my sole Xfce panel at the top) keeps showing me just the generic "desktop" menu and doesn't switch to the menus of the actual windows that I'm focusing on.

Another weird problem with Appmenu, is that it takes like 10 seconds for this thing to start working, why does it take so long? This is a high end Thinkpad with Intel Core i7 and my CPU doesn't show any overhead either, it's just idle for the first 10 seconds after startx-ing for no particular reason.

Here's my .xsettingsd:
Code:

Xft/Hinting 1
Xft/RGBA "rgb"
Xft/HintStyle "hintslight"
Xft/Antialias 1
Gtk/MenuBarAccel "F10"
Gtk/FontName "Monospace 12"
Gtk/ShellShowsMenubar 1
Gtk/ShellShowsAppmenu 1

Another closely related question: What is the difference between the Topmenu plugin and the Appmenu plugin? Why are they two separate plugins for Xfce and why do they share dependencies? I've installed and tried both of them, the Topmenu plugin doesn't work either.

UPDATE:
I've tested Appmenu right now with "Vala-panel", which appears to be the original project where Appmenu came from and later ported to support Xfce4's panels as well. Unfortunately I encounter the same exact behavior with Vala-panel's Appmenu plugin as with Xfce4's panels. Therefore this issue is not related to Xfce4 or its panels.

UPDATE 2:
Here's the terminal output from vala-panel, it reports a few critical errors I'm trying to analyze right now.
Code:

** (vala-panel:5673): WARNING **: 05:43:26.956: Unable to get org.ayatana.bamf matcher: Error calling StartServiceByName for org.ayatana.bamf: Timeout was reached

(vala-panel:5673): GLib-GIO-CRITICAL **: 05:43:26.956: g_dbus_proxy_set_default_timeout: assertion 'G_IS_DBUS_PROXY (proxy)' failed

(vala-panel:5673): GLib-GObject-WARNING **: 05:43:26.956: invalid (NULL) pointer instance

(vala-panel:5673): GLib-GObject-CRITICAL **: 05:43:26.956: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(vala-panel:5673): GLib-GObject-WARNING **: 05:43:26.956: invalid (NULL) pointer instance

(vala-panel:5673): GLib-GObject-CRITICAL **: 05:43:26.956: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(vala-panel:5673): GLib-GObject-WARNING **: 05:43:26.956: invalid (NULL) pointer instance

(vala-panel:5673): GLib-GObject-CRITICAL **: 05:43:26.956: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(vala-panel:5673): GLib-GObject-WARNING **: 05:43:26.956: invalid (NULL) pointer instance

(vala-panel:5673): GLib-GObject-CRITICAL **: 05:43:26.956: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(vala-panel:5673): GLib-GObject-WARNING **: 05:43:26.956: invalid (NULL) pointer instance

(vala-panel:5673): GLib-GObject-CRITICAL **: 05:43:26.956: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(vala-panel:5673): GLib-GObject-WARNING **: 05:43:26.956: invalid (NULL) pointer instance

(vala-panel:5673): GLib-GObject-CRITICAL **: 05:43:26.956: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed

(vala-panel:5673): GLib-GIO-CRITICAL **: 05:43:26.956: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

** (vala-panel:5673): WARNING **: 05:43:26.956: Failed to fetch windows paths:

(vala-panel:5673): GLib-CRITICAL **: 05:43:26.956: g_error_free: assertion 'error != NULL' failed

(vala-panel:5673): GLib-GIO-CRITICAL **: 05:43:26.956: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

** (vala-panel:5673): WARNING **: 05:43:26.956: Failed to get running applications:

(vala-panel:5673): GLib-CRITICAL **: 05:43:26.956: g_error_free: assertion 'error != NULL' failed

(vala-panel:5673): GLib-GIO-CRITICAL **: 05:43:26.956: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

** (vala-panel:5673): WARNING **: 05:43:26.956: Failed to get active window:

(vala-panel:5673): GLib-CRITICAL **: 05:43:26.956: g_error_free: assertion 'error != NULL' failed

(vala-panel:5673): GLib-GIO-CRITICAL **: 05:43:26.956: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

** (vala-panel:5673): WARNING **: 05:43:26.956: Failed to get active window:

(vala-panel:5673): GLib-CRITICAL **: 05:43:26.956: g_error_free: assertion 'error != NULL' failed

(vala-panel:5673): GLib-GIO-CRITICAL **: 05:43:26.998: g_dbus_proxy_call_sync_internal: assertion 'G_IS_DBUS_PROXY (proxy)' failed

** (vala-panel:5673): WARNING **: 05:43:26.999: Failed to get active window:

(vala-panel:5673): GLib-CRITICAL **: 05:43:26.999: g_error_free: assertion 'error != NULL' failed


david von tamar 02-08-2019 12:49 PM

SOLVED!
The problem I came with in this thread was that d-bus failed to start properly a session service called "org.ayatana.bamf.service".

The reason it was happening with my setup is because of a confusion and misconfiguration between "~\.xsessionrc", "~\.xinitrc" and "~\.xsession". I learned about this in the Debian Wiki yesterday and then moved everything from both .xsessionrc and .xinitrc into .xsession and deleted both of them to force startx to execute the only .xsession file as a resort.

Following this change, d-bus started to launch the session service of bamfdaemon properly, which is crucial for AppMenu in order to communicate with the windows themselves.

You can also launch bamfdaemon manually, and it'll work in this case as well.

Note that I also attempted to use LightDM in the process to solve the xsession/dbus problem I had, but it turned out to be counterproductive because LightDM overrides some xsettings and thus prevents AppMenu from functioning properly despite launching bamfdaemon successfully.

You can find more details about it in the issue that I opened at AppMenu's GitLab repository today:
https://gitlab.com/vala-panel-projec...enu/issues/283

hydrurga 02-08-2019 12:53 PM

Ah, a self-solving thread. My favourite kind. :)

Many thanks for coming back on to post your solution David.


All times are GMT -5. The time now is 10:47 PM.