minor improvements

This commit is contained in:
valoq 2022-11-25 08:03:56 +01:00
parent 791c01f0b1
commit 8f60d4d155
No known key found for this signature in database
GPG Key ID: 19F09A0FB865CBD8
4 changed files with 17 additions and 28 deletions

View File

@ -29,23 +29,23 @@ fi
--dev-bind-try /dev/hidraw7 /dev/hidraw7 \
--dev-bind-try /dev/hidraw8 /dev/hidraw8 \
--dev-bind-try /dev/hidraw9 /dev/hidraw9 \
--dev-bind /dev/char /dev/char \
--dev-bind /dev/usb /dev/usb \
--ro-bind /sys/bus/usb /sys/bus/usb \
--ro-bind /sys/class/hidraw /sys/class/hidraw \
--ro-bind /sys/devices/pci0000:00 /sys/devices/pci0000:00 \
--dev-bind-try /dev/char /dev/char \
--dev-bind-try /dev/usb /dev/usb \
--ro-bind-try /sys/bus/usb /sys/bus/usb \
--ro-bind-try /sys/class/hidraw /sys/class/hidraw \
--ro-bind-try /sys/devices/pci0000:00 /sys/devices/pci0000:00 \
--ro-bind /etc/passwd /etc/passwd \
--ro-bind /etc/group /etc/group \
--ro-bind /etc/hostname /etc/hostname \
--ro-bind /etc/hosts /etc/hosts \
--ro-bind /etc/localtime /etc/localtime \
--ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \
--ro-bind /etc/resolv.conf /etc/resolv.conf \
--ro-bind /etc/xdg /etc/xdg \
--ro-bind /etc/gtk-2.0 /etc/gtk-2.0 \
--ro-bind /etc/gtk-3.0 /etc/gtk-3.0 \
--ro-bind /etc/fonts /etc/fonts \
--ro-bind /etc/mime.types /etc/mime.types \
--ro-bind-try /etc/resolv.conf /etc/resolv.conf \
--ro-bind-try /etc/xdg /etc/xdg \
--ro-bind-try /etc/gtk-2.0 /etc/gtk-2.0 \
--ro-bind-try /etc/gtk-3.0 /etc/gtk-3.0 \
--ro-bind-try /etc/fonts /etc/fonts \
--ro-bind-try /etc/mime.types /etc/mime.types \
--ro-bind-try /etc/alsa /etc/alsa \
--ro-bind-try /etc/pulse /etc/pulse \
--ro-bind-try /etc/pipewire /etc/pipewire \
@ -55,13 +55,10 @@ fi
--bind-try ~/Downloads ~/Downloads \
--bind-try ~/.mozilla ~/.mozilla \
--bind-try ~/.cache/mozilla ~/.cache/mozilla \
--chdir ~/ \
--unsetenv DBUS_SESSION_BUS_ADDRESS \
--setenv MOZ_ENABLE_WAYLAND 1 \
--unshare-user-try \
--unshare-pid \
--unshare-uts \
--unshare-cgroup-try \
--unshare-all \
--share-net \
--hostname mypc \
--new-session \
--seccomp 10 \

View File

@ -12,11 +12,7 @@ set -euo pipefail
--ro-bind /run/user/"$(id -u)"/"$WAYLAND_DISPLAY" /run/user/"$(id -u)"/"$WAYLAND_DISPLAY" \
--ro-bind-try ~/.config/imv/ ~/.config/imv/ \
--ro-bind-try "${@: -1}" "$(realpath "${@: -1}")" \
--unshare-user \
--unshare-pid \
--unshare-net \
--unshare-uts \
--unshare-cgroup \
--unshare-all \
--new-session \
--seccomp 10 \
10< /usr/local/bin/seccomp_default_filter.bpf \

View File

@ -2,7 +2,7 @@
set -euo pipefail
(
exec bwrap \
--ro-bind /usr/bin/ /usr/bin/ \
--ro-bind /usr/bin /usr/bin \
--ro-bind /usr/share /usr/share \
--ro-bind /usr/lib /usr/lib \
--ro-bind /usr/lib64 /usr/lib64 \
@ -23,4 +23,4 @@ set -euo pipefail
/usr/bin/mpv --no-terminal "$@"
)
## remove --no-session if you want terminal control in mpv
## remove --no-session and --no-terminal if you want terminal control in mpv

View File

@ -15,11 +15,7 @@ set -euo pipefail
--ro-bind-try ~/.config/vlc ~/.config/vlc \
--ro-bind-try "${@: -1}" "$(realpath "${@: -1}")" \
--unsetenv DBUS_SESSION_BUS_ADDRESS \
--unshare-user-try \
--unshare-pid \
--unshare-net \
--unshare-uts \
--unshare-cgroup-try \
--unshare-all \
--new-session \
--seccomp 10 \
10< /usr/local/bin/seccomp_default_filter.bpf \