25 lines
643 B
Bash
Executable file
25 lines
643 B
Bash
Executable file
#!/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 VNC server in the background
|
|
x11vnc -display :99 -shared -forever -nopw -rfbport 5901 -bg &
|
|
|
|
# Launch discord in the background. THIS IS THE FIX.
|
|
discord \
|
|
--no-sandbox \
|
|
--disable-dev-shm-usage \
|
|
--disable-gpu \
|
|
--disable-background-timer-throttling \
|
|
--disable-renderer-backgrounding &
|
|
|
|
# Give Discord a moment to start before launching the controller script
|
|
sleep 10
|
|
exec node bot.js "$@"
|