0
0
Fork 0
mirror of https://github.com/valoq/bwscripts.git synced 2023-12-13 21:30:26 +01:00
bubblewrap-scripts/profiles/debian/libreoffice
2017-03-09 22:33:33 +01:00

49 lines
1.2 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
(
exec bwrap \
--ro-bind /usr/bin/ /usr/bin/ \
--ro-bind /usr/share/ /usr/share/ \
--ro-bind /usr/lib /usr/lib \
--ro-bind /usr/lib32 /usr/lib32 \
--ro-bind /lib /lib \
--ro-bind /lib64 /lib64 \
--ro-bind /lib32 /lib32 \
--ro-bind /libx32 /libx32 \
--ro-bind /bin /bin \
--ro-bind /sbin /sbin \
--proc /proc \
--dev /dev \
--ro-bind /tmp/.X11-unix /tmp/.X11-unix \
--ro-bind /etc /etc \
--ro-bind /sys /sys \
--bind /run/user/`id -u`/dconf /run/user/`id -u`/dconf \
--bind ~/ ~/ \
--tmpfs ~/.gnupg \
--tmpfs ~/.ssh \
--tmpfs ~/.mutt \
--tmpfs ~/.mozilla \
--tmpfs ~/.thunderbird \
--tmpfs ~/.mail \
--tmpfs ~/.Mail \
--tmpfs ~/.claws-mail \
--tmpfs ~/.config \
--tmpfs ~/.cache \
--tmpfs ~/.local \
--tmpfs ~/.pki \
--bind ~/.cache/fontconfig ~/.cache/fontconfig \
--ro-bind ~/.Xauthority ~/.Xauthority \
--bind ~/.config/libreoffice ~/.config/libreoffice \
--unsetenv MOZ_PLUGIN_PATH \
--unsetenv XDG_RUNTIME_DIR \
--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 "$@"
)