Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Unable to access dbusmenu items." #45

Open
freder opened this issue Mar 31, 2020 · 5 comments
Open

"Unable to access dbusmenu items." #45

freder opened this issue Mar 31, 2020 · 5 comments

Comments

@freder
Copy link

freder commented Mar 31, 2020

hi,

so I wanted to give mate-hud a try, but I can't seem to get it to work:

$ /usr/lib/mate-hud/mate-hud 
Gtk-Message: 15:58:05.384: Failed to load module "appmenu-gtk-module"
INFO:root:Press Alt_R to handle keybinding
INFO:root:Unable to access dbusmenu items.
INFO:root:Unable to access dbusmenu items.
INFO:root:Unable to access dbusmenu items.
INFO:root:Unable to access dbusmenu items.

is all I'm getting.

I'm on mint linux, using cinnamon, so I wasn't sure if it's because mate-hud only works with mate or not.

@VentGrey
Copy link

Same with mate-hud packaged for Debian 11. I don't know if there is a package missing from the dependencies (might be) or if there is a permission / applet issue.

@vkareh
Copy link
Member

vkareh commented Jul 30, 2021

Have you added the following to ~/.profile?

if [ -n "$GTK_MODULES" ]; then
    GTK_MODULES="$GTK_MODULES:unity-gtk-module"
else
    GTK_MODULES="unity-gtk-module"
fi

export GTK_MODULES
export UBUNTU_MENUPROXY=1

This, along with whatever appmenu, dbusmenus, unity-gtk* packages installed in your distro should be sufficient to get mate-hud working (I'm doing this currently in Fedora 34 and it works just fine)

@VentGrey
Copy link

I'll try adding those to ~/.profile and report back, however there is no unity-gtk-* packages on Debian, only the gir objects and some common libraries, scopes and tools.

@VentGrey
Copy link

Update: tried with both snippet and without the snippet but GTK applications show duplicated menus and the HUD is nowhere to be found.

In both cases I get this error message:

bus.exceptions.DBusException: org.freedesktop.DBus.Error.Failed: error occurred in AboutToShow
Traceback (most recent call last):
  File "/usr/lib/mate-hud/mate-hud", line 472, in hud
    appmenu_success = try_appmenu_interface(int(window_id, 16))
  File "/usr/lib/mate-hud/mate-hud", line 301, in try_appmenu_interface
    expanse_all_menu_with_dbus(dbusmenu_root_item[1], True, "")
  File "/usr/lib/mate-hud/mate-hud", line 279, in expanse_all_menu_with_dbus
    dbusmenu_object_iface.AboutToShow(item_id)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__
    return self._connection.call_blocking(self._named_service,
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking
    reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Failed: error occurred in AboutToShow

@balazs-endresz
Copy link

I also get this on Ubuntu MATE 22.04. And more annoyingly the menu bar becomes hidden for a second. I think the following ticket describes the same issue: https://gitlab.com/vala-panel-project/vala-panel-appmenu/-/issues/196

If I do dbus-send --session --type=method_call --dest=com.canonical.AppMenu.Registrar /com/canonical/AppMenu/Registrar org.freedesktop.DBus.ObjectManager.GetManagedObjects that also hides menu bars but for a few seconds longer.

Simply not calling try_appmenu_interface in /usr/lib/mate-hud/mate-hud fixes it and everything still seems to work so far.

The last error mentioning AboutToShow will be the same as #54. Adding a try/except/return around that line helps avoid triggering the error reports at least.

After modifying the code it can be restarted by re-enabling it in mate-tweak. This is just a workaround of course, I don't know what either of these are supposed to do exactly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants