@ssfdust 谢谢patch,不过我没有原样apply,而是参考您的BWRAP_BIND_DIRS
设置了更多的--ro-bind-try
,希望这样能简洁一些
Search Criteria
Package Details: wechat-universal-bwrap 4.0.1.7-1
Package Actions
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 (devome, leaeasy) |
Last Packager: | 7Ji |
Votes: | 107 |
Popularity: | 7.32 |
First Submitted: | 2024-03-14 03:09 (UTC) |
Last Updated: | 2024-12-15 06:49 (UTC) |
Dependencies (19)
- at-spi2-core (at-spi2-core-gitAUR)
- bubblewrap (bubblewrap-gitAUR, bubblewrap-overlayfsAUR, bubblewrap-suid)
- flatpak-xdg-utils
- jackAUR (jack2-gitAUR, pipewire-jack-gitAUR, pipewire-full-jack-gitAUR, jack2, pipewire-jack)
- libpulse (pulseaudio-dummyAUR, libpulse-gitAUR)
- libxcomposite
- libxdamage
- libxkbcommon-x11 (libxkbcommon-x11-gitAUR)
- libxrandr (libxrandr-gitAUR)
- mesa (mesa-minimal-gitAUR, mesa-gitAUR, mesa-wsl2-gitAUR, amdonly-gaming-mesa-gitAUR, mesa-amd-bc250AUR, mesa-amber)
- nss (nss-hgAUR)
- pango (pango-gitAUR)
- xcb-util-image
- xcb-util-keysyms
- xcb-util-renderutil
- xcb-util-wm
- xdg-desktop-portal (xdg-desktop-portal-gitAUR)
- xdg-user-dirs
- patchelf (patchelf-gitAUR) (make)
Required by (0)
Sources (7)
Latest Comments
« First ‹ Previous 1 .. 27 28 29 30 31 32 33 34 35 Next › Last »
7Ji commented on 2024-03-11 06:15 (UTC)
ssfdust commented on 2024-03-11 03:49 (UTC)
建议做如下改动
diff --git a/wechat.sh b/wechat.sh
old mode 100644
new mode 100755
index af3de31..c4744eb
--- a/wechat.sh
+++ b/wechat.sh
@@ -3,6 +3,14 @@
# wechat-beta only support xcb
BWRAP_ENV_APPEND="--setenv QT_QPA_PLATFORM xcb "
WECHAT_HOME_DIR="$(xdg-user-dir DOCUMENTS)/WeChat_Data"
+BWRAP_BINDS="--bind ${WECHAT_HOME_DIR} ${HOME}"
+
+BWRAP_BIND_DIRS=(
+ "${HOME}/.fontconfig"
+ "${HOME}/.fonts"
+ "${HOME}/.config/fontconfig"
+ "${HOME}/.local/share/fonts"
+)
if [ -z ${QT_IM_MODULE} ]; then
BWRAP_ENV_APPEND="${BWRAP_ENV_APPEND} --setenv QT_IM_MODULE fcitx"
@@ -26,10 +34,15 @@ if [ ! -d "${WECHAT_HOME_DIR}" ]; then
mkdir -p ${WECHAT_HOME_DIR}
fi
+for dir in "${BWRAP_BIND_DIRS[@]}"; do
+ if [ -d "${dir}" ]; then
+ BWRAP_BINDS="${BWRAP_BINDS} --bind ${dir} ${dir}"
+ fi
+done
+
exec bwrap \
--dev-bind / / \
- --bind "${WECHAT_HOME_DIR}" "${HOME}" \
- --ro-bind-try "{$HOME}/.fontconfig" "${HOME}/.fontconfig" \
+ ${BWRAP_BINDS} \
--ro-bind /usr/share/wechat-uos/var/ /var/ \
--ro-bind /usr/share/wechat-uos/etc/os-release /etc/os-release \
--ro-bind /usr/share/wechat-uos/etc/lsb-release /etc/lsb-release \
moetayuko commented on 2024-03-11 03:09 (UTC)
更新至 1.0.0.145-13 后启动报错:
bwrap: Can't find source path /home/xxx/.fontconfig: No such file or directory
首先同 @wszqkzqk 的建议,应该改成 bind-try
。其次根据 https://wiki.archlinux.org/title/Font_configuration#Fontconfig_configuration,$HOME/.fontconfig 已经被 deprecated,可以按照如下形式进行回落:
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config}
[ -d $XDG_CONFIG_HOME ] && FONTCONFIG_DIR="$XDG_CONFIG_HOME/fontconfig" || FONTCONFIG_DIR=$HOME/.fontconfig
wszqkzqk commented on 2024-03-11 01:47 (UTC) (edited on 2024-03-11 01:56 (UTC) by wszqkzqk)
建议不要强制bind吧,还需要考虑文件不存在的情况:
bwrap: Can't find source path /home/wszqkzqk/.fontconfig: No such file or directory
字体这些就建议改成bind-try
吧。
auryouth commented on 2024-03-10 18:04 (UTC)
kde6 wayland右键退出菜单不在tray上,而在屏幕中间某个位置是bug吗?
leaeasy commented on 2024-03-10 16:42 (UTC)
@MoetaYuko 这个家目录绑定主要是限制wechat在用户目录随意创建文件问题,如果不介意的话可以直接把${HOME}/Documents/WeChat_Data这个bind移除 QT_SCALE_FACTOR没有特别的理由,主要在kde6+wayland环境下wechat不能够正常处理界面缩放,具体原因还不是很清楚
ywxt commented on 2024-03-10 16:20 (UTC)
建议优先使用 QT_AUTO_SCREEN_SCALE_FACTOR=1
来启用缩放
另,使用 --ro-bind-try "${XDG_CONFIG_HOME}"/fontconfig "${XDG_CONFIG_HOME}"/fontconfig
来支持用户字体
<deleted-account> commented on 2024-03-10 16:04 (UTC)
无法截图是差了某个包吗,截图一片白
moetayuko commented on 2024-03-10 15:48 (UTC) (edited on 2024-03-10 16:02 (UTC) by moetayuko)
希望把 ${HOME}/Documents/WeChat_Data
替换为 $(xdg-user-dir DOCUMENTS)
以符合 XDG 规范
此外不知道默认设置 QT_SCALE_FACTOR
为 1.5 的理由是什么?我这里系统本身的缩放设置是正常的,加上这个就大了
Pinned Comments
7Ji commented on 2024-03-14 06:21 (UTC) (edited on 2024-12-08 08:59 (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
,同理为绝对路径或相对于~
的相对路径