bubblewrap-scripts/profiles/libreoffice

46 lines
1.3 KiB
Plaintext
Raw Normal View History

2017-02-22 21:16:05 +01:00
#!/usr/bin/env bash
set -euo pipefail
2020-05-26 17:10:14 +02:00
mkdir -p ~/.doc
2017-02-22 21:16:05 +01:00
(
exec bwrap \
2019-02-12 15:51:34 +01:00
--ro-bind /usr/bin /usr/bin/ \
2018-12-23 15:55:40 +01:00
--ro-bind /usr/share /usr/share \
--ro-bind /usr/lib /usr/lib \
--ro-bind /usr/lib64 /usr/lib64 \
--bind /tmp /tmp \
--symlink /usr/lib64 /lib64 \
--symlink /usr/bin /bin \
--tmpfs /usr/lib/modules \
--tmpfs /usr/lib/systemd \
--tmpfs /usr/lib/gcc \
--proc /proc \
--dev /dev \
--ro-bind /tmp/.X11-unix /tmp/.X11-unix \
--ro-bind /etc /etc \
--ro-bind /sys /sys \
2020-05-26 17:10:14 +02:00
--unsetenv MOZ_PLUGIN_PATH \
2018-12-23 15:55:40 +01:00
--unsetenv XTERM_LOCALE \
--unsetenv TERM \
--unsetenv XTERM_VERSION \
--unsetenv XTERM_SHELL \
2020-05-26 17:10:14 +02:00
--unsetenv DBUS_SESSION_BUS_ADDRESS \
2018-12-23 15:55:40 +01:00
--unsetenv XDG_RUNTIME_DIR \
--unsetenv MAIL \
2020-05-26 17:10:14 +02:00
--setenv SHELL /bin/false \
--setenv PATH /usr/bin \
2020-05-26 20:02:27 +02:00
--bind ~/.cache/fontconfig ~/.cache/fontconfig \
--bind ~/.config/libreoffice ~/.config/libreoffice \
2020-05-30 13:25:59 +02:00
--bind ~/.doc ~/Documents \
2020-05-26 20:02:27 +02:00
--bind "${@: -1}" "${@: -1}" \
2018-12-23 15:55:40 +01:00
--unshare-user-try \
--unshare-pid \
--unshare-net \
--unshare-uts \
--unshare-cgroup \
--new-session \
--seccomp 10 \
10< /usr/local/bin/seccomp_default_filter.bpf \
/usr/bin/libreoffice "$@"
2017-02-22 21:16:05 +01:00
)
2020-05-26 17:10:14 +02:00
mv -n ~/.doc/*.* ~/