Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
#!/bin/bash

echo " *** startvnc script"
set -e

export VNCPASSWORD='xxx'

if [ -z "$VNCPASSWORD" ]; then
  VNCPASSWORD=`pwgen 8`
  echo " *** VNC password for this session: $VNCPASSWORD"
fi

export USER="`whoami`"
mkdir -p ~/.vnc

echo "$VNCPASSWORD" | tightvncpasswd -f > ~/.vnc/passwd
chmod 0600 ~/.vnc/passwd

tightvncserver -geometry 1024x768 :1
sleep 1
tail -f ~/.vnc/*.log


vi /usr/local/bin/waitfordaemon


Code Block
#!/bin/bash

while supervisorctl status "$1" 2>/dev/null | grep -vq 'RUNNING'; do
  echo "Waiting for $1"
  sleep 1
done

# An additional wait, just to be safe
sleep 3
shift
exec "$@"

chmod +x /usr/local/bin/waitfordaemon

DOSEmu

Installation

sudo su

apt-get update

apt-get install dosemu

...