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

Clarification needed #5

Closed
TheSandBoxMKG opened this issue Oct 17, 2020 · 13 comments
Closed

Clarification needed #5

TheSandBoxMKG opened this issue Oct 17, 2020 · 13 comments

Comments

@TheSandBoxMKG
Copy link

TheSandBoxMKG commented Oct 17, 2020

¿Does this work on vanilla GNOME Shell?

Arch Linux

(I ask, because I'm not getting the menu, even with run.sh, the stock bar with the clock and date just stays there)

@gonzaarcr
Copy link
Owner

Yes, in Arch you probably need other packages, I haven’t tested. Make sure you have the extension and have restarted the shell (Alt+F2, r+Enter). If still doesn’t work try installing the following:

What version do you have?

@yochananmarqos
Copy link

I installed the following dependencies:

  • bamf 0.54.2
  • libkeybinder3 0.32-3
  • python-fuzzysearch 0.73-2
  • appmenu-gtk-module 0.75-1
  • libdbusmenu-gtk2 16.04.0-4
  • libdbusmenu-gtk3 16.04.0-4
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'appmenu'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'keybinder'

I then installed python3-keybinder 1.1.2-3:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: cannot import name 'main' from 'keybinder' (/usr/lib/python3.8/site-packages/keybinder/__init__.py)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'appmenu'

@gonzaarcr
Copy link
Owner

gonzaarcr commented Oct 27, 2020

Are you running it with sudo? Don’t use sudo.
Also install libdbusmenu-qt5 and modify the files described in the README.

@yochananmarqos
Copy link

yochananmarqos commented Oct 27, 2020

No, I'm not running it with sudo. I've already modified those files. I'll try it again later with libdbusmenu-qt5.

@gonzaarcr
Copy link
Owner

If you don’t need python3-keybinder for other app you can uninstall it with sudo pip uninstall python3-keybinder. For this app with sudo pacman -S libkeybinder3 I think it’s enogh. If you need it, try install it without sudo because you probably did sudo pip

@yochananmarqos
Copy link

yochananmarqos commented Oct 27, 2020

You're doing a lot of assuming instead of asking questions. I only tried python3-keybinder because of the error complaining it could not find the keybinder module. I neither used sudo nor pip. I'm installing repo and AUR packages. I already have libdbusmenu-qt5 as Telegram requires it.

@gonzaarcr
Copy link
Owner

Well, I got to make a lot of assumptions to try to fix this bugs. So many variants. That keybinder is on a root folder, so it was more a fact that an assumption, but as you say it wasn’t sudo pip but sudo pacman.

Back to the error, those are not modules but the files of this program. Do you have some sort of security related to python imports? Try to go to the folder and execute python3 -c "from appmenu import main; main()" and on another terminal
python3 -c "from keybinder import main; main()".

@yochananmarqos
Copy link

yochananmarqos commented Oct 27, 2020

Do you have some sort of security related to python imports?

These are packages installed to the system, not in a virtualenv, remember. I've also written my own PKGBUILD to install your extension to the system:

/usr/share/gnome-shell/extensions/fildemGMenu@gonza.com
├── appmenu.py
├── command.py
├── extension.js
├── handlers
│   ├── default.py
│   ├── global_menu.py
│   ├── __init__.py
│   └── rofi.py
├── __init__.py
├── keybinder.py
├── metadata.json
└── utils
    ├── fuzzy.py
    ├── __init__.py
    ├── menu.py
    ├── service.py
    └── window.py

2 directories, 15 files

This is how I'm executing it:

#!/bin/bash

if [ $XDG_SESSION_TYPE = 'x11' ]; then
	export UBUNTU_MENUPROXY=0; python /usr/share/gnome-shell/extensions/fildemGMenu@gonza.com/command.py
else
	export UBUNTU_MENUPROXY=0; export GDK_BACKEND=x11; python /usr/share/gnome-shell/extensions/fildemGMenu@gonza.com/command.py
fi

execute python3 -c ...

And then? No output for either command.

@gonzaarcr
Copy link
Owner

If they give no error, that’s good, it’s working. But you should’ve told me you changed ./run.sh, I discarded one assumption related to the working directory because the output would have been another, but that explains it.

You will have to modify command.py:13 to work on that directory, the easiest (ugliest) solution is to just cd there

def run_command(module, function):
	args = 'cd /usr/share/gnome-shell/extensions/fildemGMenu@gonza.com; python3 -c "from %s import %s as run; run()"'
	args = args % (module, function)

	proc = threading.Thread(target=os.system, args=[args])
	proc.start()

Maybe this one is prettier:

def run_command(module, function):
	args = 'python3 -c "from %s import %s as run; import os; os.chcwd(\'/usr/share/gnome-shell/extensions/fildemGMenu@gonza.com\'); run()"'

That one maybe through some error because the literals. You can also try first on userspace to see if the post-installation instructions work (I already check Arch, but still).

@yochananmarqos
Copy link

The "ugly" bit worked. However, I'm only seeing the menu items in the top bar for Chromium. I have to hover over the top bar to see them, though. The menu itself is offset and the menu items don't match the categories.

After clicking around, here is a few snippets of output:


(-c:2908347): Gtk-WARNING **: 15:27:58.515: no trigger event for menu popup

** (-c:2908347): WARNING **: 15:28:38.787: Failed to fetch xid: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.ayatana.bamf.window” on object at path /org/ayatana/bamf/window/41943045

** (-c:2908347): WARNING **: 15:28:38.788: Failed to fetch type: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.ayatana.bamf.window” on object at path /org/ayatana/bamf/window/41943045

** (-c:2908347): WARNING **: 15:28:38.789: Failed to fetch monitor: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.ayatana.bamf.window” on object at path /org/ayatana/bamf/window/41943045

** (-c:2908347): WARNING **: 15:28:38.790: Failed to fetch maximized state: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.ayatana.bamf.window” on object at path /org/ayatana/bamf/window/41943045

** (-c:2908347): WARNING **: 15:28:38.790: Failed to fetch xid: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.ayatana.bamf.window” on object at path /org/ayatana/bamf/window/41943045

** (-c:2908347): WARNING **: 15:28:38.793: Unable to fetch children: GDBus.Error:org.freedesktop.DBus.Error.UnknownMethod: No such interface “org.ayatana.bamf.view” on object at path /org/ayatana/bamf/application/1376103128

@gonzaarcr
Copy link
Owner

I fixed some stuff on #7 related to Arch, maybe you need to update. The hover behaviour is default, but I’m starting to see that people don’t like it, maybe I change it (I added a variable on extension.js if you want to change it, FORCE_SHOW_MENU).

The first error is normal, the others I have yet to check them...

@Vince-bleu
Copy link

Hi,
I had the same errors, after installing the new version too. But after a reboot it seem they are gone for me. I use manjaro.
The only problem for me is the use of ALT + F for example the menu title don't show but the sub menu is opening, not a big deal and maybe it's just for me.
Also, i love to have the menu hover function, it so perfect with the use of the manjaro layout Unity.
Thanks for your job, i love global menu and Hud.

@gonzaarcr
Copy link
Owner

Last commit should fix the keyboard shortcut issue

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