Merge branch 'develop' into bionic-lxqt

This commit is contained in:
Doro Wu 2020-04-15 08:40:32 +08:00
commit bd5d9134bf
66 changed files with 2211 additions and 837 deletions

32
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View file

@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Versions (please complete the following information):**
- OS: [e.g. Ubuntu 18.04]
- image tag [e.g. develop]
**Additional context**
Add any other context about the problem here.

View file

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

41
ARCHITECTURE.md Normal file
View file

@ -0,0 +1,41 @@
# Architecture of the container #
Components
============
The container contains the following components :
- An Ubuntu base system
- The tini + supervisord startup and daemon control system
- Nginx Web server
- A backend ("novnc2") Python Web app providing an API (written with
Flask) on port 6079
- A frontend VueJS Web app displayed to the user, which will wrap noVNC
- noVNC + WebSockify providing the Web VNC client in an HTML5 canvas
- Xvfb running the X11 server in memory
- x11vnc exporting the X11 display through VNC
- and all regular X applications, like the LXDE desktop and apps
Wiring them all
------------------
Internally, Xvfb will be started in DISPLAY :1, then x11vnc will
provide access to it on the default VNC port (5900).
noVNC will be started listening to HTTP requests on port 6081.
It is possible to connect directly to port 6081 of the container, to
only use the regular noVNC Web interface (provided it is exported by
the container).
Above noVNC stands the VueJS frontend Web app provided by nginx, which
will proxy the noVNC canvas, and will add some useful features over
noVNC.
User-oriented features
==========================
The Web frontend adds the following features :
- upon display of the Web page, the app will detect the size of the
Web browser's window, and will invoke the backend API so as to make
sure the noVNC rendering ajusts to that size
- provide a flash video rendering transporting the sound (???)

View file

@ -1,4 +1,21 @@
# Run in local # Get code
```
git clone --recursive https://github.com/fcwu/docker-ubuntu-vnc-desktop
```
or, if you have already cloned it, get submodules contents :
```
git submodule init; git submodule update
```
# Test local code
## Test-run in container rebuilt from local repo
You may edit the code in your local copy of the repo, rebuild the
container, and test the changes:
``` ```
make clean make clean
FLAVOR=lxqt ARCH=amd64 IMAGE=ubuntu:18.04 make build FLAVOR=lxqt ARCH=amd64 IMAGE=ubuntu:18.04 make build
@ -13,14 +30,19 @@ You can configure your own installed programs by using `APPS` env vriable and `B
`make BUILD_DEPS="build-essential software-properties-common" APPS="vim-tiny net-tools zenity xz-utils firefox chromium-browser" run` `make BUILD_DEPS="build-essential software-properties-common" APPS="vim-tiny net-tools zenity xz-utils firefox chromium-browser" run`
## develop backend ## develop backend
You may wish to work on the backend app. As the "make run" makes sure
to mount the current dir contents under /src in the container, you can
proceed as such (no compilation of the Python code):
``` ```
make shell make shell
supervisorctl stop web supervisorctl -c /etc/supervisor/supervisord.conf stop web
cd /src/image/usr/local/lib/web/backend cd /src/image/usr/local/lib/web/backend
./run.py --debug ./run.py --debug
``` ```
## develop frontend ## develop frontend
``` ```
cd web cd web
yarn add yarn add

View file

@ -8,7 +8,7 @@ FROM ubuntu:18.04 as system
RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list;
# built-in packages # built-in packages
@ -45,17 +45,21 @@ RUN apt update \
# Additional packages require ~600MB # Additional packages require ~600MB
# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw # libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw
# tini for subreap # tini to fix subreap
ARG TINI_VERSION=v0.18.0 ARG TINI_VERSION=v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-amd64 /bin/tini ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-amd64 /bin/tini
RUN chmod +x /bin/tini RUN chmod +x /bin/tini
# ffmpeg # ffmpeg
RUN mkdir -p /usr/local/ffmpeg \ RUN apt update \
&& curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar xJvf - -C /usr/local/ffmpeg/ --strip 1 && apt install -y --no-install-recommends --allow-unauthenticated \
ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /usr/local/ffmpeg \
&& ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg
# python library # python library
COPY image/usr/local/lib/web/backend/requirements.txt /tmp/ COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/
RUN apt-get update \ RUN apt-get update \
&& dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \
&& apt-get install -y python-pip python-dev build-essential \ && apt-get install -y python-pip python-dev build-essential \
@ -74,14 +78,14 @@ RUN apt-get update \
FROM ubuntu:18.04 as builder FROM ubuntu:18.04 as builder
RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list;
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates gnupg patch && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch
# nodejs # nodejs
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \ RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \
&& apt-get install -y nodejs && apt-get install -y nodejs
# yarn # yarn
@ -94,7 +98,7 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
COPY web /src/web COPY web /src/web
RUN cd /src/web \ RUN cd /src/web \
&& yarn \ && yarn \
&& npm run build && yarn build
@ -105,7 +109,9 @@ FROM system
LABEL maintainer="fcwu.tw@gmail.com" LABEL maintainer="fcwu.tw@gmail.com"
COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/
COPY image / COPY rootfs /
RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \
chmod +x /usr/local/lib/web/frontend/static/websockify/run
EXPOSE 80 EXPOSE 80
WORKDIR /root WORKDIR /root

124
Dockerfile.arm64 Normal file
View file

@ -0,0 +1,124 @@
# Built with arch: arm64 flavor: lxde image: ubuntu:18.04
#
################################################################################
# base system
################################################################################
# qemu helper for arm build
FROM ubuntu:18.04 as amd64
RUN apt update && apt install -y qemu-user-static
FROM arm64v8/ubuntu:18.04 as system
COPY --from=amd64 /usr/bin/qemu-aarch64-static /usr/bin/
RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list;
# built-in packages
ENV DEBIAN_FRONTEND noninteractive
RUN apt update \
&& apt install -y --no-install-recommends software-properties-common curl apache2-utils \
&& apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
supervisor nginx sudo net-tools zenity xz-utils \
dbus-x11 x11-utils alsa-utils \
mesa-utils libgl1-mesa-dri \
&& apt autoclean -y \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# install debs error if combine together
RUN add-apt-repository -y ppa:fcwu-tw/apps \
&& apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
xvfb x11vnc=0.9.13-3 x11vnc-data=0.9.13-3 \
vim-tiny firefox chromium-browser ttf-ubuntu-font-family ttf-wqy-zenhei \
&& add-apt-repository -r ppa:fcwu-tw/apps \
&& apt autoclean -y \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
RUN apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \
&& apt autoclean -y \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# Additional packages require ~600MB
# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw
# tini for subreap
ARG TINI_VERSION=v0.18.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-arm64 /bin/tini
RUN chmod +x /bin/tini
# ffmpeg
RUN mkdir -p /usr/local/ffmpeg \
&& curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar xJvf - -C /usr/local/ffmpeg/ --strip 1
# python library
COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/
RUN apt-get update \
&& dpkg-query -W -f='${Package}\n' > /tmp/a.txt \
&& apt-get install -y python-pip python-dev build-essential \
&& pip install setuptools wheel && pip install -r /tmp/requirements.txt \
&& dpkg-query -W -f='${Package}\n' > /tmp/b.txt \
&& apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \
&& apt-get autoclean -y \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt
################################################################################
# builder
################################################################################
FROM ubuntu:18.04 as builder
RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list;
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates gnupg patch
# nodejs
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \
&& apt-get install -y nodejs
# yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y yarn
# build frontend
COPY web /src/web
RUN cd /src/web \
&& yarn \
&& npm run build
RUN cd /src/web/dist/static/novnc && patch -p0 < /src/web/novnc-armhf-1.patch
################################################################################
# merge
################################################################################
FROM system
LABEL maintainer="fcwu.tw@gmail.com"
COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/
COPY rootfs /
RUN ln -sf /usr/local/lib/web/frontend/static/websockify" "/usr/local/lib/web/frontend/static/novnc/utils/websockify && chmod +x /usr/local/lib/web/frontend/static/websockify/run
RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \
chmod +x /usr/local/lib/web/frontend/static/websockify/run
EXPOSE 80
WORKDIR /root
ENV HOME=/home/ubuntu \
SHELL=/bin/bash
HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health
ENTRYPOINT ["/startup.sh"]

View file

@ -1,4 +1,4 @@
# Built with arch: armhf flavor: lxde image: ubuntu:18.04 localbuild: 1 # Built with arch: armhf flavor: lxde image: ubuntu:18.04
# #
################################################################################ ################################################################################
# base system # base system
@ -14,7 +14,7 @@ RUN if [ "x$localbuild" != "x" ]; then sed -i 's#http://archive.ubuntu.com/#http
RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list;
# built-in packages # built-in packages
@ -24,32 +24,37 @@ ARG APPS="vim-tiny net-tools zenity xz-utils firefox chromium-browser"
ENV APPS=$APPS ENV APPS=$APPS
ARG BUILD_DEPS="build-essential software-properties-common" ARG BUILD_DEPS="build-essential software-properties-common"
ENV BUILD_DEPS=$BUILD_DEPS ENV BUILD_DEPS=$BUILD_DEPS
# Additional packages require ~600MB
# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw
# python library RUN apt update \
COPY image/usr/local/lib/web/backend/requirements.txt /tmp/ && apt install -y --no-install-recommends $BUILD_DEPS curl apache2-utils \
&& apt update \
RUN apt-get update \ && apt install -y --no-install-recommends --allow-unauthenticated \
&& apt-get install -y --no-install-recommends --allow-unauthenticated \ supervisor nginx sudo \
$BUILD_DEPS apache2-utils curl supervisor nginx sudo \
dbus-x11 x11-utils alsa-utils \ dbus-x11 x11-utils alsa-utils \
mesa-utils libgl1-mesa-dri \ mesa-utils libgl1-mesa-dri \
lxqt openbox xvfb x11vnc \ && apt autoclean -y \
gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf arc-theme \ && apt autoremove -y \
ttf-ubuntu-font-family ttf-wqy-zenhei \ && rm -rf /var/lib/apt/lists/*
# install debs error if combine together
RUN add-apt-repository -y ppa:fcwu-tw/apps \
&& apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
xvfb x11vnc=0.9.16-1 \
$APPS \ $APPS \
&& add-apt-repository -r ppa:fcwu-tw/apps \ && add-apt-repository -r ppa:fcwu-tw/apps \
&& dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ && apt autoclean -y \
&& apt-get install -y python-dev python-pip \ && apt autoremove -y \
&& pip install setuptools wheel && pip install -r /tmp/requirements.txt \ && rm -rf /var/lib/apt/lists/*
&& dpkg-query -W -f='${Package}\n' > /tmp/b.txt \
&& apt-get remove -y python-pip `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \
&& apt-get purge -y --auto-remove $BUILD_DEPS \
&& apt-get autoclean \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
lxde gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \
&& apt autoclean -y \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# Additional packages require ~600MB
# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw
# tini for subreap # tini for subreap
ARG TINI_VERSION=v0.18.0 ARG TINI_VERSION=v0.18.0
@ -59,14 +64,43 @@ RUN chmod +x /bin/tini
# ffmpeg # ffmpeg
RUN mkdir -p /usr/local/ffmpeg \ RUN mkdir -p /usr/local/ffmpeg \
&& curl -sSL --http1.1 https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz | tar xJvf - -C /usr/local/ffmpeg/ --strip 1 \ && curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar xJvf - -C /usr/local/ffmpeg/ --strip 1
&& rm -rf /usr/local/ffmpeg/manpages
# python library
COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/
RUN apt-get update \
&& dpkg-query -W -f='${Package}\n' > /tmp/a.txt \
&& apt-get install -y python-pip python-dev \
&& pip install setuptools wheel && pip install -r /tmp/requirements.txt \
&& dpkg-query -W -f='${Package}\n' > /tmp/b.txt \
&& apt-get remove -y `diff --changed-group-format='%>' --unchanged-group-format='' /tmp/a.txt /tmp/b.txt | xargs` \
&& apt-get autoclean -y \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/apt/* /tmp/a.txt /tmp/b.txt
################################################################################ ################################################################################
# builder # builder
################################################################################ ################################################################################
FROM node:8-alpine as builder FROM ubuntu:18.04 as builder
RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list;
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates gnupg patch
# nodejs
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \
&& apt-get install -y nodejs
# yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update \
&& apt-get install -y yarn
# build frontend # build frontend
COPY web /src/web COPY web /src/web
@ -91,7 +125,10 @@ FROM system
LABEL maintainer="fcwu.tw@gmail.com" LABEL maintainer="fcwu.tw@gmail.com"
COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/
COPY image / COPY rootfs /
RUN ln -sf /usr/local/lib/web/frontend/static/websockify" "/usr/local/lib/web/frontend/static/novnc/utils/websockify && chmod +x /usr/local/lib/web/frontend/static/websockify/run
RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \
chmod +x /usr/local/lib/web/frontend/static/websockify/run
EXPOSE 80 EXPOSE 80
WORKDIR /root WORKDIR /root

View file

@ -1,4 +1,4 @@
# Built with arch: {{ arch }} flavor: {{ flavor }} image: {{ image }} localbuild: {{localbuild }} # Built with arch: {{ arch }} flavor: {{ flavor }} image: {{ image }}
# #
################################################################################ ################################################################################
# base system # base system
@ -13,9 +13,7 @@ FROM arm32v7/{{image}} as system
COPY --from=amd64 /usr/bin/qemu-arm-static /usr/bin/ COPY --from=amd64 /usr/bin/qemu-arm-static /usr/bin/
{%endif%} {%endif%}
{% if localbuild %} RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list;
RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list;
{% endif %}
# built-in packages # built-in packages
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
@ -29,11 +27,18 @@ RUN apt update \
&& apt autoclean -y \ && apt autoclean -y \
&& apt autoremove -y \ && apt autoremove -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
{%if image == "ubuntu:18.04"%}
ENV X11VNC_VERSION=0.9.16-1
{%else%}
ENV X11VNC_VERSION=0.9.14-1*
# arc-theme
RUN add-apt-repository -y ppa:noobslab/themes
{%endif%}
# install debs error if combine together # install debs error if combine together
RUN add-apt-repository -y ppa:fcwu-tw/apps \ RUN add-apt-repository -y ppa:fcwu-tw/apps \
&& apt update \ && apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \ && apt install -y --no-install-recommends --allow-unauthenticated \
xvfb x11vnc=0.9.16-1 \ xvfb x11vnc=$X11VNC_VERSION \
{%for package in addon_packages%}{{package}} {%endfor%} \ {%for package in addon_packages%}{{package}} {%endfor%} \
&& add-apt-repository -r ppa:fcwu-tw/apps \ && add-apt-repository -r ppa:fcwu-tw/apps \
&& apt autoclean -y \ && apt autoclean -y \
@ -55,6 +60,14 @@ RUN apt update \
&& apt autoremove -y \ && apt autoremove -y \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
{%endif%} {%endif%}
{%if desktop == "xfce4" %}
RUN apt update \
&& apt install -y --no-install-recommends --allow-unauthenticated \
xubuntu-desktop \
&& apt autoclean -y \
&& apt autoremove -y \
&& rm -rf /var/lib/apt/lists/*
{%endif%}
# Additional packages require ~600MB # Additional packages require ~600MB
# libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw # libreoffice pinta language-pack-zh-hant language-pack-gnome-zh-hant firefox-locale-zh-hant libreoffice-l10n-zh-tw
@ -64,11 +77,16 @@ ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-{{arc
RUN chmod +x /bin/tini RUN chmod +x /bin/tini
# ffmpeg # ffmpeg
RUN mkdir -p /usr/local/ffmpeg \ RUN apt update \
&& curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz | tar xJvf - -C /usr/local/ffmpeg/ --strip 1 && apt install -y --no-install-recommends --allow-unauthenticated \
ffmpeg \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir /usr/local/ffmpeg \
&& ln -s /usr/bin/ffmpeg /usr/local/ffmpeg/ffmpeg
# python library # python library
COPY image/usr/local/lib/web/backend/requirements.txt /tmp/ COPY rootfs/usr/local/lib/web/backend/requirements.txt /tmp/
RUN apt-get update \ RUN apt-get update \
&& dpkg-query -W -f='${Package}\n' > /tmp/a.txt \ && dpkg-query -W -f='${Package}\n' > /tmp/a.txt \
&& apt-get install -y python-pip python-dev build-essential \ && apt-get install -y python-pip python-dev build-essential \
@ -86,15 +104,15 @@ RUN apt-get update \
################################################################################ ################################################################################
FROM {{image}} as builder FROM {{image}} as builder
{% if localbuild %} {% if localbuild == 1 %}
RUN sed -i 's#http://archive.ubuntu.com/#http://tw.archive.ubuntu.com/#' /etc/apt/sources.list; RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list;
{% endif %} {% endif %}
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates gnupg patch && apt-get install -y --no-install-recommends curl ca-certificates gnupg patch
# nodejs # nodejs
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - \ RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \
&& apt-get install -y nodejs && apt-get install -y nodejs
# yarn # yarn
@ -107,7 +125,7 @@ RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
COPY web /src/web COPY web /src/web
RUN cd /src/web \ RUN cd /src/web \
&& yarn \ && yarn \
&& npm run build && yarn build
{%if arch == "armhf"%} {%if arch == "armhf"%}
RUN cd /src/web/dist/static/novnc && patch -p0 < /src/web/novnc-armhf-1.patch RUN cd /src/web/dist/static/novnc && patch -p0 < /src/web/novnc-armhf-1.patch
@ -120,7 +138,9 @@ FROM system
LABEL maintainer="fcwu.tw@gmail.com" LABEL maintainer="fcwu.tw@gmail.com"
COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/ COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/
COPY image / COPY rootfs /
RUN ln -sf /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify && \
chmod +x /usr/local/lib/web/frontend/static/websockify/run
EXPOSE 80 EXPOSE 80
WORKDIR /root WORKDIR /root

View file

@ -1,30 +1,46 @@
.PHONY: build run .PHONY: build run
# Default values for variables
REPO ?= dorowu/ubuntu-desktop-lxde-vnc REPO ?= dorowu/ubuntu-desktop-lxde-vnc
TAG ?= latest TAG ?= latest
# you can choose other base image versions
IMAGE ?= ubuntu:18.04 IMAGE ?= ubuntu:18.04
LOCALBUILD ?= tw LOCALBUILD ?= tw
HTTP_PASSWORD ?= 123456 HTTP_PASSWORD ?= 123456
CUSTOM_USER ?= ubuntu CUSTOM_USER ?= ubuntu
PASSWORD ?= ubuntu PASSWORD ?= ubuntu
# choose from supported flavors (see available ones in ./flavors/*.yml)
FLAVOR ?= lxqt FLAVOR ?= lxqt
# armhf or amd64
ARCH ?= amd64 ARCH ?= amd64
templates = Dockerfile image/etc/supervisor/conf.d/supervisord.conf # These files will be generated from teh Jinja templates (.j2 sources)
templates = Dockerfile rootfs/etc/supervisor/conf.d/supervisord.conf
# Rebuild the container image
build: $(templates) build: $(templates)
docker build -t $(REPO):$(TAG) . docker build -t $(REPO):$(TAG) .
# Test run the container
# the local dir will be mounted under /src read-only
run: run:
docker run --rm \ docker run --rm \
-p 6080:80 -p 6081:443 \ -p 6080:80 -p 6081:443 \
-v ${PWD}:/src:ro \ -v ${PWD}:/src:ro \
-e USER=doro -e PASSWORD=mypassword \
-e ALSADEV=hw:2,0 \
-e SSL_PORT=443 \
-e RELATIVE_URL_ROOT=approot \
-v ${PWD}/ssl:/etc/nginx/ssl \
--device /dev/snd \
--name ubuntu-desktop-lxde-test \ --name ubuntu-desktop-lxde-test \
$(REPO):$(TAG) $(REPO):$(TAG)
# Connect inside the running container for debugging
shell: shell:
docker exec -it ubuntu-desktop-lxde-test bash docker exec -it ubuntu-desktop-lxde-test bash
# Generate the SSL/TLS config for HTTPS
gen-ssl: gen-ssl:
mkdir -p ssl mkdir -p ssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \ openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
@ -33,6 +49,11 @@ gen-ssl:
clean: clean:
rm -f $(templates) rm -f $(templates)
extra-clean:
docker rmi $(REPO):$(TAG)
docker image prune -f
# Run jinja2cli to parse Jinja template applying rules defined in the flavors definitions
%: %.j2 flavors/$(FLAVOR).yml %: %.j2 flavors/$(FLAVOR).yml
docker run -v $(shell pwd):/data vikingco/jinja2cli \ docker run -v $(shell pwd):/data vikingco/jinja2cli \
-D flavor=$(FLAVOR) \ -D flavor=$(FLAVOR) \

View file

@ -4,7 +4,7 @@ docker-ubuntu-vnc-desktop
[![Docker Pulls](https://img.shields.io/docker/pulls/dorowu/ubuntu-desktop-lxde-vnc.svg)](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/) [![Docker Pulls](https://img.shields.io/docker/pulls/dorowu/ubuntu-desktop-lxde-vnc.svg)](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/)
[![Docker Stars](https://img.shields.io/docker/stars/dorowu/ubuntu-desktop-lxde-vnc.svg)](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/) [![Docker Stars](https://img.shields.io/docker/stars/dorowu/ubuntu-desktop-lxde-vnc.svg)](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/)
Docker image to provide HTML5 VNC interface to access Ubuntu 16.04 LXDE desktop environment. Docker image to provide HTML5 VNC interface to access a Ubuntu 18.04 LXDE desktop environment.
Quick Start Quick Start
------------------------- -------------------------
@ -12,7 +12,7 @@ Quick Start
Run the docker container and access with port `6080` Run the docker container and access with port `6080`
``` ```
docker run -p 6080:80 dorowu/ubuntu-desktop-lxde-vnc docker run -p 6080:80 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc
``` ```
Browse http://127.0.0.1:6080/ Browse http://127.0.0.1:6080/
@ -34,13 +34,13 @@ VNC Viewer
Forward VNC service port 5900 to host by Forward VNC service port 5900 to host by
``` ```
docker run -p 6080:80 -p 5900:5900 dorowu/ubuntu-desktop-lxde-vnc docker run -p 6080:80 -p 5900:5900 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc
``` ```
Now, open the vnc viewer and connect to port 5900. If you would like to protect vnc service by password, set environment variable `VNC_PASSWORD`, for example Now, open the vnc viewer and connect to port 5900. If you would like to protect vnc service by password, set environment variable `VNC_PASSWORD`, for example
``` ```
docker run -p 6080:80 -p 5900:5900 -e VNC_PASSWORD=mypassword dorowu/ubuntu-desktop-lxde-vnc docker run -p 6080:80 -p 5900:5900 -e VNC_PASSWORD=mypassword -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc
``` ```
A prompt will ask password either in the browser or vnc viewer. A prompt will ask password either in the browser or vnc viewer.
@ -51,7 +51,7 @@ HTTP Base Authentication
This image provides base access authentication of HTTP via `HTTP_PASSWORD` This image provides base access authentication of HTTP via `HTTP_PASSWORD`
``` ```
docker run -p 6080:80 -e HTTP_PASSWORD=mypassword dorowu/ubuntu-desktop-lxde-vnc docker run -p 6080:80 -e HTTP_PASSWORD=mypassword -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc
``` ```
SSL SSL
@ -67,7 +67,7 @@ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ssl/nginx.key -out s
Specify SSL port by `SSL_PORT`, certificate path to `/etc/nginx/ssl`, and forward it to 6081 Specify SSL port by `SSL_PORT`, certificate path to `/etc/nginx/ssl`, and forward it to 6081
``` ```
docker run -p 6081:443 -e SSL_PORT=443 -v ${PWD}/ssl:/etc/nginx/ssl dorowu/ubuntu-desktop-lxde-vnc docker run -p 6081:443 -e SSL_PORT=443 -v ${PWD}/ssl:/etc/nginx/ssl -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc
``` ```
Screen Resolution Screen Resolution
@ -76,7 +76,7 @@ Screen Resolution
The Resolution of virtual desktop adapts browser window size when first connecting the server. You may choose a fixed resolution by passing `RESOLUTION` environment variable, for example The Resolution of virtual desktop adapts browser window size when first connecting the server. You may choose a fixed resolution by passing `RESOLUTION` environment variable, for example
``` ```
docker run -p 6080:80 -e RESOLUTION=1920x1080 dorowu/ubuntu-desktop-lxde-vnc docker run -p 6080:80 -e RESOLUTION=1920x1080 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc
``` ```
Default Desktop User Default Desktop User
@ -85,11 +85,22 @@ Default Desktop User
The default user is `root`. You may change the user and password respectively by `USER` and `PASSWORD` environment variable, for example, The default user is `root`. You may change the user and password respectively by `USER` and `PASSWORD` environment variable, for example,
``` ```
docker run -p 6080:80 -e USER=doro -e PASSWORD=password dorowu/ubuntu-desktop-lxde-vnc docker run -p 6080:80 -e USER=doro -e PASSWORD=password -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc
``` ```
Deploy to a subdirectory (relative url root)
--------------------------------------------
You may deploy this application to a subdirectory, for example `/some-prefix/`. You then can access application by `http://127.0.0.1:6080/some-prefix/`. This can be specified using the `RELATIVE_URL_ROOT` configuration option like this
```
docker run -p 6080:80 -e RELATIVE_URL_ROOT=some-prefix dorowu/ubuntu-desktop-lxde-vnc
```
NOTE: this variable should not have any leading and trailing splash (/)
Sound (Preview version and Linux only) Sound (Preview version and Linux only)
------------------- --------------------------------------
It only works in Linux. It only works in Linux.
@ -122,7 +133,6 @@ Dockerfile and configuration can be generated by template.
- arch: one of `amd64` or `armhf` - arch: one of `amd64` or `armhf`
- flavor: refer to file in flavor/`flavor`.yml - flavor: refer to file in flavor/`flavor`.yml
- image: base image - image: base image
- localbuild: build from local that will use mirror site if set
- desktop: desktop environment which is set in flavor - desktop: desktop environment which is set in flavor
- addon_package: Debian package to be installed which is set in flavor - addon_package: Debian package to be installed which is set in flavor
@ -135,6 +145,8 @@ Troubleshooting and FAQ
2. Multi-language supports, https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/80 2. Multi-language supports, https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/80
3. Autostart, https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/85 3. Autostart, https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/85
4. x11vnc arguments(multiptr), https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/101 4. x11vnc arguments(multiptr), https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/101
5. firefox/chrome crash (/dev/shm), https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/112
6. resize display size without destroying container, https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/115#issuecomment-522426037
License License
================== ==================

2
TODO Normal file
View file

@ -0,0 +1,2 @@
- upgrade frontend packages
- rewrite backend by golang

6
flavors/xfce4.yml Normal file
View file

@ -0,0 +1,6 @@
---
addon_packages:
- vim-tiny
- firefox
- xfce4-terminal
desktop: xfce4

View file

@ -1,46 +0,0 @@
server {
listen 80 default_server;
# listen [::]:80 default_server ipv6only=on;
#_SSL_PORT_#listen 443 ssl default_server;
#_SSL_PORT_#listen [::]:443 ssl default_server ipv6only=on;
#_SSL_PORT_#ssl_certificate /etc/nginx/ssl/nginx.crt;
#_SSL_PORT_#ssl_certificate_key /etc/nginx/ssl/nginx.key;
#_HTTP_PASSWORD_#auth_basic "Private Property";
#_HTTP_PASSWORD_#auth_basic_user_file /etc/nginx/.htpasswd;
root /usr/local/lib/web/frontend/;
index index.html index.htm;
location ~ ^/api {
try_files $uri @api;
}
location = /websockify {
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_buffering off;
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
proxy_pass http://127.0.0.1:6081;
}
location @api {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:6079;
max_ranges 0;
}
location @proxy {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:6081;
max_ranges 0;
}
}

View file

@ -1,3 +0,0 @@
#!/bin/sh
exec /usr/bin/Xvfb :1 -screen 0 1024x768x16

View file

@ -1,20 +0,0 @@
backports.ssl-match-hostname==3.5.0.1
certifi==2018.1.18
chardet==3.0.4
click==6.7
Flask==1.0.2
Flask-Login==0.4.1
gevent==1.2.2
gevent-websocket==0.10.1
greenlet==0.4.13
idna==2.6
itsdangerous==0.24
Jinja2==2.10
MarkupSafe==1.0
meld3==1.0.2
requests==2.20.1
six==1.11.0
supervisor==3.2.0
urllib3==1.23
websocket-client==0.47.0
Werkzeug==0.14.1

View file

@ -0,0 +1,50 @@
server {
listen 80 default_server;
# listen [::]:80 default_server ipv6only=on;
#_SSL_PORT_#listen 443 ssl default_server;
#_SSL_PORT_#listen [::]:443 ssl default_server ipv6only=on;
#_SSL_PORT_#ssl_certificate /etc/nginx/ssl/nginx.crt;
#_SSL_PORT_#ssl_certificate_key /etc/nginx/ssl/nginx.key;
#_HTTP_PASSWORD_#auth_basic "Private Property";
#_HTTP_PASSWORD_#auth_basic_user_file /etc/nginx/.htpasswd;
root /usr/local/lib/web/frontend/;
index index.html index.htm;
location ~ /api/ {
try_files $uri @api;
}
location ~ /resize$ {
try_files $uri @api;
}
#_RELATIVE_URL_ROOT_location /_RELATIVE_URL_ROOT_/ {
#_RELATIVE_URL_ROOT_ rewrite /_RELATIVE_URL_ROOT_/(.*) /$1 break;
#_RELATIVE_URL_ROOT_ root /usr/local/lib/web/frontend/;
#_RELATIVE_URL_ROOT_}
location ~ /websockify$ {
#_RELATIVE_URL_ROOT_rewrite /_RELATIVE_URL_ROOT_/(.*) $1 break;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_buffering off;
proxy_connect_timeout 7d;
proxy_send_timeout 7d;
proxy_read_timeout 7d;
proxy_pass http://127.0.0.1:6081;
}
location @api {
#_RELATIVE_URL_ROOT_rewrite /_RELATIVE_URL_ROOT_/(.*) $1 break;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:6079;
max_ranges 0;
}
}

View file

@ -44,6 +44,8 @@ environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%"
[program:xvfb] [program:xvfb]
priority=10 priority=10
command=/usr/local/bin/xvfb.sh command=/usr/local/bin/xvfb.sh

View file

@ -58,6 +58,18 @@ user=%USER%
environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%" environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%"
{% endif %} {% endif %}
{% if desktop == "xfce4" %}
[group:x]
programs=xvfb,lxpanel,x11vnc,novnc
[program:lxpanel]
priority=15
directory=%HOME%
command=/usr/bin/startxfce4
user=%USER%
environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%"
{% endif %}
[program:xvfb] [program:xvfb]
priority=10 priority=10
command=/usr/local/bin/xvfb.sh command=/usr/local/bin/xvfb.sh

View file

@ -34,13 +34,14 @@ if [ "$USER" != "root" ]; then
cp -r /root/{.config,.gtkrc-2.0,.asoundrc} ${HOME} cp -r /root/{.config,.gtkrc-2.0,.asoundrc} ${HOME}
[ -d "/dev/snd" ] && chgrp -R adm /dev/snd [ -d "/dev/snd" ] && chgrp -R adm /dev/snd
fi fi
sed -i "s|%USER%|$USER|" /etc/supervisor/conf.d/supervisord.conf sed -i -e "s|%USER%|$USER|" -e "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf
sed -i "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf
# home folder # home folder
if [ ! -x "$HOME/.config/pcmanfm/LXDE/" ]; then
mkdir -p $HOME/.config/pcmanfm/LXDE/ mkdir -p $HOME/.config/pcmanfm/LXDE/
ln -sf /usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf $HOME/.config/pcmanfm/LXDE/ ln -sf /usr/local/share/doro-lxde-wallpapers/desktop-items-0.conf $HOME/.config/pcmanfm/LXDE/
chown -R $USER:$USER $HOME chown -R $USER:$USER $HOME
fi
# nginx workers # nginx workers
sed -i 's|worker_processes .*|worker_processes 1;|' /etc/nginx/nginx.conf sed -i 's|worker_processes .*|worker_processes 1;|' /etc/nginx/nginx.conf
@ -59,12 +60,15 @@ if [ -n "$HTTP_PASSWORD" ]; then
sed -i 's|#_HTTP_PASSWORD_#||' /etc/nginx/sites-enabled/default sed -i 's|#_HTTP_PASSWORD_#||' /etc/nginx/sites-enabled/default
fi fi
# novnc websockify # dynamic prefix path renaming
ln -s /usr/local/lib/web/frontend/static/websockify /usr/local/lib/web/frontend/static/novnc/utils/websockify if [ -n "$RELATIVE_URL_ROOT" ]; then
chmod +x /usr/local/lib/web/frontend/static/websockify/run echo "* enable RELATIVE_URL_ROOT: $RELATIVE_URL_ROOT"
sed -i 's|#_RELATIVE_URL_ROOT_||' /etc/nginx/sites-enabled/default
sed -i 's|_RELATIVE_URL_ROOT_|'$RELATIVE_URL_ROOT'|' /etc/nginx/sites-enabled/default
fi
# clearup # clearup
PASSWORD= PASSWORD=
HTTP_PASSWORD= HTTP_PASSWORD=
exec /bin/tini -- /usr/bin/supervisord -n -c /etc/supervisor/supervisord.conf exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf

3
rootfs/usr/local/bin/xvfb.sh Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
exec /usr/bin/Xvfb :1 -screen 0 1024x768x24

View file

@ -0,0 +1,20 @@
backports.ssl-match-hostname==3.7.0.1
certifi==2019.9.11
chardet==3.0.4
Click==7.0
Flask==1.1.1
Flask-Login==0.4.1
gevent==1.4.0
gevent-websocket==0.10.1
greenlet==0.4.15
idna==2.8
itsdangerous==1.1.0
Jinja2==2.10.3
MarkupSafe==1.1.1
meld3==2.0.0
requests==2.22.0
six==1.12.0
supervisor==4.1.0
urllib3==1.25.6
websocket-client==0.47.0
Werkzeug==0.16.0

View file

@ -74,7 +74,7 @@ def main():
def run_server(): def run_server():
import socket import socket
from gevent.wsgi import WSGIServer from gevent.pywsgi import WSGIServer
from vnc.app import app from vnc.app import app
# websocket conflict: WebSocketHandler # websocket conflict: WebSocketHandler
@ -114,6 +114,7 @@ def main():
) )
logging.getLogger("werkzeug").setLevel(logging.WARNING) logging.getLogger("werkzeug").setLevel(logging.WARNING)
log = logging.getLogger('novnc2') log = logging.getLogger('novnc2')
entrypoint() entrypoint()

View file

@ -2,7 +2,7 @@ from __future__ import (
absolute_import, division, print_function, with_statement absolute_import, division, print_function, with_statement
) )
import re import re
from os import environ import os
from flask import ( from flask import (
Flask, Flask,
request, request,
@ -21,7 +21,7 @@ from .log import log
# Flask app # Flask app
app = Flask('novnc2') app = Flask('novnc2')
app.config.from_object('config.Default') app.config.from_object('config.Default')
app.config.from_object(environ.get('CONFIG') or 'config.Development') app.config.from_object(os.environ.get('CONFIG') or 'config.Development')
@app.route('/api/state') @app.route('/api/state')
@ -47,8 +47,8 @@ def apihealth():
def reset(): def reset():
if 'w' in request.args and 'h' in request.args: if 'w' in request.args and 'h' in request.args:
args = { args = {
'w': request.args.get('w'), 'w': int(request.args.get('w')),
'h': request.args.get('h'), 'h': int(request.args.get('h')),
} }
state.set_size(args['w'], args['h']) state.set_size(args['w'], args['h'])
@ -68,6 +68,13 @@ def reset():
return jsonify({'code': 200}) return jsonify({'code': 200})
@app.route('/resize')
@httperror
def apiresize():
state.reset_size()
return '<html><head><script type = "text/javascript">var h=window.location.href;window.location.href=h.substring(0,h.length-6);</script></head></html>'
@app.route('/api/live.flv') @app.route('/api/live.flv')
@httperror @httperror
def liveflv(): def liveflv():

View file

@ -113,6 +113,9 @@ class State(object):
except gsp.CalledProcessError as e: except gsp.CalledProcessError as e:
log.warn('failed to get dispaly size: ' + str(e)) log.warn('failed to get dispaly size: ' + str(e))
def reset_size(self):
self.size_changed_count = 0
@property @property
def w(self): def w(self):
return self._w return self._w

View file

Before

Width:  |  Height:  |  Size: 339 KiB

After

Width:  |  Height:  |  Size: 339 KiB

View file

Before

Width:  |  Height:  |  Size: 527 KiB

After

Width:  |  Height:  |  Size: 527 KiB

View file

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 246 KiB

View file

Before

Width:  |  Height:  |  Size: 870 KiB

After

Width:  |  Height:  |  Size: 870 KiB

View file

@ -3,5 +3,6 @@ const merge = require('webpack-merge')
const prodEnv = require('./prod.env') const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, { module.exports = merge(prodEnv, {
NODE_ENV: '"development"' NODE_ENV: '"development"',
PREFIX_PATH: `"${process.env.PREFIX_PATH}"`
}) })

View file

@ -10,7 +10,7 @@ module.exports = {
// Paths // Paths
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: '/', assetsPublicPath: './',
proxyTable: { proxyTable: {
'/api': { '/api': {
target: BACKEND, target: BACKEND,
@ -63,7 +63,7 @@ module.exports = {
// Paths // Paths
assetsRoot: path.resolve(__dirname, '../dist'), assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static', assetsSubDirectory: 'static',
assetsPublicPath: '/', assetsPublicPath: './',
/** /**
* Source Maps * Source Maps

View file

@ -1,4 +1,5 @@
'use strict' 'use strict'
module.exports = { module.exports = {
NODE_ENV: '"production"' NODE_ENV: '"production"',
PREFIX_PATH: `"${process.env.PREFIX_PATH}"`
} }

View file

@ -67,6 +67,7 @@
"vue-template-compiler": "^2.5.2", "vue-template-compiler": "^2.5.2",
"webpack": "^3.6.0", "webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0", "webpack-bundle-analyzer": "^2.9.0",
"webpack-cli": "^3.3.7",
"webpack-dev-server": "^3.2.1", "webpack-dev-server": "^3.2.1",
"webpack-merge": "^4.1.0" "webpack-merge": "^4.1.0"
}, },

View file

@ -136,6 +136,7 @@ export default {
// console.trace() // console.trace()
console.log(`connecting...`) console.log(`connecting...`)
this.errorMessage = '' this.errorMessage = ''
let websockifyPath = 'websockify'
if (force || this.vncState === 'stopped') { if (force || this.vncState === 'stopped') {
this.vncState = 'connecting' this.vncState = 'connecting'
let hostname = window.location.hostname let hostname = window.location.hostname
@ -146,7 +147,7 @@ export default {
let url = 'static/vnc.html?' let url = 'static/vnc.html?'
url += 'autoconnect=1&' url += 'autoconnect=1&'
url += `host=${hostname}&port=${port}&` url += `host=${hostname}&port=${port}&`
url += `path=websockify&title=novnc2&` url += `path=${websockifyPath}&title=novnc2&`
url += `logging=warn` url += `logging=warn`
this.$refs.vncFrame.setAttribute('src', url) this.$refs.vncFrame.setAttribute('src', url)
} }

View file

@ -5,6 +5,8 @@ import Vnc from '@/components/Vnc'
Vue.use(Router) Vue.use(Router)
export default new Router({ export default new Router({
mode: 'history',
base: window.location.pathname,
routes: [ routes: [
{ {
path: '/', path: '/',

@ -1 +1 @@
Subproject commit 35dd3c2299b3e13e2b57a2a34be723fb01014ee3 Subproject commit 9fe2fd04d4eeda0d5a360009453861803ba0ca84

File diff suppressed because one or more lines are too long

View file

@ -32,7 +32,7 @@
</head> </head>
<body> <body>
<div id="mainContainer" class="mainContainer"> <div id="mainContainer" class="mainContainer">
<video name="videoElement" class="centeredVideo" autoplay width="1024" height="576"> <video name="videoElement" class="centeredVideo" width="1024" height="576">
Your browser is too old which doesn't support HTML5 video. Your browser is too old which doesn't support HTML5 video.
</video> </video>
<br> <br>
@ -70,7 +70,24 @@
}, { isLive: true, enableStashBuffer: false }); }, { isLive: true, enableStashBuffer: false });
flvPlayer.attachMediaElement(videoElement); flvPlayer.attachMediaElement(videoElement);
flvPlayer.load(); flvPlayer.load();
flvPlayer.play(); function f() {
try {
// flvPlayer.play();
var playPromise = videoElement.play();
if (playPromise !== undefined) {
playPromise.then(_ => {
console.log("play successfully");
}).catch(error => {
// console.log(error);
setTimeout(f, 10)
});
} else {
// console.log('undefined');
setTimeout(f, 10)
}
} catch (e) { console.log(e); }
}
videoElement.addEventListener('canplay', function (e) { setTimeout(f, 0); });
flvPlayer.on("error", function () { flvPlayer.on("error", function () {
window.location.reload(); window.location.reload();
}); });

View file

@ -1,12 +1,10 @@
<!DOCTYPE html> <!DOCTYPE html>
<html class="noVNC_loading"> <html lang="en" class="noVNC_loading">
<head> <head>
<!-- <!--
noVNC example: simple example using default UI noVNC example: simple example using default UI
Copyright (C) 2012 Joel Martin Copyright (C) 2018 The noVNC Authors
Copyright (C) 2016 Samuel Mannehed for Cendio AB
Copyright (C) 2016 Pierre Ossman for Cendio AB
noVNC is licensed under the MPL 2.0 (see LICENSE.txt) noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
This file is licensed under the 2-Clause BSD license (see LICENSE.txt). This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
@ -17,13 +15,9 @@
--> -->
<title>noVNC</title> <title>noVNC</title>
<meta charset="utf-8" /> <meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame <!-- Icons (see app/images/icons/Makefile for what the sizes are for) -->
Remove this if you use the .htaccess -->
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<!-- Icons (see Makefile for what the sizes are for) -->
<link rel="icon" sizes="16x16" type="image/png" href="novnc/app/images/icons/novnc-16x16.png"> <link rel="icon" sizes="16x16" type="image/png" href="novnc/app/images/icons/novnc-16x16.png">
<link rel="icon" sizes="24x24" type="image/png" href="novnc/app/images/icons/novnc-24x24.png"> <link rel="icon" sizes="24x24" type="image/png" href="novnc/app/images/icons/novnc-24x24.png">
<link rel="icon" sizes="32x32" type="image/png" href="novnc/app/images/icons/novnc-32x32.png"> <link rel="icon" sizes="32x32" type="image/png" href="novnc/app/images/icons/novnc-32x32.png">
@ -38,31 +32,26 @@
<link rel="icon" sizes="152x152" type="image/png" href="novnc/app/images/icons/novnc-152x152.png"> <link rel="icon" sizes="152x152" type="image/png" href="novnc/app/images/icons/novnc-152x152.png">
<link rel="icon" sizes="192x192" type="image/png" href="novnc/app/images/icons/novnc-192x192.png"> <link rel="icon" sizes="192x192" type="image/png" href="novnc/app/images/icons/novnc-192x192.png">
<!-- Firefox currently mishandles SVG, see #1419039 <!-- Firefox currently mishandles SVG, see #1419039
<link rel="icon" sizes="any" type="image/svg+xml" href="app/images/icons/novnc-icon.svg"> <link rel="icon" sizes="any" type="image/svg+xml" href="novnc/app/images/icons/novnc-icon.svg">
--> -->
<!-- Repeated last so that legacy handling will pick this --> <!-- Repeated last so that legacy handling will pick this -->
<link rel="icon" sizes="16x16" type="image/png" href="novnc/app/images/icons/novnc-16x16.png"> <link rel="icon" sizes="16x16" type="image/png" href="novnc/app/images/icons/novnc-16x16.png">
<!-- Apple iOS Safari settings --> <!-- Apple iOS Safari settings -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes" /> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Home Screen Icons (favourites and bookmarks use the normal icons) --> <!-- Home Screen Icons (favourites and bookmarks use the normal icons) -->
<link rel="apple-touch-icon" sizes="60x60" type="novnc/image/png" href="novnc/app/images/icons/novnc-60x60.png"> <link rel="apple-touch-icon" sizes="60x60" type="image/png" href="novnc/app/images/icons/novnc-60x60.png">
<link rel="apple-touch-icon" sizes="76x76" type="novnc/image/png" href="novnc/app/images/icons/novnc-76x76.png"> <link rel="apple-touch-icon" sizes="76x76" type="image/png" href="novnc/app/images/icons/novnc-76x76.png">
<link rel="apple-touch-icon" sizes="120x120" type="novnc/image/png" href="novnc/app/images/icons/novnc-120x120.png"> <link rel="apple-touch-icon" sizes="120x120" type="image/png" href="novnc/app/images/icons/novnc-120x120.png">
<link rel="apple-touch-icon" sizes="152x152" type="novnc/image/png" href="novnc/app/images/icons/novnc-152x152.png"> <link rel="apple-touch-icon" sizes="152x152" type="image/png" href="novnc/app/images/icons/novnc-152x152.png">
<!-- Stylesheets --> <!-- Stylesheets -->
<link rel="stylesheet" href="novnc/app/styles/base.css" /> <link rel="stylesheet" href="novnc/app/styles/base.css">
<!--
<script type='text/javascript'
src='http://getfirebug.com/releases/lite/1.2/firebug-lite-compressed.js'></script>
-->
<!-- this is included as a normal file in order to catch script-loading errors as well --> <!-- this is included as a normal file in order to catch script-loading errors as well -->
<script type="text/javascript" src="novnc/app/error-handler.js"></script> <script src="novnc/app/error-handler.js"></script>
<!-- begin scripts --> <!-- begin scripts -->
<!-- promise polyfills promises for IE11 --> <!-- promise polyfills promises for IE11 -->
@ -102,54 +91,56 @@
<div class="noVNC_scroll"> <div class="noVNC_scroll">
<h1 class="noVNC_logo" translate="no"><span>no</span><br />VNC</h1> <h1 class="noVNC_logo" translate="no"><span>no</span><br>VNC</h1>
<!-- Drag/Pan the viewport --> <!-- Drag/Pan the viewport -->
<input type="image" alt="viewport drag" src="novnc/app/images/drag.svg" <input type="image" alt="viewport drag" src="novnc/app/images/drag.svg"
id="noVNC_view_drag_button" class="noVNC_button noVNC_hidden" id="noVNC_view_drag_button" class="noVNC_button noVNC_hidden"
title="Move/Drag Viewport" /> title="Move/Drag Viewport">
<!--noVNC Touch Device only buttons--> <!--noVNC Touch Device only buttons-->
<div id="noVNC_mobile_buttons"> <div id="noVNC_mobile_buttons">
<input type="image" alt="No mousebutton" src="novnc/app/images/mouse_none.svg" <input type="image" alt="No mousebutton" src="novnc/app/images/mouse_none.svg"
id="noVNC_mouse_button0" class="noVNC_button" id="noVNC_mouse_button0" class="noVNC_button"
title="Active Mouse Button"/> title="Active Mouse Button">
<input type="image" alt="Left mousebutton" src="novnc/app/images/mouse_left.svg" <input type="image" alt="Left mousebutton" src="novnc/app/images/mouse_left.svg"
id="noVNC_mouse_button1" class="noVNC_button" id="noVNC_mouse_button1" class="noVNC_button"
title="Active Mouse Button"/> title="Active Mouse Button">
<input type="image" alt="Middle mousebutton" src="novnc/app/images/mouse_middle.svg" <input type="image" alt="Middle mousebutton" src="novnc/app/images/mouse_middle.svg"
id="noVNC_mouse_button2" class="noVNC_button" id="noVNC_mouse_button2" class="noVNC_button"
title="Active Mouse Button"/> title="Active Mouse Button">
<input type="image" alt="Right mousebutton" src="novnc/app/images/mouse_right.svg" <input type="image" alt="Right mousebutton" src="novnc/app/images/mouse_right.svg"
id="noVNC_mouse_button4" class="noVNC_button" id="noVNC_mouse_button4" class="noVNC_button"
title="Active Mouse Button"/> title="Active Mouse Button">
<input type="image" alt="Keyboard" src="novnc/app/images/keyboard.svg" <input type="image" alt="Keyboard" src="novnc/app/images/keyboard.svg"
id="noVNC_keyboard_button" class="noVNC_button" id="noVNC_keyboard_button" class="noVNC_button" title="Show Keyboard">
value="Keyboard" title="Show Keyboard" />
</div> </div>
<!-- Extra manual keys --> <!-- Extra manual keys -->
<div id="noVNC_extra_keys"> <div id="noVNC_extra_keys">
<input type="image" alt="Extra keys" src="novnc/app/images/toggleextrakeys.svg" <input type="image" alt="Extra keys" src="novnc/app/images/toggleextrakeys.svg"
id="noVNC_toggle_extra_keys_button" class="noVNC_button" id="noVNC_toggle_extra_keys_button" class="noVNC_button"
title="Show Extra Keys"/> title="Show Extra Keys">
<div class="noVNC_vcenter"> <div class="noVNC_vcenter">
<div id="noVNC_modifiers" class="noVNC_panel"> <div id="noVNC_modifiers" class="noVNC_panel">
<input type="image" alt="Ctrl" src="novnc/app/images/ctrl.svg" <input type="image" alt="Ctrl" src="novnc/app/images/ctrl.svg"
id="noVNC_toggle_ctrl_button" class="noVNC_button" id="noVNC_toggle_ctrl_button" class="noVNC_button"
title="Toggle Ctrl"/> title="Toggle Ctrl">
<input type="image" alt="Alt" src="novnc/app/images/alt.svg" <input type="image" alt="Alt" src="novnc/app/images/alt.svg"
id="noVNC_toggle_alt_button" class="noVNC_button" id="noVNC_toggle_alt_button" class="noVNC_button"
title="Toggle Alt"/> title="Toggle Alt">
<input type="image" alt="Windows" src="novnc/app/images/windows.svg"
id="noVNC_toggle_windows_button" class="noVNC_button"
title="Toggle Windows">
<input type="image" alt="Tab" src="novnc/app/images/tab.svg" <input type="image" alt="Tab" src="novnc/app/images/tab.svg"
id="noVNC_send_tab_button" class="noVNC_button" id="noVNC_send_tab_button" class="noVNC_button"
title="Send Tab"/> title="Send Tab">
<input type="image" alt="Esc" src="novnc/app/images/esc.svg" <input type="image" alt="Esc" src="novnc/app/images/esc.svg"
id="noVNC_send_esc_button" class="noVNC_button" id="noVNC_send_esc_button" class="noVNC_button"
title="Send Escape"/> title="Send Escape">
<input type="image" alt="Ctrl+Alt+Del" src="novnc/app/images/ctrlaltdel.svg" <input type="image" alt="Ctrl+Alt+Del" src="novnc/app/images/ctrlaltdel.svg"
id="noVNC_send_ctrl_alt_del_button" class="noVNC_button" id="noVNC_send_ctrl_alt_del_button" class="noVNC_button"
title="Send Ctrl-Alt-Del" /> title="Send Ctrl-Alt-Del">
</div> </div>
</div> </div>
</div> </div>
@ -157,58 +148,58 @@
<!-- Shutdown/Reboot --> <!-- Shutdown/Reboot -->
<input type="image" alt="Shutdown/Reboot" src="novnc/app/images/power.svg" <input type="image" alt="Shutdown/Reboot" src="novnc/app/images/power.svg"
id="noVNC_power_button" class="noVNC_button" id="noVNC_power_button" class="noVNC_button"
title="Shutdown/Reboot..." /> title="Shutdown/Reboot...">
<div class="noVNC_vcenter"> <div class="noVNC_vcenter">
<div id="noVNC_power" class="noVNC_panel"> <div id="noVNC_power" class="noVNC_panel">
<div class="noVNC_heading"> <div class="noVNC_heading">
<img src="novnc/app/images/power.svg"> Power <img alt="" src="novnc/app/images/power.svg"> Power
</div> </div>
<input type="button" id="noVNC_shutdown_button" value="Shutdown" /> <input type="button" id="noVNC_shutdown_button" value="Shutdown">
<input type="button" id="noVNC_reboot_button" value="Reboot" /> <input type="button" id="noVNC_reboot_button" value="Reboot">
<input type="button" id="noVNC_reset_button" value="Reset" /> <input type="button" id="noVNC_reset_button" value="Reset">
</div> </div>
</div> </div>
<!-- Clipboard --> <!-- Clipboard -->
<input type="image" alt="Clipboard" src="novnc/app/images/clipboard.svg" <input type="image" alt="Clipboard" src="novnc/app/images/clipboard.svg"
id="noVNC_clipboard_button" class="noVNC_button" id="noVNC_clipboard_button" class="noVNC_button"
title="Clipboard" /> title="Clipboard">
<div class="noVNC_vcenter"> <div class="noVNC_vcenter">
<div id="noVNC_clipboard" class="noVNC_panel"> <div id="noVNC_clipboard" class="noVNC_panel">
<div class="noVNC_heading"> <div class="noVNC_heading">
<img src="novnc/app/images/clipboard.svg"> Clipboard <img alt="" src="novnc/app/images/clipboard.svg"> Clipboard
</div> </div>
<textarea id="noVNC_clipboard_text" rows=5></textarea> <textarea id="noVNC_clipboard_text" rows=5></textarea>
<br /> <br>
<input id="noVNC_clipboard_clear_button" type="button" <input id="noVNC_clipboard_clear_button" type="button"
value="Clear" class="noVNC_submit" /> value="Clear" class="noVNC_submit">
</div> </div>
</div> </div>
<!-- Toggle fullscreen --> <!-- Toggle fullscreen -->
<input type="image" alt="Fullscreen" src="novnc/app/images/fullscreen.svg" <input type="image" alt="Fullscreen" src="novnc/app/images/fullscreen.svg"
id="noVNC_fullscreen_button" class="noVNC_button noVNC_hidden" id="noVNC_fullscreen_button" class="noVNC_button noVNC_hidden"
title="Fullscreen" /> title="Fullscreen">
<!-- Settings --> <!-- Settings -->
<input type="image" alt="Settings" src="novnc/app/images/settings.svg" <input type="image" alt="Settings" src="novnc/app/images/settings.svg"
id="noVNC_settings_button" class="noVNC_button" id="noVNC_settings_button" class="noVNC_button"
title="Settings" /> title="Settings">
<div class="noVNC_vcenter"> <div class="noVNC_vcenter">
<div id="noVNC_settings" class="noVNC_panel"> <div id="noVNC_settings" class="noVNC_panel">
<ul> <ul>
<li class="noVNC_heading"> <li class="noVNC_heading">
<img src="novnc/app/images/settings.svg"> Settings <img alt="" src="novnc/app/images/settings.svg"> Settings
</li> </li>
<li> <li>
<label><input id="noVNC_setting_shared" type="checkbox" /> Shared Mode</label> <label><input id="noVNC_setting_shared" type="checkbox"> Shared Mode</label>
</li> </li>
<li> <li>
<label><input id="noVNC_setting_view_only" type="checkbox" /> View Only</label> <label><input id="noVNC_setting_view_only" type="checkbox"> View Only</label>
</li> </li>
<li><hr></li> <li><hr></li>
<li> <li>
<label><input id="noVNC_setting_view_clip" type="checkbox" /> Clip to Window</label> <label><input id="noVNC_setting_view_clip" type="checkbox"> Clip to Window</label>
</li> </li>
<li> <li>
<label for="noVNC_setting_resize">Scaling Mode:</label> <label for="noVNC_setting_resize">Scaling Mode:</label>
@ -224,35 +215,39 @@
<div><ul> <div><ul>
<li> <li>
<label for="noVNC_setting_repeaterID">Repeater ID:</label> <label for="noVNC_setting_repeaterID">Repeater ID:</label>
<input id="noVNC_setting_repeaterID" type="input" value="" /> <input id="noVNC_setting_repeaterID" type="text" value="">
</li> </li>
<li> <li>
<div class="noVNC_expander">WebSocket</div> <div class="noVNC_expander">WebSocket</div>
<div><ul> <div><ul>
<li> <li>
<label><input id="noVNC_setting_encrypt" type="checkbox" /> Encrypt</label> <label><input id="noVNC_setting_encrypt" type="checkbox"> Encrypt</label>
</li> </li>
<li> <li>
<label for="noVNC_setting_host">Host:</label> <label for="noVNC_setting_host">Host:</label>
<input id="noVNC_setting_host" /> <input id="noVNC_setting_host">
</li> </li>
<li> <li>
<label for="noVNC_setting_port">Port:</label> <label for="noVNC_setting_port">Port:</label>
<input id="noVNC_setting_port" type="number" /> <input id="noVNC_setting_port" type="number">
</li> </li>
<li> <li>
<label for="noVNC_setting_path">Path:</label> <label for="noVNC_setting_path">Path:</label>
<input id="noVNC_setting_path" type="input" value="websockify" /> <input id="noVNC_setting_path" type="text" value="websockify">
</li> </li>
</ul></div> </ul></div>
</li> </li>
<li><hr></li> <li><hr></li>
<li> <li>
<label><input id="noVNC_setting_reconnect" type="checkbox" /> Automatic Reconnect</label> <label><input id="noVNC_setting_reconnect" type="checkbox"> Automatic Reconnect</label>
</li> </li>
<li> <li>
<label for="noVNC_setting_reconnect_delay">Reconnect Delay (ms):</label> <label for="noVNC_setting_reconnect_delay">Reconnect Delay (ms):</label>
<input id="noVNC_setting_reconnect_delay" type="number" /> <input id="noVNC_setting_reconnect_delay" type="number">
</li>
<li><hr></li>
<li>
<label><input id="noVNC_setting_show_dot" type="checkbox" checked> Show Dot when No Cursor</label>
</li> </li>
<li><hr></li> <li><hr></li>
<!-- Logging selection dropdown --> <!-- Logging selection dropdown -->
@ -271,7 +266,7 @@
<!-- Connection Controls --> <!-- Connection Controls -->
<input type="image" alt="Disconnect" src="novnc/app/images/disconnect.svg" <input type="image" alt="Disconnect" src="novnc/app/images/disconnect.svg"
id="noVNC_disconnect_button" class="noVNC_button" id="noVNC_disconnect_button" class="noVNC_button"
title="Disconnect" /> title="Disconnect">
</div> </div>
</div> </div>
@ -288,7 +283,7 @@
<div id="noVNC_connect_dlg"> <div id="noVNC_connect_dlg">
<div class="noVNC_logo" translate="no"><span>no</span>VNC</div> <div class="noVNC_logo" translate="no"><span>no</span>VNC</div>
<div id="noVNC_connect_button"><div> <div id="noVNC_connect_button"><div>
<img src="novnc/app/images/connect.svg"> Connect <img alt="" src="novnc/app/images/connect.svg"> Connect
</div></div> </div></div>
</div> </div>
</div> </div>
@ -299,10 +294,10 @@
<ul> <ul>
<li> <li>
<label>Password:</label> <label>Password:</label>
<input id="noVNC_password_input" type="password" /> <input id="noVNC_password_input" type="password">
</li> </li>
<li> <li>
<input id="noVNC_password_button" type="submit" value="Send Password" class="noVNC_submit" /> <input id="noVNC_password_button" type="submit" value="Send Password" class="noVNC_submit">
</li> </li>
</ul> </ul>
</form></div> </form></div>
@ -312,7 +307,7 @@
<div id="noVNC_transition"> <div id="noVNC_transition">
<div id="noVNC_transition_text"></div> <div id="noVNC_transition_text"></div>
<div> <div>
<input type="button" id="noVNC_cancel_reconnect_button" value="Cancel" class="noVNC_submit" /> <input type="button" id="noVNC_cancel_reconnect_button" value="Cancel" class="noVNC_submit">
</div> </div>
<div class="noVNC_spinner"></div> <div class="noVNC_spinner"></div>
</div> </div>
@ -324,8 +319,7 @@
on-screen keyboard. Let's hope Chrome implements the ime-mode on-screen keyboard. Let's hope Chrome implements the ime-mode
style for example --> style for example -->
<textarea id="noVNC_keyboardinput" autocapitalize="off" <textarea id="noVNC_keyboardinput" autocapitalize="off"
autocorrect="off" autocomplete="off" spellcheck="false" autocomplete="off" spellcheck="false" tabindex="-1"></textarea>
mozactionhint="Enter" tabindex="-1"></textarea>
</div> </div>
<audio id="noVNC_bell"> <audio id="noVNC_bell">
@ -339,13 +333,13 @@
setTimeout(f, 1000); setTimeout(f, 1000);
} else { } else {
UI.rfb.addEventListener('connect', function(event) { UI.rfb.addEventListener('connect', function(event) {
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'connectedd'}), '*'); window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'connected'}), '*');
UI.rfb._display.defaultCursor(); // UI.rfb._display.defaultCursor();
// console.log(UI.connected) // console.log(UI.connected)
// console.log(event); // console.log(event);
}); });
UI.rfb.addEventListener('disconnect', function(event) { UI.rfb.addEventListener('disconnect', function(event) {
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'disconneccted'}), '*'); window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'disconnected'}), '*');
}); });
// console.log(UI.rfb._rfb_connection_state); // console.log(UI.rfb._rfb_connection_state);
} }

File diff suppressed because it is too large Load diff