summarylogtreecommitdiffstats
path: root/start.sh
diff options
context:
space:
mode:
authorYidaozhan Ya2022-12-12 17:35:25 +0800
committerYidaozhan Ya2022-12-12 17:35:25 +0800
commitfd88c7e5e15e6b384c72d458babe35a14f2e86f9 (patch)
tree2507414a56e3f28167e9f0d2610ff9211c5aeefd /start.sh
parentbf60345dc80e5f1aefbaecc8e1b6e7ec06d342ee (diff)
downloadaur-fd88c7e5e15e6b384c72d458babe35a14f2e86f9.tar.gz
r3: 可以和linuxqq共存
Diffstat (limited to 'start.sh')
-rwxr-xr-xstart.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/start.sh b/start.sh
index c113b918c3cb..2fe60d81f909 100755
--- a/start.sh
+++ b/start.sh
@@ -5,6 +5,7 @@ CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}"
FONTCONFIG_DIR="$CONFIG_DIR/fontconfig"
QQ_APP_DIR="${CONFIG_DIR}/QQ"
DOWNLOAD_DIR="$(xdg-user-dir DOWNLOAD)"
+NEW_DISPLAY="$DISPLAY"
if [ "$DOWNLOAD_DIR" == "$HOME" ]; then DOWNLOAD_DIR="$HOME/Downloads"; fi
mkdir -p "$QQ_APP_DIR"
@@ -26,12 +27,13 @@ bwrap --new-session --die-with-parent --cap-drop ALL --unshare-user-try --unshar
--bind "$USER_RUN_DIR" "$USER_RUN_DIR" \
--ro-bind-try /etc/fonts /etc/fonts \
--ro-bind-try "$FONTCONFIG_DIR" "$FONTCONFIG_DIR" \
- --bind /tmp /tmp \
- --bind "$HOME/.pki" "$HOME/.pki" \
- --ro-bind "$HOME/.Xauthority" "$HOME/.Xauthority" \
- --bind "${DOWNLOAD_DIR}" "${DOWNLOAD_DIR}" \
+ --dev-bind /tmp /tmp \
+ --bind-try "$HOME/.pki" "$HOME/.pki" \
+ --ro-bind-try "$XAUTHORITY" "$XAUTHORITY" \
+ --bind "$DOWNLOAD_DIR" "$DOWNLOAD_DIR" \
--bind "$QQ_APP_DIR" "$QQ_APP_DIR" \
--setenv IBUS_USE_PORTAL 1 \
+ --setenv DISPLAY "$NEW_DISPLAY" \
/opt/QQ/qq "$@"
# 移除无用崩溃报告和日志