diff options
author | Yidaozhan Ya | 2022-12-07 22:17:59 +0800 |
---|---|---|
committer | Yidaozhan Ya | 2022-12-07 22:17:59 +0800 |
commit | 84b06a192084a84654557074cc2ac1128d8f5a2d (patch) | |
tree | 9fda52e96de391502c808d432951ce4cc8e81cbd /start.sh | |
parent | a55511c41558b2242ee93a171c54e46240ae3bb5 (diff) | |
download | aur-84b06a192084a84654557074cc2ac1128d8f5a2d.tar.gz |
fix webview
Diffstat (limited to 'start.sh')
-rwxr-xr-x | start.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/start.sh b/start.sh new file mode 100755 index 000000000000..914abb0c3f91 --- /dev/null +++ b/start.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}" +QQ_APP_DIR="${CONFIG_DIR}/QQ" +DOWNLOAD_DIR="$(xdg-user-dir DOWNLOAD)" +if [ "$DOWNLOAD_DIR" == "$HOME" ]; then DOWNLOAD_DIR="$HOME/Downloads"; fi + +cd /opt/QQ + +bwrap --new-session --die-with-parent --cap-drop ALL --unshare-user-try --unshare-pid --unshare-cgroup-try \ + --dev-bind / / \ + --proc /proc \ + --tmpfs "$HOME" \ + --bind "$HOME/.pki" "$HOME/.pki" \ + --ro-bind "$HOME/.Xauthority" "$HOME/.Xauthority" \ + --bind "${DOWNLOAD_DIR}" "${DOWNLOAD_DIR}" \ + --bind "$QQ_APP_DIR" "$QQ_APP_DIR" \ + /opt/QQ/qq "$@" + +# 移除无用崩溃报告和日志 +# 如果需要向腾讯反馈 bug,请注释掉如下两行 +rm -rf "$QQ_APP_DIR/crash_files" +rm -rf "$QQ_APP_DIR/nt_qq_"**"/nt_data/log/"* |