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

kbd-layout-viewer5 核心转储 #1122

Open
knm100 opened this issue Aug 14, 2024 · 10 comments
Open

kbd-layout-viewer5 核心转储 #1122

knm100 opened this issue Aug 14, 2024 · 10 comments

Comments

@knm100
Copy link

knm100 commented Aug 14, 2024

Summary

在终端运行kbd-layout-viewer5
[knm@archlinux ~]$ kbd-layout-viewer5
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: From 6.5.0, xcb-cursor0 or libxcb-cursor0 is needed to load the Qt xcb platform plugin.
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vkkhrdisplay, vnc, xcb, wayland-egl, wayland.

已中止(核心已转储)

Steps to Reproduce

直接在终端运行kbd-layout-viewer5
环境,Arch Linux+LXQT(wayland Session)+labwc(只有wayland,没有xwayland), 只有QT6,没有QT5安装。

Expected Behavior

正常工作

Output of fcitx5-diagnose command

这个问题应该不需要此项

@wengxt
Copy link
Member

wengxt commented Aug 14, 2024

@knm100 它现在就是需要xwayland

@knm100
Copy link
Author

knm100 commented Aug 14, 2024

还需要xwayland! 那只有等完全迁移到wayland上了。 在虚拟机里,labwc的 xwayland不大好使。

@aisuneko
Copy link

@knm100 I'm working on a pure wayland/libxkbcommon port of kbd-layout-viewer; will upload more progress later

@knm100
Copy link
Author

knm100 commented Aug 14, 2024

Thanks, waiting for your update

@wengxt
Copy link
Member

wengxt commented Aug 14, 2024

@aisuneko the issue is the geometry parsing and there's no solution to that. However, I think a reasonable workaround is to hardcode the geometry to pc105 in current xkb data. Thus, the rest can be handled by xkb common.

@aisuneko
Copy link

@wengxt I think it could be solved by manually looking through the xkb geometry files present on the user's machine (eg. in /usr/share/X11/xkb/geometry) for the one which matches the current keymap, and then just parse it ourselves, though it might require extensive work as the geometry file format is very complex. The remaining issue should be how to convert libxkbcommon's RMLVO interface to a KcCGST struct used in the original xkb, since I would like to reuse kbd-layout-viewer's existing code as much as possible

@aisuneko
Copy link

feel free to track my progress here; also it's based on fcitx/fcitx5-configtool#79

@knm100
Copy link
Author

knm100 commented Sep 12, 2024

@aisuneko Will a PR be submitted?

@aisuneko
Copy link

@aisuneko Will a PR be submitted?

I'm sorry that I haven't made much progress besides laying out some groundwork for that. The xkbgeometry format is just too complex and I'm still thinking of a way to complete the task without dealing with it too much... Also I'm busy at the moment but may continue working on it if I have time to spare.

@aisuneko
Copy link

aisuneko commented Oct 21, 2024

@wengxt I'm thinking of alternative approaches to this problem since porting the xkbgeometry parsing part to wayland is way too complex than I expected. Is it acceptable to deprecate kbd-layout-viewer5 entirely under wayland (e.g. by showing a popup to notify the user of the incompatibility before exiting immediately)? Or is there a way to statically hardcode and draw a pc105 keymap as you suggested? xkbcommon does not support geometry from the ground up, so we have to write one from scratch if we are to implement parsing from keymap files.

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

3 participants