Skip to content

Commit

Permalink
Fix VNC server issue in VNC image
Browse files Browse the repository at this point in the history
  • Loading branch information
thyrlian committed Sep 28, 2024
1 parent 3ffe3be commit 998187d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
5 changes: 4 additions & 1 deletion android-sdk/supervisord.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[supervisord]
nodaemon = true
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
childlogdir=/var/log/supervisor

[include]
files = /etc/supervisor/conf.d/*.conf
Expand All @@ -10,6 +13,6 @@ stderr_logfile = /var/log/supervisord/sshd-stderr.log
stdout_logfile = /var/log/supervisord/sshd-stdout.log

[program:adb]
command = adb -a server nodaemon &
command = adb -a server nodaemon
stderr_logfile = /var/log/supervisord/adb-stderr.log
stdout_logfile = /var/log/supervisord/adb-stdout.log
7 changes: 6 additions & 1 deletion android-sdk/vnc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ ENV USER=root
ENV DISPLAY=:1
EXPOSE 5901
ADD vncpass.sh /tmp/
ADD vncserver_daemon.sh /usr/local/bin/
ADD watchdog.sh /usr/local/bin/
ADD supervisord_vncserver.conf /etc/supervisor/conf.d/
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends xfce4 xfce4-goodies xfonts-base dbus-x11 tightvncserver expect && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends xfce4 xfce4-goodies xfonts-base dbus-x11 tightvncserver expect xauth && \
touch /root/.Xauthority && chmod 600 /root/.Xauthority && \
xauth generate :1 . trusted && \
chmod +x /usr/local/bin/vncserver_daemon.sh && \
chmod +x /tmp/vncpass.sh; sync && \
/tmp/vncpass.sh && \
rm /tmp/vncpass.sh && \
apt-get remove -y expect && apt-get autoremove -y && \
FILE_SSH_ENV="/root/.ssh/environment" && \
echo "DISPLAY=:1" >> $FILE_SSH_ENV
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
12 changes: 11 additions & 1 deletion android-sdk/vnc/supervisord_vncserver.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
[supervisord]
logfile=/var/log/supervisor/supervisord.log
pidfile=/var/run/supervisord.pid
user=root

[program:vncserver]
command = /usr/bin/vncserver
command = /usr/local/bin/vncserver_daemon.sh
user=root
autostart=true
autorestart=true
startsecs=5
stopwaitsecs=5
stderr_logfile = /var/log/supervisord/vncserver-stderr.log
stdout_logfile = /var/log/supervisord/vncserver-stdout.log

Expand Down

0 comments on commit 998187d

Please sign in to comment.