kamui-fin / gazou

Japanese and Chinese OCR for Linux & Windows
GNU General Public License v3.0
87 stars 13 forks source link

Hotkey registration fails on X11 #11

Closed Igetin closed 2 years ago

Igetin commented 2 years ago

Description

I’ve compiled the application as per the installation instructions. When started through the terminal, the following output is printed:

QHotkey: "Failed to register Alt+A. Error: BadAccess (attempt to access private resource denied)"
QHotkey: "Failed to register Alt+D. Error: BadAccess (attempt to access private resource denied)"
QHotkey: "Failed to register Alt+S. Error: BadAccess (attempt to access private resource denied)"
QHotkey: "Failed to register Alt+D. Error: BadAccess (attempt to access private resource denied)"
QHotkey: "Failed to register Alt+S. Error: BadAccess (attempt to access private resource denied)"
QHotkey: "Failed to register Alt+A. Error: BadAccess (attempt to access private resource denied)"

System information

kamui-fin commented 2 years ago

This is due to the fact that hotkeys such as Alt+A and Alt+S are already used up by another process or you are running it as root. Could you try changing the shortcuts and see if the issue still persists?

Igetin commented 2 years ago

I suppose I forgot an important detail, which I thought was caused by the hotkey binding failing, but possibly a different issue altogether: I don’t see any GUI at all when I launch the program, whether I open it via a terminal or the GNOME application launcher. It’s definitely running since I see it in the process list, but there’s no window to be seen, nor do I see anything in the top bar. How do I get the GUI to open?

Also, I’m not sure what’s occupying those shortcuts, since I checked through the global keyboard shortcuts in GNOME settings, and none of those combinations were defined there (also, nothing happens when I press the combinations, apart from Chrome which does have the Alt+D mapping perform an action).

Igetin commented 2 years ago

Nevermind, I was being dumb earlier. I had two gazou instances running, which is why I got those warnings on one of them.

The issue of the GUI not appearing as a window or in the top bar tray still exists, but it’s not a dealbreaker for me, since I think I’m going to use this program primarily from scripts. If I had to guess, the GUI issue is probably some incompatibility with how GNOME/Fedora does system tray integrations and how Qt 5 handles them.

(I suppose this issue can be closed, though maybe another one should be made for the GUI issue).