-
Notifications
You must be signed in to change notification settings - Fork 0
/
firefox
executable file
·51 lines (49 loc) · 2.06 KB
/
firefox
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-"$HOME/.config"}
XDG_CACHE_HOME=${XDG_CACHE_HOME:-"$HOME/.cache"}
XDG_DOWNLOAD_DIR=$(xdg-user-dir DOWNLOAD)
exec bwrap \
--unshare-all \
--share-net \
--clearenv \
--setenv HOME $HOME \
--setenv WAYLAND_DISPLAY $WAYLAND_DISPLAY \
--setenv XDG_RUNTIME_DIR $XDG_RUNTIME_DIR \
--setenv LANG $LANG \
--new-session \
--ro-bind /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2 \
--ro-bind /usr/bin/firefox /usr/bin/firefox \
--ro-bind /bin/sh /bin/sh \
--ro-bind /usr/lib /usr/lib \
--proc /proc \
--dev /dev \
--tmpfs /tmp \
--ro-bind "$XDG_RUNTIME_DIR/bus" "$XDG_RUNTIME_DIR/bus" \
--ro-bind "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY" \
--ro-bind "$XDG_RUNTIME_DIR/pulse" "$XDG_RUNTIME_DIR/pulse" \
--bind "$XDG_RUNTIME_DIR/dconf/user" "$XDG_RUNTIME_DIR/dconf/user" \
--ro-bind "$XDG_CONFIG_HOME/dconf/user" "$HOME/.config/dconf/user" \
--ro-bind /usr/share/X11/xkb /usr/share/X11/xkb \
--ro-bind /usr/share/icons /usr/share/icons \
--ro-bind /usr/share/mime /usr/share/mime \
--ro-bind /usr/share/applications /usr/share/applications \
--ro-bind /usr/share/fonts /usr/share/fonts \
--ro-bind /usr/share/locale /usr/share/locale \
--ro-bind /usr/share/glib-2.0 /usr/share/glib-2.0 \
--ro-bind /usr/share/themes /usr/share/themes \
--ro-bind /etc/fonts /etc/fonts \
--ro-bind /etc /etc \
--ro-bind /run/systemd/resolve /run/systemd/resolve \
--ro-bind /usr/share/ca-certificates /usr/share/ca-certificates \
--ro-bind /usr/share/glvnd /usr/share/glvnd \
--dev-bind /dev/dri /dev/dri \
--ro-bind /sys/dev/char /sys/dev/char \
--ro-bind /sys/devices/pci0000:00 /sys/devices/pci0000:00 \
--bind "$HOME/Applications/Firefox/.mozilla" "$HOME/.mozilla" \
--bind "$HOME/Applications/Firefox/.cache" "$HOME/.cache" \
--bind "$XDG_CACHE_HOME/fontconfig" "$HOME/.cache/fontconfig" \
--ro-bind "$XDG_CONFIG_HOME/user-dirs.dirs" "$HOME/.config/user-dirs.dirs" \
--ro-bind "$XDG_CONFIG_HOME/user-dirs.locale" "$HOME/.config/user-dirs.locale" \
--tmpfs "$HOME/.config/pulse" \
--bind "$XDG_DOWNLOAD_DIR" "$XDG_DOWNLOAD_DIR" \
/usr/bin/firefox