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

[BUG] 安装之后无法启动,注册快捷键异常 #12

Closed
ruleeeer opened this issue Mar 9, 2023 · 7 comments
Closed

[BUG] 安装之后无法启动,注册快捷键异常 #12

ruleeeer opened this issue Mar 9, 2023 · 7 comments

Comments

@ruleeeer
Copy link

ruleeeer commented Mar 9, 2023

问题描述
简单描述遇到的问题,必要时附上截图

复现步骤
安装完毕直接启动即可,此时会抛出

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: GlobalShortcut(InvalidAccelerator("Unable to register global shortcut"))', src/shortcut.rs:158:18
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

环境

  • 操作系统: [Linux]
  • 窗口系统: [Wayland]
  • 软件版本: 0.0.8

补充信息

@Pylogmon
Copy link
Member

Pylogmon commented Mar 9, 2023

麻烦贴一下~/.config/cn.pylogmon.pot/config.json文件的内容

@ruleeeer
Copy link
Author

ruleeeer commented Mar 9, 2023

{"shortcut_translate":"CommandOrControl+D","shortcut_persistent":"CommandOrControl+Shift+D","target_language":"zh-cn","interface": "youdao_free"}

@Pylogmon
Copy link
Member

Pylogmon commented Mar 9, 2023

tauri 在wayland下似乎还不支持设置快捷键,见 tauri-apps/global-hotkey#28

@ruleeeer ruleeeer closed this as completed Mar 9, 2023
@Pylogmon
Copy link
Member

Pylogmon commented Mar 9, 2023

加上 RUST_BACKTRACE=1 运行看看具体的报错呢

@ruleeeer
Copy link
Author

ruleeeer commented Mar 9, 2023

image

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: GlobalShortcut(InvalidAccelerator("Unable to register global shortcut"))', src/shortcut.rs:158:18
stack backtrace:
   0:     0x55d09cc9032a - <unknown>
   1:     0x55d09ccb57ae - <unknown>
   2:     0x55d09cc89d05 - <unknown>
   3:     0x55d09cc900f5 - <unknown>
   4:     0x55d09cc918df - <unknown>
   5:     0x55d09cc9161b - <unknown>
   6:     0x55d09cc91fec - <unknown>
   7:     0x55d09cc91d89 - <unknown>
   8:     0x55d09cc907dc - <unknown>
   9:     0x55d09cc91a92 - <unknown>
  10:     0x55d09c706583 - <unknown>
  11:     0x55d09c706a13 - <unknown>
  12:     0x55d09c842e78 - <unknown>
  13:     0x55d09c765d65 - <unknown>
  14:     0x55d09c771be2 - <unknown>
  15:     0x55d09c8b720b - <unknown>
  16:     0x55d09c78e063 - <unknown>
  17:     0x55d09c8117b9 - <unknown>
  18:     0x55d09cc84e1c - <unknown>
  19:     0x55d09c8b8275 - <unknown>
  20:     0x7f24a7f54790 - <unknown>
  21:     0x7f24a7f5484a - __libc_start_main
  22:     0x55d09c706d45 - <unknown>
  23:                0x0 - <unknown>

感觉有用的信息好像不是那么多

@Pylogmon
Copy link
Member

Pylogmon commented Mar 9, 2023

我装了个ubuntu测试了一下,确实是wayland的问题,加参数GDK_BACKEND=x11可以正常启动。

@ruleeeer
Copy link
Author

ruleeeer commented Mar 9, 2023

谢谢,我添加GDK_BACKEND=x11之后启动成功了

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

No branches or pull requests

2 participants