teto_ai/entry.sh

25 lines
632 B
Bash

#!/bin/bash
set -e
rm -f /tmp/.X99-lock
export PULSE_SERVER=unix:/tmp/pulseaudio.socket
Xvfb :99 -screen 0 1920x1080x24 -ac +extension GLX +render -noreset &
pulseaudio --daemonize --exit-idle-time=-1 --disallow-exit &
openbox
# start a simple vnc server that re-uses the same desktop
x11vnc -display :99 -shared -forever -nopw -rfbport 5901 -bg
# Launch discord with the sandbox disabled. This is critical.
discord \
--no-sandbox \
--disable-dev-shm-usage \
--disable-gpu \
--disable-background-timer-throttling \
--disable-renderer-backgrounding \
--disable-features=GpuProcess $@
sleep 10
exec node bot.js "$@"