baidunetdisk_entrypoint.sh 748 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. # 2022-006-08 lc:
  3. # add the next 3 lines to clean up .xlock files in tmp directories before
  4. # starting xwindows, without this step the container will go core dump
  5. # and prevent xscreensaver from running
  6. rm -Rf /tmp/.*
  7. rm -Rf /tmp/*
  8. rm /etc/xdg/autostart/xscreensaver.desktop
  9. # TODO: change permission more elegant
  10. chmod a+rwx /root/baidunetdisk
  11. #chmod a+rwx /root/baidunetdiskdownload
  12. chmod a+rwx /root/Downloads
  13. echo umask 000 >> /root/.bashrc
  14. echo umask 000 >> /root/.profile
  15. /usr/bin/vncserver -geometry 1600x1200 2>&1
  16. /opt/noVNC/utils/novnc_proxy --vnc localhost:5901 2>&1 &
  17. echo "Access through VNC (5091) or browser (localhost:6080) using password: 12345678."
  18. DISPLAY=:1 /opt/baidunetdisk/baidunetdisk --no-sandbox 2>&1
  19. exit 0