[ Technical exchange] 【Wayland通用】修复QQ在Wayland环境下的截图/屏幕共享
Tofloor
poster avatar
mozixun
Moderator
6 hours ago
Author

经过本人测试, 对QQ进行了类似于腾讯会议的LD_PRELOAD注入, 成功修复了QQ在Wayland (Xwayland)下屏幕分享和截图无法使用的问题 (不需要patched Xwayland)

实现原理: 把QQ的截图/录屏请求直接暴力转发xdg-desktop-portal的普通截图请求和pipewire后端的录屏请求

该补丁实现规范, 完全按照xdg-desktop-portal的规范设计, 故只要对应桌面正常支持Wayland各类协议与xdg-desktop-portal的录屏功能即可使用

测试通过平台: 1. deepin v25 (treeland 0.8.17) 2. Debian Testing/Forky (KDE Plasma/Kwin 6.6.5)

最终实现效果:

b201025581e95b68fffc437438e3d12f.jpg

代码实现: https://github.com/LFRon/qq-wayland-screenshare

使用方法:

  1. unset WAYLAND_DISPLAY
  2. export XDG_SESSION_TYPE=x11
  3. LD_PRELOAD这个编译出来的.so补丁

玲珑版的QQ会在下一个版本更新中带上该补丁

致敬 wemeet-screenshare 先驱! https://github.com/xuwd1/wemeet-wayland-screenshare

Reply Favorite View the author
All Replies
avatar
𰻞𰻝面
deepin
6 hours ago
#1

坐等treeland正式镜像发布

Reply View the author
avatar
望不穿这暧昧的眼
deepin
3 minutes ago
#2

like

Reply View the author