Versions Compared

Key

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

...

apt-get install openssh-server



Install telnetd

apt-get install telnetd

Install dos2unix/unix2dos

apt-get install dos2unix

Install Supervisor

apt-get install supervisor


Install addition apps

apt-get -y --no-install-recommends install wget inetutils-syslogd wget tightvncserver xfonts-base \
lwm xterm vim-tiny less ca-certificates balance \
zip unzip pwgen xdotool telnet nano \
mtools dosfstools dos2unix inetutils-telnetd openbsd-inetd \
xvnc4viewer tcpser ser2net socat liblockfile-bin



Update Supervisor ConfigurationsConfigurations 


vi /etc/supervisor/conf.d/vncserver.conf


Code Block
[program:vncserver]
command=/usr/local/bin/startvnc
autostart=true
autorestart=true
startsecs=5

stdout_logfile=NONE
stderr_logfile=NONE


vi /etc/supervisor/conf.d/syslogd.conf


Code Block
[program:syslogd]
command=/usr/sbin/syslogd --no-detach --no-forward
autostart=true
autorestart=true
startsecs=5
stdout_logfile=NONE
stderr_logfile=NONE

stdout_logfile=NONE
stderr_logfile=NONE


vi /etc/supervisor/conf.d/xterm.conf


Code Block
[program:xterm]
command=/usr/bin/xterm
environment=DISPLAY=":1"
autostart=true
autorestart=true
startsecs=5
startretries=1000000
stdout_logfile=NONE
stderr_logfile=NONE


vi /etc/supervisor/conf.d/rawsocat.conf


Code Block
[program:rawsocat]
command=/usr/local/bin/waitfordaemon vncserver /usr/bin/socat TCP4-LISTEN:23,reuseaddr,fork EXEC:"/usr/local/bin/startnode,pty"
priority=1
directory=/dos
environment=DISPLAY=":1"
autostart=true
autorestart=true
startsecs=5
startretries=1000000
stdout_logfile=NONE
stderr_logfile=NONE


vi /etc/supervisor/conf.d/tcpsercon.conf


Code Block
[program:tcpsercon]
command=/usr/bin/tcpser -v 7000 -s 115200 -p 8000
priority=1
directory=/dos
environment=DISPLAY=":1"
autostart=true
autorestart=true
startsecs=5
startretries=1000000
stdout_logfile=NONE
stderr_logfile=NONE


vi /etc/supervisor/conf.d/telnetinetd.conf


Code Block
[program:telnetinetd]
command=/usr/local/bin/waitfordaemon vncserver /usr/sbin/inetd -E -i -l
priority=1
directory=/dos
environment=DISPLAY=":1"
autostart=false
autorestart=true
startsecs=5
startretries=1000000
stdout_logfile=NONE
stderr_logfile=NONE



vi /usr/local/bin/startvnc


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

...