1 From a613da6dbc79573ee33afaf3c11af30613577286 Mon Sep 17 00:00:00 2001
2 From: unlsycn <unlsycn@unlsycn.com>
3 Date: Fri, 30 Aug 2024 20:19:18 +0800
4 Subject: [PATCH] ajust launcher fs layout
7 wechat-universal.sh | 23 +++++++++++++----------
8 1 file changed, 13 insertions(+), 10 deletions(-)
10 diff --git a/wechat-universal.sh b/wechat-universal.sh
11 index 7538a6b..cceb337 100644
12 --- a/wechat-universal.sh
13 +++ b/wechat-universal.sh
14 @@ -161,11 +161,11 @@ try_start() {
18 - --symlink usr/lib /lib
19 - --symlink usr/lib /lib64
20 - --symlink usr/bin /bin
21 - --symlink usr/bin /sbin
22 - --bind /usr/bin/{true,lsblk}
27 + --ro-bind /usr/bin/{true,lsblk}
30 --ro-bind /{usr/lib/flatpak-xdg-utils,sandbox}/xdg-open
31 @@ -180,12 +180,15 @@ try_start() {
35 - --ro-bind /etc/machine-id{,}
36 + --ro-bind-try /etc/machine-id{,}
37 --ro-bind /etc/passwd{,}
38 --ro-bind /etc/nsswitch.conf{,}
39 --ro-bind /etc/resolv.conf{,}
40 --ro-bind /etc/localtime{,}
41 --ro-bind-try /etc/fonts{,}
42 + --ro-bind /etc/ld.so.cache{,}
43 + --ro-bind /etc/ld.so.conf{,}
44 + --ro-bind-try /etc/ld.so.conf.d{,}
47 --dir /sys/dev # hack for Intel / AMD graphics, mesa calling virtual nodes needs /sys/dev being 0755
48 @@ -215,11 +218,11 @@ try_start() {
49 --ro-bind-try "${HOME}/.local/share/icons"{,}
52 - --dev-bind /run/dbus{,}
53 - --ro-bind /run/systemd/userdb{,}
54 + --dev-bind-try /run/dbus{,}
55 + --ro-bind-try /run/systemd/userdb{,}
56 --ro-bind-try "${XAUTHORITY}"{,}
57 - --ro-bind "${DBUS_SESSION_BUS_PATH}"{,}
58 - --ro-bind "${XDG_RUNTIME_DIR}/pulse"{,}
59 + --ro-bind-try "${DBUS_SESSION_BUS_PATH}"{,}
60 + --ro-bind-try "${XDG_RUNTIME_DIR}/pulse"{,}
63 exec bwrap "${BWRAP_ARGS[@]}" "${BWRAP_CUSTOM_BINDS[@]}" "${BWRAP_DEV_BINDS[@]}" /opt/wechat-universal/wechat "$@"