docker-webtop/root/usr/local/bin/wrapped-chromium
2025-07-04 11:20:13 -04:00

23 lines
492 B
Bash
Executable File

#! /bin/bash
BIN=/usr/bin/chromium-browser
# Cleanup
if ! pgrep chromium > /dev/null;then
rm -f $HOME/.config/chromium/Singleton*
fi
# Disable GPU without Nvidia
if which nvidia-smi; then
DISABLE_GPU=""
else
DISABLE_GPU="--disable-gpu"
fi
# Run normally on privved containers or modified un non priv
if grep -q 'Seccomp:.0' /proc/1/status; then
${BIN} --password-store=basic ${DISABLE_GPU} "$@"
else
${BIN} --password-store=basic ${DISABLE_GPU} --no-sandbox --test-type "$@"
fi