File tree Expand file tree Collapse file tree 5 files changed +42
-21
lines changed Expand file tree Collapse file tree 5 files changed +42
-21
lines changed Original file line number Diff line number Diff line change 1- FROM ubuntu:14 .04
1+ FROM ubuntu:16 .04
22MAINTAINER Doro Wu <fcwu.tw@gmail.com>
33
44ENV DEBIAN_FRONTEND noninteractive
5- ENV HOME /home/ubuntu
65
76RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list
87
98# built-in packages
109RUN apt-get update \
11- && apt-get install -y --force-yes -- no-install-recommends software-properties-common curl \
12- && sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/ /' >> /etc/apt/sources.list.d/arc-theme.list" \
13- && curl -SL http://download.opensuse.org/repositories/home:Horst3180/xUbuntu_16.04/Release.key | sudo apt-key add - \
10+ && apt-get install -y --no-install-recommends software-properties-common curl \
11+ && sh -c "echo 'deb http://download.opensuse.org/repositories/home:/Horst3180/xUbuntu_16.04/ /' >> /etc/apt/sources.list.d/arc-theme.list" \
12+ && curl -SL http://download.opensuse.org/repositories/home:Horst3180/xUbuntu_16.04/Release.key | apt-key add - \
1413 && add-apt-repository ppa:fcwu-tw/ppa \
1514 && apt-get update \
16- && apt-get install -y --force-yes -- no-install-recommends \
15+ && apt-get install -y --no-install-recommends --allow-unauthenticated \
1716 supervisor \
1817 openssh-server pwgen sudo vim-tiny \
1918 net-tools \
@@ -26,6 +25,7 @@ RUN apt-get update \
2625 python-pip python-dev build-essential \
2726 mesa-utils libgl1-mesa-dri \
2827 gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine pinta arc-theme \
28+ dbus-x11 x11-utils \
2929 && apt-get autoclean \
3030 && apt-get autoremove \
3131 && rm -rf /var/lib/apt/lists/*
@@ -41,4 +41,6 @@ RUN pip install setuptools wheel && pip install -r /usr/lib/web/requirements.txt
4141
4242EXPOSE 80
4343WORKDIR /root
44+ ENV HOME=/home/ubuntu \
45+ SHELL=/bin/bash
4446ENTRYPOINT ["/startup.sh" ]
Original file line number Diff line number Diff line change @@ -11,16 +11,40 @@ redirect_stderr=true
1111
1212[program:lxsession]
1313priority=15
14- directory=/home/ubuntu
15- command=/usr/bin/lxsession
14+ directory=/root
15+ command=/usr/bin/openbox
1616user=root
1717autostart=true
1818autorestart=true
1919stopsignal=QUIT
20- environment=DISPLAY=":1",HOME="/home/ubuntu "
21- stdout_logfile=/var/log/lxsession .log
20+ environment=DISPLAY=":1",HOME="/root",USER="root "
21+ stdout_logfile=/var/log/openbox .log
2222redirect_stderr=true
2323
24+ [program:lxpanel]
25+ priority=15
26+ directory=/root
27+ command=/usr/bin/lxpanel --profile LXDE
28+ user=root
29+ autostart=true
30+ autorestart=true
31+ stopsignal=QUIT
32+ environment=DISPLAY=":1",HOME="/root",USER="root"
33+ stdout_logfile=/var/log/lxpanel.log
34+ redirect_stderr=true
35+
36+ [program:pcmanfm]
37+ priority=15
38+ directory=/root
39+ command=/usr/bin/pcmanfm --desktop --profile LXDE
40+ user=root
41+ autostart=true
42+ autorestart=true
43+ stopsignal=QUIT
44+ environment=DISPLAY=":1",HOME="/root",USER="root"
45+ stdout_logfile=/var/log/pcmanfm.log
46+
47+
2448[program:x11vnc]
2549priority=20
2650directory=/
Original file line number Diff line number Diff line change @@ -17,4 +17,4 @@ gtk-xft-antialias=1
1717gtk-xft-hinting=1
1818gtk-xft-hintstyle="hintslight"
1919gtk-xft-rgba="rgb"
20- include "/home/ubuntu /.gtkrc-2.0.mine"
20+ include "/root /.gtkrc-2.0.mine"
Original file line number Diff line number Diff line change 22
33mkdir -p /var/run/sshd
44
5- # create an ubuntu user
6- # PASS=`pwgen -c -n -1 10`
7- PASS=ubuntu
8- # echo "Username: ubuntu Password: $PASS"
9- id -u ubuntu & > /dev/null || useradd --create-home --shell /bin/bash --user-group --groups adm,sudo ubuntu
10- echo " ubuntu:$PASS " | chpasswd
11- chown -R ubuntu:ubuntu /home/ubuntu
12- sudo -u ubuntu -i bash -c " mkdir -p /home/ubuntu/.config/pcmanfm/LXDE/ \
13- && cp /usr/share/doro-lxde-wallpapers/desktop-items-0.conf /home/ubuntu/.config/pcmanfm/LXDE/"
5+ chown -R root:root /root
6+ mkdir -p /root/.config/pcmanfm/LXDE/
7+ cp /usr/share/doro-lxde-wallpapers/desktop-items-0.conf /root/.config/pcmanfm/LXDE/
148
159if [ -n " $VNC_PASSWORD " ]; then
1610 echo -n " $VNC_PASSWORD " > /.password1
1711 x11vnc -storepasswd $( cat /.password1) /.password2
1812 chmod 400 /.password*
1913 sed -i ' s/^command=x11vnc.*/& -rfbauth \/.password2/' /etc/supervisor/conf.d/supervisord.conf
14+ export VNC_PASSWORD=
2015fi
2116
2217cd /usr/lib/web && ./run.py > /var/log/web.log 2>&1 &
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def redirectme():
112112 # check all running
113113 for i in xrange (20 ):
114114 output = subprocess .check_output (r"supervisorctl status | grep RUNNING | wc -l" , shell = True )
115- if output .strip () == "4 " :
115+ if output .strip () == "6 " :
116116 FIRST = False
117117 return HTML_REDIRECT
118118 time .sleep (2 )
You can’t perform that action at this time.
0 commit comments