1 diff --git a/wechat-universal.sh b/wechat-universal.sh
2 index 186c6b0..8b47ed0 100644
3 --- a/wechat-universal.sh
4 +++ b/wechat-universal.sh
5 @@ -34,6 +34,7 @@ BWRAP_ENV_APPEND=()
6 env_add QT_QPA_PLATFORM xcb
7 env_add QT_AUTO_SCREEN_SCALE_FACTOR 1
8 env_add PATH "/sandbox:${PATH}"
9 +env_add LD_LIBRARY_PATH "$LD_LIBRARY_PATH:/opt/wechat-universal/RadiumWMPF/runtime"
11 case "${XMODIFIERS}" in
13 @@ -80,11 +81,11 @@ BWRAP_ARGS=(
17 - --symlink usr/lib /lib
18 - --symlink usr/lib /lib64
19 - --symlink usr/bin /bin
20 - --symlink usr/bin /sbin
21 - --bind /usr/bin/{true,lsblk}
26 + --ro-bind /usr/bin/{true,lsblk}
29 --ro-bind /{usr/lib/flatpak-xdg-utils,sandbox}/xdg-open
30 @@ -99,12 +100,15 @@ BWRAP_ARGS=(
34 - --ro-bind /etc/machine-id{,}
35 + --ro-bind-try /etc/machine-id{,}
36 --ro-bind /etc/passwd{,}
37 --ro-bind /etc/nsswitch.conf{,}
38 --ro-bind /etc/resolv.conf{,}
39 --ro-bind /etc/localtime{,}
40 --ro-bind-try /etc/fonts{,}
41 + --ro-bind /etc/ld.so.cache{,}
42 + --ro-bind /etc/ld.so.conf{,}
43 + --ro-bind-try /etc/ld.so.conf.d{,}
46 --dir /sys/dev # hack for Intel / AMD graphics, mesa calling virtual nodes needs /sys/dev being 0755
47 @@ -134,13 +138,13 @@ BWRAP_ARGS=(
48 --ro-bind-try "${HOME}/.local/share/.icons"{,}
51 - --dev-bind /run/dbus{,}
52 - --ro-bind /run/systemd/userdb{,}
53 + --dev-bind-try /run/dbus{,}
54 + --ro-bind-try /run/systemd/userdb{,}
55 --ro-bind-try "${XAUTHORITY}"{,}
56 - --ro-bind "${XDG_RUNTIME_DIR}/bus"{,}
57 - --ro-bind "${XDG_RUNTIME_DIR}/pulse"{,}
58 + --ro-bind-try "${XDG_RUNTIME_DIR}/bus"{,}
59 + --ro-bind-try "${XDG_RUNTIME_DIR}/pulse"{,}
62 exec bwrap "${BWRAP_ARGS[@]}" "${BWRAP_CUSTOM_BINDS[@]}" "${BWRAP_DEV_BINDS[@]}" "${BWRAP_ENV_APPEND[@]}" /opt/wechat-universal/wechat "$@"