Compare commits

...

4 commits

Author SHA1 Message Date
d8d634e45c app_containers: Disable /dev/shm mount
We have disabled the MIT-SHM extension entirely.
2022-12-26 08:34:12 -05:00
2e6e29ed34 app_containers: Set DeviceAllow properly
/dev/dri and /dev/shm are NOT devices.
2022-12-26 08:32:01 -05:00
c64e51a244 sway/bashrc: Disable MIT-SHM extension for Xwayland
MIT-SHM does not work well inside containers like systemd-nspawn
2022-12-26 08:31:33 -05:00
0d9d4b363e app_containers: Bind Xorg sockets as rw 2022-12-25 23:01:15 -05:00
3 changed files with 6 additions and 4 deletions

View file

@ -48,9 +48,7 @@ SUDO_ASKPASS=$HOME/.local/bin/askpass-bemenu sudo -A systemd-nspawn -M $CONTAINE
--bind-ro=/run/systemd/resolve/stub-resolv.conf:/etc/resolv.conf \ --bind-ro=/run/systemd/resolve/stub-resolv.conf:/etc/resolv.conf \
`# GPU` \ `# GPU` \
--bind=/dev/dri \ --bind=/dev/dri \
--bind=/dev/shm \ --property=DeviceAllow='char-drm rw' \
--property=DeviceAllow='/dev/dri rw' \
--property=DeviceAllow='/dev/shm rw' \
`# Input devices` \ `# Input devices` \
--bind-ro=/dev/input \ --bind-ro=/dev/input \
--property=DeviceAllow='char-input r' \ --property=DeviceAllow='char-input r' \
@ -58,7 +56,7 @@ SUDO_ASKPASS=$HOME/.local/bin/askpass-bemenu sudo -A systemd-nspawn -M $CONTAINE
--bind=$container_xdg_runtime:/run/xdg \ --bind=$container_xdg_runtime:/run/xdg \
--setenv=XDG_RUNTIME_DIR=/run/xdg \ --setenv=XDG_RUNTIME_DIR=/run/xdg \
`# Xorg / Xwayland` \ `# Xorg / Xwayland` \
--bind-ro=/tmp/.X11-unix \ --bind=/tmp/.X11-unix \
--setenv=DISPLAY=$DISPLAY \ --setenv=DISPLAY=$DISPLAY \
`# Wayland (note the symlink created before in xdg runtime)` \ `# Wayland (note the symlink created before in xdg runtime)` \
--bind-ro=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/run/host/$WAYLAND_DISPLAY \ --bind-ro=$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY:/run/host/$WAYLAND_DISPLAY \

View file

@ -122,4 +122,5 @@ export GTK_THEME=Gruvbox-Material-Dark-HIDPI
export GTK_IM_MODULE=fcitx export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx export QT_IM_MODULE=fcitx
export SDL_IM_MODULE=fcitx export SDL_IM_MODULE=fcitx
export WLR_XWAYLAND=$HOME/.local/bin/Xwayland-noshm
$MACHINE_START_SWAY && [[ -z "$DISPLAY" && $(tty) == /dev/tty1 ]] && exec sway $MACHINE_START_SWAY && [[ -z "$DISPLAY" && $(tty) == /dev/tty1 ]] && exec sway

3
sway/.local/bin/Xwayland-noshm Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
exec /usr/bin/Xwayland -extension MIT-SHM $@