You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chrome-vnc-2/crdonly

20 lines
838 B
Bash

#!/bin/bash
# make sure to install a new version of ~/.chrome-remote-desktop-session
# where ~ is a volume
cp /crd-session /home/chrome/.chrome-remote-desktop-session
# delete obsolete pulseaudio sockets if left from previous sessions
rm -rf /home/chrome/.config/chrome-remote-desktop/pulseaudio*
# only keep 1 host#*.json config file
# (default is to use md5 of hostname, which changes on every docker run)
if test -n "$(find /home/chrome/.config/chrome-remote-desktop -name 'host#*.json' -print -quit)"
then
mv `ls -t /home/chrome/.config/chrome-remote-desktop/host#*.json | head -n 1` /home/chrome/.config/chrome-remote-desktop/~host.json
rm /home/chrome/.config/chrome-remote-desktop/host#*.json
fi
# start supervisor to watch `chrome-remote-desktop` only
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord-crdonly.conf