Package Details: wechat-universal-bwrap 4.0.1.11-1

Git Clone URL: https://aur.archlinux.org/wechat-universal-bwrap.git (read-only, click to copy)
Package Base: wechat-universal-bwrap
Description: WeChat (Universal) with bwrap sandbox
Upstream URL: https://linux.weixin.qq.com/
Licenses: GPLv3, proprietary
Conflicts: wechat-universal
Provides: wechat-universal
Replaces: wechat-beta, wechat-beta-bwrap
Submitter: 7Ji
Maintainer: 7Ji (leaeasy)
Last Packager: 7Ji
Votes: 129
Popularity: 4.18
First Submitted: 2024-03-14 03:09 (UTC)
Last Updated: 2024-12-24 07:50 (UTC)

Pinned Comments

shilka commented on 2025-02-13 11:08 (UTC)

@dazuixia @lyhokia @swimming03 你们是否也使用了非GNOME/KDE的其他wayland WM/DE? 又研究了一下这个问题,如果不使用bwrap沙盒直接执行wechat是可以的,排除了wechat本身的问题。我认为问题出在bwrap、xwayland的配合和调用上面,导致微信无法在xwayland中启动。我使用的WM是Hyprland,推测可能和各个WM/DE有一定的关系。目前我找到一个可行的缓解方式,安装:xwayland-satellite,并提前执行这一程序,之后正常启动wechat-universal。

@7Ji 如果其他人也可以缓解,烦请置顶一下这个解决方案,或者如果您很熟悉bwrap,是否可以看看通过某些参数解决它和xwayland的交互问题。

7Ji commented on 2024-03-14 06:21 (UTC) (edited on 2024-12-26 09:08 (UTC) by 7Ji)

本软件包在Github上亦有仓库: https://github.com/7Ji-PKGBUILDs/wechat-universal-bwrap/ (仓库未启用issues,有问题请直接在此页面提出)

各位如有改进意见,欢迎在Github仓库页提交PR :)

抓取新版本的脚本和PKGBUILD在同一层。执行python fetch_uos_wechat_release.py获取UOS仓库内的重打包版本,执行./fetch_tencent_wechat_release.sh获取腾讯官方的版本。如果发现软件过期,请善用本界面的标记过期功能。:)


默认配置下,只有~/Documents/WeChat_Data/home 作为容器内的~,其他宿主文件和文件夹均不暴露在容器内

可以编写~/.config/wechat-universal/binds.list来设置更多的被暴露到容器内的文件/文件夹,每行一个路径,绝对路径或相对于~的相对路径


要将微信文件的主要路径修改至 ~/Documents/WeChat_Data 外的其他路径,请设置环境变量 WECHAT_DATA_DIR,同理为绝对路径或相对于~的相对路径


更多参数与环境变量,请在命令行输入 wechat-universal --help 查看

Latest Comments

« First ‹ Previous 1 .. 26 27 28 29 30 31 32 33 34 35 36 .. 39 Next › Last »

XDwanj commented on 2024-03-13 07:56 (UTC) (edited on 2024-03-13 08:20 (UTC) by XDwanj)

@7Ji

我是 Manjaro + Gnome v45.4 用的是 nautilus 文件管理器

在未添加脚本时 + 已安装 flatpak-xdg-utils,都会在容器内打开

当添加脚本 + 已安装 flatpak-xdg-utils,此时即便删除 /home/xxx/Documents/WeChat_Data/home 文件夹,文件也能正常打开。

我觉得可以考虑直接对 flatpak-xdg-utils 包强关联,然后设置 dde-file-manager 脚本。XD

在沙盒内调用 xdg-utils/xdg-open 并不方便,许多软件都没法正常工作,例如 wps 等。

我不太清楚在以下步骤后

  1. 安装 flatpak-xdg-utils
  2. 设置 dde-file-manager 脚本
  3. 去除沙盒内的 home 嵌套

在 KDE 等环境下是否还能正常工作,但在 Gnome 环境下工作的很好,我希望 KDE 环境下也能一样好


/usr/bin/dde-file-manager

#!/bin/bash

if [[ $@ =~ '--show-item' ]]; then
  file=$(echo "$@" | cut -c 13-)
  xdg-open $(dirname "${file}")
else
  xdg-open $@
fi

inxi -Fxzc0

System:
  Kernel: 6.7.7-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
  Desktop: GNOME v: 45.4 Distro: Manjaro base: Arch Linux

7Ji commented on 2024-03-13 07:52 (UTC)

@XDwanj 经你提醒,检测了会被遍历的不同文件浏览器,发现KDE下,dolphin文件浏览器 (KDE)可以正常在宿主打开,nautilus (Gnome)和dde-file-manager (Deepin)文件浏览器只能在容器内打开。三者遍历顺序是dde-file-manager -> nautilus -> dolphin。仅装成套KDE桌面的用户,可以正常在宿主打开文件。一旦安装nautilusdde-file-manager,就会无法在宿主打开这些文件。请问你的桌面环境和文件管理器安装情况是怎样的?

XDwanj commented on 2024-03-13 07:10 (UTC) (edited on 2024-03-13 07:52 (UTC) by XDwanj)

@7Ji

我查看日志发现,wechat 会寻找 dde-file-manager 程序,我想可以在 /usr/bin 放名为 dde-file-manager 的 sh 脚本。

(该脚本来自 aur/wechat-uos-bwrap 包)

/usr/bin/dde-file-manager

#!/bin/bash

if [[ $@ =~ '--show-item' ]]; then
  file=$(echo "$@" | cut -c 13-)
  xdg-open $(dirname "${file}")
else
  xdg-open $@
fi

这么做后,文件可以正常打开了

7Ji commented on 2024-03-13 05:59 (UTC)

@wszqkzqk 现在KDE的缩放管理放在~/.config/kwinoutputconfig.json, 每个屏一个object且各自可以有不同的scale值,可以引入jq依赖来提取这个值,但我暂时还没做

wszqkzqk commented on 2024-03-13 05:27 (UTC)

话说有没有人知道现在KDE开箱即用的缩放机制是怎么读取的。

kreadconfig6 --group KScreen --key ScaleFactor

这个命令只适用于手动设置(写入到~/.config/kdeglobals)的缩放,目前的KDE Wayland自动识别了我的电脑缩放是150%,但是~/.config/kdeglobals里面并没有。

urugang commented on 2024-03-13 05:22 (UTC) (edited on 2024-03-13 05:26 (UTC) by urugang)

如果出现


Authorization required, but no authorization protocol specified

qt.qpa.xcb: could not connect to display :0
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: xcb.

可以在启动脚本里面加

xhost +

或者加

  --ro-bind-try "${XAUTHORITY}"{,}

tixwho commented on 2024-03-13 05:13 (UTC)

@7Ji 跑通了,多谢!

7Ji commented on 2024-03-13 04:27 (UTC)

@tixwho 已经增加对kde5的支持,但是我无法测试

tixwho commented on 2024-03-13 03:36 (UTC) (edited on 2024-03-13 03:51 (UTC) by tixwho)

麻烦更新一下对kreadconfig5的兼容性, manjaro用户应该还没那么快升大版本...

/usr/bin/wechat-beta: line 15: kreadconfig6: command not found
bwrap: execvp GTK_USE_PORTAL: No such file or directory

手动更改kreadconfig6为kreadconfig5后可以启动...加个判断?

libook commented on 2024-03-13 02:58 (UTC)

@chenxi 你可以把代码clone下来,然后切到714c86f40e8cd5665ccf827379005f4a53437143这个提交手动makepkg,这个版本fcitx 5 + gnome + wayland是正常的,后续新版本就无法使用输入法了。