Compare commits
108 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
e4922ce92f | |
|
|
402ae8480e | |
|
|
2af5a6de3d | |
|
|
fc062fd475 | |
|
|
7cc73c0903 | |
|
|
534231c44b | |
|
|
4bf2bab0e4 | |
|
|
51c11693b8 | |
|
|
6b473f3409 | |
|
|
ba08e79a0a | |
|
|
7dbf4dcfa7 | |
|
|
ed863976d8 | |
|
|
09a4c478a5 | |
|
|
8d323eca97 | |
|
|
cd4ba0b05d | |
|
|
9a06ac1255 | |
|
|
58213d8593 | |
|
|
75c5f5549f | |
|
|
8e6e37e097 | |
|
|
d58b5c2f22 | |
|
|
c41043bec9 | |
|
|
245ac95552 | |
|
|
c571aa57bf | |
|
|
beb25ee06a | |
|
|
3c7b6dd70c | |
|
|
12a80b7c53 | |
|
|
9d7362e87c | |
|
|
ae4e571be3 | |
|
|
c3bce99da9 | |
|
|
0e70047bdc | |
|
|
2bd60c0f88 | |
|
|
5ab34a8aef | |
|
|
2ceb2a1574 | |
|
|
60f4d82a65 | |
|
|
73349836cb | |
|
|
2ba96474d7 | |
|
|
60f9ae18e7 | |
|
|
7ee6c9175f | |
|
|
0c38539444 | |
|
|
e885d558a8 | |
|
|
9bf4a1bda4 | |
|
|
5975c36dc7 | |
|
|
34ca3dc9c9 | |
|
|
ee4b0bf9ec | |
|
|
e457b2dbab | |
|
|
9505dead57 | |
|
|
0552617a5b | |
|
|
1affc9183a | |
|
|
d4d3f867d5 | |
|
|
fb28d897fc | |
|
|
9b94a2fbeb | |
|
|
0cb3248487 | |
|
|
fe7954da78 | |
|
|
1d5e9f6dca | |
|
|
328e8f1aa1 | |
|
|
b0ece0637c | |
|
|
f48e7551f4 | |
|
|
175d7a8517 | |
|
|
f26fe29012 | |
|
|
1c3f34aa6e | |
|
|
c85026298e | |
|
|
5e9ff11764 | |
|
|
9d7e06c824 | |
|
|
2ba8a28748 | |
|
|
d50463920d | |
|
|
59822970a7 | |
|
|
034a4876f4 | |
|
|
b7ee1c3f5c | |
|
|
eef40af3a4 | |
|
|
a4c6b2b9aa | |
|
|
5c9261d592 | |
|
|
2280e040d0 | |
|
|
68887af903 | |
|
|
334325ec3c | |
|
|
35d0080b79 | |
|
|
588b38ca03 | |
|
|
10423e2ce4 | |
|
|
213ca63e7e | |
|
|
f9ae9a3337 | |
|
|
548a511a54 | |
|
|
5088c5af01 | |
|
|
ed74dcda84 | |
|
|
8f3a5ceb42 | |
|
|
99ceecbf0e | |
|
|
f1d608d92c | |
|
|
0adc0da8e8 | |
|
|
e6441d418a | |
|
|
6d8a4b2569 | |
|
|
43238d93a8 | |
|
|
d87aa06c36 | |
|
|
0151957c25 | |
|
|
2640079f5d | |
|
|
1a89dce557 | |
|
|
0811a346a7 | |
|
|
91f7dab344 | |
|
|
e0d5e53998 | |
|
|
32125c8564 | |
|
|
8c3d7d46f6 | |
|
|
bd02bd87f3 | |
|
|
a399316536 | |
|
|
4748358100 | |
|
|
fe4d1d6336 | |
|
|
4f187de35b | |
|
|
e2d659d992 | |
|
|
ba3e2c2595 | |
|
|
57c75b6a09 | |
|
|
b0e1fa98c3 | |
|
|
761933bd7f |
|
|
@ -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.
|
||||||
|
|
||||||
|
|
@ -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.
|
||||||
|
|
@ -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 (???)
|
||||||
|
|
||||||
|
|
@ -1,18 +1,41 @@
|
||||||
# Run in local
|
# Get code
|
||||||
|
|
||||||
```
|
```
|
||||||
make build
|
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
|
||||||
|
FLAVOR=lxqt ARCH=amd64 IMAGE=ubuntu:18.04 make build
|
||||||
make run
|
make 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
|
||||||
|
|
|
||||||
94
Dockerfile
|
|
@ -1,94 +0,0 @@
|
||||||
################################################################################
|
|
||||||
# base system
|
|
||||||
################################################################################
|
|
||||||
FROM ubuntu:16.04 as system
|
|
||||||
|
|
||||||
ARG localbuild
|
|
||||||
RUN if [ "x$localbuild" != "x" ]; then sed -i 's#http://archive.ubuntu.com/#http://qnap.dorowu.com/#' /etc/apt/sources.list; fi
|
|
||||||
|
|
||||||
# built-in packages
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends software-properties-common curl apache2-utils \
|
|
||||||
&& add-apt-repository ppa:fcwu-tw/apps \
|
|
||||||
&& apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends --allow-unauthenticated \
|
|
||||||
supervisor nginx sudo vim-tiny net-tools zenity xz-utils \
|
|
||||||
dbus-x11 x11-utils alsa-utils \
|
|
||||||
mesa-utils libgl1-mesa-dri \
|
|
||||||
lxde x11vnc xvfb \
|
|
||||||
gtk2-engines-murrine gnome-themes-standard gtk2-engines-pixbuf gtk2-engines-murrine arc-theme \
|
|
||||||
firefox chromium-browser \
|
|
||||||
ttf-ubuntu-font-family ttf-wqy-zenhei \
|
|
||||||
&& add-apt-repository -r ppa:fcwu-tw/apps \
|
|
||||||
&& apt-get autoclean \
|
|
||||||
&& apt-get autoremove \
|
|
||||||
&& 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.9.0
|
|
||||||
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini
|
|
||||||
RUN chmod +x /bin/tini
|
|
||||||
|
|
||||||
# ffmpeg
|
|
||||||
RUN mkdir -p /usr/local/ffmpeg \
|
|
||||||
&& curl -sSL https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz | tar xJvf - -C /usr/local/ffmpeg/ --strip 1
|
|
||||||
|
|
||||||
# python library
|
|
||||||
COPY image/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:16.04 as builder
|
|
||||||
|
|
||||||
ARG localbuild
|
|
||||||
RUN if [ "x$localbuild" != "x" ]; then sed -i 's#http://archive.ubuntu.com/#http://qnap.dorowu.com/#' /etc/apt/sources.list; fi
|
|
||||||
|
|
||||||
RUN apt-get update \
|
|
||||||
&& apt-get install -y --no-install-recommends curl ca-certificates
|
|
||||||
|
|
||||||
# nodejs
|
|
||||||
RUN curl -sL https://deb.nodesource.com/setup_9.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
|
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
# merge
|
|
||||||
################################################################################
|
|
||||||
FROM scratch
|
|
||||||
LABEL maintainer="fcwu.tw@gmail.com"
|
|
||||||
|
|
||||||
COPY --from=system / /
|
|
||||||
COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/
|
|
||||||
COPY image /
|
|
||||||
|
|
||||||
EXPOSE 80
|
|
||||||
WORKDIR /root
|
|
||||||
ENV HOME=/home/ubuntu \
|
|
||||||
SHELL=/bin/bash
|
|
||||||
ENTRYPOINT ["/startup.sh"]
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Dockerfile.amd64
|
||||||
|
|
@ -0,0 +1,129 @@
|
||||||
|
# Built with arch: amd64 flavor: lxde image: ubuntu:20.04
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
# base system
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
FROM ubuntu:20.04 as system
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
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 apt update \
|
||||||
|
&& apt install -y --no-install-recommends --allow-unauthenticated \
|
||||||
|
xvfb x11vnc \
|
||||||
|
vim-tiny firefox ttf-ubuntu-font-family ttf-wqy-zenhei \
|
||||||
|
&& apt autoclean -y \
|
||||||
|
&& apt autoremove -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN apt update \
|
||||||
|
&& apt install -y gpg-agent \
|
||||||
|
&& curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||||
|
&& (dpkg -i ./google-chrome-stable_current_amd64.deb || apt-get install -fy) \
|
||||||
|
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add \
|
||||||
|
&& rm google-chrome-stable_current_amd64.deb \
|
||||||
|
&& 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 to fix subreap
|
||||||
|
ARG TINI_VERSION=v0.18.0
|
||||||
|
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini
|
||||||
|
RUN chmod +x /bin/tini
|
||||||
|
|
||||||
|
# ffmpeg
|
||||||
|
RUN apt update \
|
||||||
|
&& 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
|
||||||
|
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 python3-pip python3-dev build-essential \
|
||||||
|
&& pip3 install setuptools wheel && pip3 install -r /tmp/requirements.txt \
|
||||||
|
&& ln -s /usr/bin/python3 /usr/local/bin/python \
|
||||||
|
&& 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:20.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 \
|
||||||
|
&& yarn build
|
||||||
|
RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# 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
|
||||||
|
|
||||||
|
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"]
|
||||||
|
|
@ -0,0 +1,129 @@
|
||||||
|
# Built with arch: arm64 flavor: lxde image: ubuntu:18.04
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
# base system
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# qemu helper for arm build
|
||||||
|
FROM ubuntu:20.04 as amd64
|
||||||
|
RUN apt update && apt install -y qemu-user-static
|
||||||
|
FROM arm64v8/ubuntu:20.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 apt update \
|
||||||
|
&& apt install -y --no-install-recommends --allow-unauthenticated \
|
||||||
|
xvfb x11vnc \
|
||||||
|
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 apt update \
|
||||||
|
&& 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
|
||||||
|
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 python3-pip python3-dev build-essential \
|
||||||
|
&& pip3 install setuptools wheel && pip3 install -r /tmp/requirements.txt \
|
||||||
|
&& ln -s /usr/bin/python3 /usr/local/bin/python \
|
||||||
|
&& 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:20.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 \
|
||||||
|
&& yarn build
|
||||||
|
RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js
|
||||||
|
|
||||||
|
|
||||||
|
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"]
|
||||||
|
|
@ -0,0 +1,124 @@
|
||||||
|
# Built with arch: armhf 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 arm32v7/ubuntu:18.04 as system
|
||||||
|
COPY --from=amd64 /usr/bin/qemu-arm-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.16-1 \
|
||||||
|
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-armhf /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 \
|
||||||
|
&& yarn run build
|
||||||
|
RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js
|
||||||
|
|
||||||
|
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"]
|
||||||
|
|
@ -0,0 +1,137 @@
|
||||||
|
# Built with arch: {{ arch }} flavor: {{ flavor }} image: {{ image }}
|
||||||
|
#
|
||||||
|
################################################################################
|
||||||
|
# base system
|
||||||
|
################################################################################
|
||||||
|
{%if arch == "amd64"%}
|
||||||
|
FROM {{image}} as system
|
||||||
|
{%elif arch == "armhf"%}
|
||||||
|
# qemu helper for arm build
|
||||||
|
FROM {{image}} as amd64
|
||||||
|
RUN apt update && apt install -y qemu-user-static
|
||||||
|
FROM arm32v7/{{image}} as system
|
||||||
|
COPY --from=amd64 /usr/bin/qemu-arm-static /usr/bin/
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
|
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 apt update \
|
||||||
|
&& apt install -y --no-install-recommends --allow-unauthenticated \
|
||||||
|
xvfb x11vnc \
|
||||||
|
vim-tiny firefox ttf-ubuntu-font-family ttf-wqy-zenhei \
|
||||||
|
&& apt autoclean -y \
|
||||||
|
&& apt autoremove -y \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
RUN apt update \
|
||||||
|
&& apt install -y gpg-agent \
|
||||||
|
&& curl -LO https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
|
||||||
|
&& (dpkg -i ./google-chrome-stable_current_amd64.deb || apt-get install -fy) \
|
||||||
|
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add \
|
||||||
|
&& rm google-chrome-stable_current_amd64.deb \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
{%if desktop == "lxde" %}
|
||||||
|
{%endif%}
|
||||||
|
{%if desktop == "lxqt" %}
|
||||||
|
{%endif%}
|
||||||
|
{%if desktop == "xfce4" %}
|
||||||
|
{%endif%}
|
||||||
|
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 to fix subreap
|
||||||
|
ARG TINI_VERSION=v0.18.0
|
||||||
|
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /bin/tini
|
||||||
|
RUN chmod +x /bin/tini
|
||||||
|
|
||||||
|
# ffmpeg
|
||||||
|
RUN apt update \
|
||||||
|
&& 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
|
||||||
|
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 python3-pip python3-dev build-essential \
|
||||||
|
&& pip3 install setuptools wheel && pip3 install -r /tmp/requirements.txt \
|
||||||
|
&& ln -s /usr/bin/python3 /usr/local/bin/python \
|
||||||
|
&& 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 {{image}} as builder
|
||||||
|
|
||||||
|
{% if localbuild == 1 %}
|
||||||
|
RUN sed -i 's#http://archive.ubuntu.com/ubuntu/#mirror://mirrors.ubuntu.com/mirrors.txt#' /etc/apt/sources.list;
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
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 \
|
||||||
|
&& yarn build
|
||||||
|
RUN sed -i 's#app/locale/#novnc/app/locale/#' /src/web/dist/static/novnc/app/ui.js
|
||||||
|
|
||||||
|
{%if arch == "armhf"%}
|
||||||
|
RUN cd /src/web/dist/static/novnc && patch -p0 < /src/web/novnc-armhf-1.patch
|
||||||
|
{%endif%}
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# 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
|
||||||
|
|
||||||
|
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"]
|
||||||
40
Makefile
|
|
@ -1,27 +1,61 @@
|
||||||
.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:20.04
|
||||||
|
# IMAGE ?= nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
|
||||||
|
# choose from supported flavors (see available ones in ./flavors/*.yml)
|
||||||
|
FLAVOR ?= lxde
|
||||||
|
# armhf or amd64
|
||||||
|
ARCH ?= amd64
|
||||||
|
|
||||||
build:
|
# These files will be generated from teh Jinja templates (.j2 sources)
|
||||||
docker build -t $(REPO):$(TAG) --build-arg localbuild=1 .
|
templates = Dockerfile rootfs/etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
|
# Rebuild the container image
|
||||||
|
build: $(templates)
|
||||||
|
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 --privileged --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 USER=doro -e PASSWORD=mypassword \
|
||||||
-e ALSADEV=hw:2,0 \
|
-e ALSADEV=hw:2,0 \
|
||||||
-e SSL_PORT=443 \
|
-e SSL_PORT=443 \
|
||||||
|
-e RELATIVE_URL_ROOT=approot \
|
||||||
|
-e OPENBOX_ARGS="--startup /usr/bin/galculator" \
|
||||||
-v ${PWD}/ssl:/etc/nginx/ssl \
|
-v ${PWD}/ssl:/etc/nginx/ssl \
|
||||||
--device /dev/snd \
|
--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 \
|
||||||
-keyout ssl/nginx.key -out ssl/nginx.crt
|
-keyout ssl/nginx.key -out ssl/nginx.crt
|
||||||
|
|
||||||
|
clean:
|
||||||
|
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
|
||||||
|
docker run -v $(shell pwd):/data vikingco/jinja2cli \
|
||||||
|
-D flavor=$(FLAVOR) \
|
||||||
|
-D image=$(IMAGE) \
|
||||||
|
-D localbuild=$(LOCALBUILD) \
|
||||||
|
-D arch=$(ARCH) \
|
||||||
|
$< flavors/$(FLAVOR).yml > $@ || rm $@
|
||||||
|
|
|
||||||
129
README.md
|
|
@ -1,100 +1,129 @@
|
||||||
docker-ubuntu-vnc-desktop
|
# docker-ubuntu-vnc-desktop
|
||||||
=========================
|
|
||||||
|
|
||||||
[](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/)
|
[](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/)
|
||||||
[](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/)
|
[](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/)
|
||||||
<a href="https://ko-fi.com/dorowu" target="_blank"><img src="https://az743702.vo.msecnd.net/cdn/kofi2.png" width="142" height="36"></a>
|
|
||||||
|
|
||||||
Docker image to provide HTML5 VNC interface to access Ubuntu 16.04 LXDE desktop environment.
|
docker-ubuntu-vnc-desktop is a Docker image to provide web VNC interface to access Ubuntu LXDE/LxQT desktop environment.
|
||||||
|
|
||||||
Quick Start
|
<!-- @import "[TOC]" {cmd="toc" depthFrom=2 depthTo=2 orderedList=false} -->
|
||||||
-------------------------
|
|
||||||
|
<!-- code_chunk_output -->
|
||||||
|
|
||||||
|
- [Quick Start](#quick-start)
|
||||||
|
- [VNC Viewer](#vnc-viewer)
|
||||||
|
- [HTTP Base Authentication](#http-base-authentication)
|
||||||
|
- [SSL](#ssl)
|
||||||
|
- [Screen Resolution](#screen-resolution)
|
||||||
|
- [Default Desktop User](#default-desktop-user)
|
||||||
|
- [Deploy to a subdirectory (relative url root)](#deploy-to-a-subdirectory-relative-url-root)
|
||||||
|
- [Sound (Preview version and Linux only)](#sound-preview-version-and-linux-only)
|
||||||
|
- [Generate Dockerfile from jinja template](#generate-dockerfile-from-jinja-template)
|
||||||
|
- [Troubleshooting and FAQ](#troubleshooting-and-faq)
|
||||||
|
- [License](#license)
|
||||||
|
|
||||||
|
<!-- /code_chunk_output -->
|
||||||
|
|
||||||
|
## Quick Start
|
||||||
|
|
||||||
Run the docker container and access with port `6080`
|
Run the docker container and access with port `6080`
|
||||||
|
|
||||||
```
|
```shell
|
||||||
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/
|
||||||
|
|
||||||
<img src="https://raw.github.com/fcwu/docker-ubuntu-vnc-desktop/master/screenshots/lxde.png?v1" width=700/>
|
<img src="https://raw.github.com/fcwu/docker-ubuntu-vnc-desktop/master/screenshots/lxde.png?v1" width=700/>
|
||||||
|
|
||||||
|
### Ubuntu Flavors
|
||||||
|
|
||||||
VNC Viewer
|
Choose your favorite Ubuntu version with [tags](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/tags/)
|
||||||
------------------
|
|
||||||
|
- focal: Ubuntu 20.04 (latest)
|
||||||
|
- focal-lxqt: Ubuntu 20.04 LXQt
|
||||||
|
- bionic: Ubuntu 18.04
|
||||||
|
- bionic-lxqt: Ubuntu 18.04 LXQt
|
||||||
|
- xenial: Ubuntu 16.04 (deprecated)
|
||||||
|
- trusty: Ubuntu 14.04 (deprecated)
|
||||||
|
|
||||||
|
## VNC Viewer
|
||||||
|
|
||||||
Forward VNC service port 5900 to host by
|
Forward VNC service port 5900 to host by
|
||||||
|
|
||||||
```
|
```shell
|
||||||
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
|
||||||
|
|
||||||
```
|
```shell
|
||||||
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.
|
||||||
|
|
||||||
HTTP Base Authentication
|
## 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`
|
||||||
|
|
||||||
```
|
```shell
|
||||||
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
|
||||||
--------------------
|
|
||||||
|
|
||||||
To connect with SSL, generate self signed SSL certificate first if you don't have it
|
To connect with SSL, generate self signed SSL certificate first if you don't have it
|
||||||
|
|
||||||
```
|
```shell
|
||||||
mkdir -p ssl
|
mkdir -p ssl
|
||||||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ssl/nginx.key -out ssl/nginx.crt
|
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ssl/nginx.key -out ssl/nginx.crt
|
||||||
```
|
```
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
```
|
```shell
|
||||||
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
|
||||||
------------------
|
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
```
|
```shell
|
||||||
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
|
||||||
--------------------
|
|
||||||
|
|
||||||
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,
|
||||||
|
|
||||||
```
|
```shell
|
||||||
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
|
||||||
```
|
```
|
||||||
|
|
||||||
Sound (Preview version and Linux only)
|
## 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
|
||||||
|
|
||||||
|
```shell
|
||||||
|
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)
|
||||||
|
|
||||||
It only works in Linux.
|
It only works in Linux.
|
||||||
|
|
||||||
First of all, insert kernel module `snd-aloop` and specify `2` as the index of sound loop device
|
First of all, insert kernel module `snd-aloop` and specify `2` as the index of sound loop device
|
||||||
|
|
||||||
```
|
```shell
|
||||||
sudo modprobe snd-aloop index=2
|
sudo modprobe snd-aloop index=2
|
||||||
```
|
```
|
||||||
|
|
||||||
Start the container
|
Start the container
|
||||||
|
|
||||||
```
|
```shell
|
||||||
docker run -it --rm -p 6080:80 --device /dev/snd -e ALSADEV=hw:2,0 dorowu/ubuntu-desktop-lxde-vnc
|
docker run -it --rm -p 6080:80 --device /dev/snd -e ALSADEV=hw:2,0 dorowu/ubuntu-desktop-lxde-vnc
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -102,16 +131,34 @@ where `--device /dev/snd -e ALSADEV=hw:2,0` means to grant sound device to conta
|
||||||
|
|
||||||
Launch a browser with URL http://127.0.0.1:6080/#/?video, where `video` means to start with video mode. Now you can start Chromium in start menu (Internet -> Chromium Web Browser Sound) and try to play some video.
|
Launch a browser with URL http://127.0.0.1:6080/#/?video, where `video` means to start with video mode. Now you can start Chromium in start menu (Internet -> Chromium Web Browser Sound) and try to play some video.
|
||||||
|
|
||||||
[](http://www.youtube.com/watch?v=Kv9FGClP1-k)
|
Following is the screen capture of these operations. Turn on your sound at the end of video!
|
||||||
|
|
||||||
|
[](http://www.youtube.com/watch?v=Kv9FGClP1-k)
|
||||||
|
|
||||||
|
|
||||||
Troubleshooting and FAQ
|
## Generate Dockerfile from jinja template
|
||||||
==================
|
|
||||||
|
WARNING: Deprecated
|
||||||
|
|
||||||
|
Dockerfile and configuration can be generated by template.
|
||||||
|
|
||||||
|
- arch: one of `amd64` or `armhf`
|
||||||
|
- flavor: refer to file in flavor/`flavor`.yml
|
||||||
|
- image: base image
|
||||||
|
- desktop: desktop environment which is set in flavor
|
||||||
|
- addon_package: Debian package to be installed which is set in flavor
|
||||||
|
|
||||||
|
Dockerfile and configuration are re-generate if they do not exist. Or you may force to re-generate by removing them with the command `make clean`.
|
||||||
|
|
||||||
|
## Troubleshooting and FAQ
|
||||||
|
|
||||||
1. boot2docker connection issue, https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/2
|
1. boot2docker connection issue, https://github.com/fcwu/docker-ubuntu-vnc-desktop/issues/2
|
||||||
|
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#issuecomment-466778407
|
||||||
|
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
|
|
||||||
==================
|
|
||||||
|
|
||||||
See the LICENSE file for details.
|
See the LICENSE file for details.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
addon_packages:
|
||||||
|
- vim-tiny
|
||||||
|
- firefox
|
||||||
|
- chromium-browser
|
||||||
|
- ttf-ubuntu-font-family
|
||||||
|
- ttf-wqy-zenhei
|
||||||
|
desktop: lxde
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
addon_packages:
|
||||||
|
- vim-tiny
|
||||||
|
- firefox
|
||||||
|
- chromium-browser
|
||||||
|
- ttf-ubuntu-font-family
|
||||||
|
- ttf-wqy-zenhei
|
||||||
|
desktop: lxqt
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
addon_packages:
|
||||||
|
- vim-tiny
|
||||||
|
- firefox
|
||||||
|
- xfce4-terminal
|
||||||
|
desktop: xfce4
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Register qemu-*-static for all supported processors except the
|
||||||
|
# current one, but also remove all registered binfmt_misc before
|
||||||
|
docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
|
|
@ -1,42 +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_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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
exec /usr/bin/Xvfb :1 -screen 0 1024x768x16
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
backports.ssl-match-hostname==3.5.0.1
|
|
||||||
certifi==2018.1.18
|
|
||||||
chardet==3.0.4
|
|
||||||
click==6.7
|
|
||||||
Flask==0.12.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.18.4
|
|
||||||
six==1.11.0
|
|
||||||
supervisor==3.2.0
|
|
||||||
urllib3==1.22
|
|
||||||
websocket-client==0.47.0
|
|
||||||
Werkzeug==0.14.1
|
|
||||||
|
|
@ -1,139 +0,0 @@
|
||||||
[Desktop Entry]
|
|
||||||
Version=1.0
|
|
||||||
Name=Chromium Web Browser Sound
|
|
||||||
GenericName=Web Browser
|
|
||||||
GenericName[ar]=متصفح الشبكة
|
|
||||||
GenericName[ast]=Restolador web
|
|
||||||
GenericName[bg]=Уеб браузър
|
|
||||||
GenericName[bn]=ওয়েব ব্রাউজার
|
|
||||||
GenericName[bs]=Web preglednik
|
|
||||||
GenericName[ca]=Navegador web
|
|
||||||
GenericName[ca@valencia]=Navegador web
|
|
||||||
GenericName[cs]=WWW prohlížeč
|
|
||||||
GenericName[da]=Browser
|
|
||||||
GenericName[de]=Web-Browser
|
|
||||||
GenericName[el]=Περιηγητής ιστού
|
|
||||||
GenericName[en_AU]=Web Browser
|
|
||||||
GenericName[en_GB]=Web Browser
|
|
||||||
GenericName[eo]=Retfoliumilo
|
|
||||||
GenericName[es]=Navegador web
|
|
||||||
GenericName[et]=Veebibrauser
|
|
||||||
GenericName[eu]=Web-nabigatzailea
|
|
||||||
GenericName[fi]=WWW-selain
|
|
||||||
GenericName[fil]=Web Browser
|
|
||||||
GenericName[fr]=Navigateur Web
|
|
||||||
GenericName[gl]=Navegador web
|
|
||||||
GenericName[gu]=વેબ બ્રાઉઝર
|
|
||||||
GenericName[he]=דפדפן אינטרנט
|
|
||||||
GenericName[hi]=वेब ब्राउज़र
|
|
||||||
GenericName[hr]=Web preglednik
|
|
||||||
GenericName[hu]=Webböngésző
|
|
||||||
GenericName[hy]=Ոստայն զննարկիչ
|
|
||||||
GenericName[ia]=Navigator del Web
|
|
||||||
GenericName[id]=Peramban Web
|
|
||||||
GenericName[it]=Browser web
|
|
||||||
GenericName[ja]=ウェブ・ブラウザ
|
|
||||||
GenericName[ka]=ვებ ბრაუზერი
|
|
||||||
GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
|
|
||||||
GenericName[ko]=웹 브라우저
|
|
||||||
GenericName[kw]=Peurel wias
|
|
||||||
GenericName[lt]=Žiniatinklio naršyklė
|
|
||||||
GenericName[lv]=Tīmekļa pārlūks
|
|
||||||
GenericName[ml]=വെബ് ബ്രൌസര്
|
|
||||||
GenericName[mr]=वेब ब्राऊजर
|
|
||||||
GenericName[ms]=Pelayar Web
|
|
||||||
GenericName[nb]=Nettleser
|
|
||||||
GenericName[nl]=Webbrowser
|
|
||||||
GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
|
|
||||||
GenericName[pl]=Przeglądarka WWW
|
|
||||||
GenericName[pt]=Navegador Web
|
|
||||||
GenericName[pt_BR]=Navegador web
|
|
||||||
GenericName[ro]=Navigator de Internet
|
|
||||||
GenericName[ru]=Веб-браузер
|
|
||||||
GenericName[sk]=WWW prehliadač
|
|
||||||
GenericName[sl]=Spletni brskalnik
|
|
||||||
GenericName[sr]=Интернет прегледник
|
|
||||||
GenericName[sv]=Webbläsare
|
|
||||||
GenericName[ta]=இணைய உலாவி
|
|
||||||
GenericName[te]=మహాతల అన్వేషి
|
|
||||||
GenericName[th]=เว็บเบราว์เซอร์
|
|
||||||
GenericName[tr]=Web Tarayıcı
|
|
||||||
GenericName[ug]=توركۆرگۈ
|
|
||||||
GenericName[uk]=Навігатор Тенет
|
|
||||||
GenericName[vi]=Bộ duyệt Web
|
|
||||||
GenericName[zh_CN]=网页浏览器
|
|
||||||
GenericName[zh_HK]=網頁瀏覽器
|
|
||||||
GenericName[zh_TW]=網頁瀏覽器
|
|
||||||
Comment=Access the Internet
|
|
||||||
Comment[ar]=الدخول إلى الإنترنت
|
|
||||||
Comment[ast]=Accesu a Internet
|
|
||||||
Comment[bg]=Достъп до интернет
|
|
||||||
Comment[bn]=ইন্টারনেটে প্রবেশ করুন
|
|
||||||
Comment[bs]=Pristup internetu
|
|
||||||
Comment[ca]=Accediu a Internet
|
|
||||||
Comment[ca@valencia]=Accediu a Internet
|
|
||||||
Comment[cs]=Přístup k internetu
|
|
||||||
Comment[da]=Få adgang til internettet
|
|
||||||
Comment[de]=Internetzugriff
|
|
||||||
Comment[el]=Πρόσβαση στο Διαδίκτυο
|
|
||||||
Comment[en_AU]=Access the Internet
|
|
||||||
Comment[en_GB]=Access the Internet
|
|
||||||
Comment[eo]=Akiri interreton
|
|
||||||
Comment[es]=Acceda a Internet
|
|
||||||
Comment[et]=Pääs Internetti
|
|
||||||
Comment[eu]=Sartu Internetera
|
|
||||||
Comment[fi]=Käytä internetiä
|
|
||||||
Comment[fil]=I-access ang Internet
|
|
||||||
Comment[fr]=Accéder à Internet
|
|
||||||
Comment[gl]=Acceda a Internet
|
|
||||||
Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
|
|
||||||
Comment[he]=גישה לאינטרנט
|
|
||||||
Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
|
|
||||||
Comment[hr]=Pristupite Internetu
|
|
||||||
Comment[hu]=Az internet elérése
|
|
||||||
Comment[hy]=Մուտք համացանց
|
|
||||||
Comment[ia]=Accede a le Interrete
|
|
||||||
Comment[id]=Akses Internet
|
|
||||||
Comment[it]=Accesso a Internet
|
|
||||||
Comment[ja]=インターネットにアクセス
|
|
||||||
Comment[ka]=ინტერნეტში შესვლა
|
|
||||||
Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ
|
|
||||||
Comment[ko]=인터넷에 연결합니다
|
|
||||||
Comment[kw]=Hedhes an Kesrosweyth
|
|
||||||
Comment[lt]=Interneto prieiga
|
|
||||||
Comment[lv]=Piekļūt internetam
|
|
||||||
Comment[ml]=ഇന്റര്നെറ്റ് ആക്സസ് ചെയ്യുക
|
|
||||||
Comment[mr]=इंटरनेटमध्ये प्रवेश करा
|
|
||||||
Comment[ms]=Mengakses Internet
|
|
||||||
Comment[nb]=Bruk internett
|
|
||||||
Comment[nl]=Verbinding maken met internet
|
|
||||||
Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
|
|
||||||
Comment[pl]=Skorzystaj z internetu
|
|
||||||
Comment[pt]=Aceder à Internet
|
|
||||||
Comment[pt_BR]=Acessar a internet
|
|
||||||
Comment[ro]=Accesați Internetul
|
|
||||||
Comment[ru]=Доступ в Интернет
|
|
||||||
Comment[sk]=Prístup do siete Internet
|
|
||||||
Comment[sl]=Dostop do interneta
|
|
||||||
Comment[sr]=Приступите Интернету
|
|
||||||
Comment[sv]=Surfa på Internet
|
|
||||||
Comment[ta]=இணையத்தை அணுகுதல்
|
|
||||||
Comment[te]=ఇంటర్నెట్ను ఆక్సెస్ చెయ్యండి
|
|
||||||
Comment[th]=เข้าถึงอินเทอร์เน็ต
|
|
||||||
Comment[tr]=İnternet'e erişin
|
|
||||||
Comment[ug]=ئىنتېرنېت زىيارىتى
|
|
||||||
Comment[uk]=Доступ до Інтернету
|
|
||||||
Comment[vi]=Truy cập Internet
|
|
||||||
Comment[zh_CN]=访问互联网
|
|
||||||
Comment[zh_HK]=連線到網際網路
|
|
||||||
Comment[zh_TW]=連線到網際網路
|
|
||||||
Exec=/usr/local/bin/chromium-browser-sound.sh %U
|
|
||||||
Terminal=false
|
|
||||||
X-MultipleArgs=false
|
|
||||||
Type=Application
|
|
||||||
Icon=chromium-browser
|
|
||||||
Categories=Network;WebBrowser;
|
|
||||||
MimeType=text/html;text/xml;application/xhtml_xml;x-scheme-handler/http;x-scheme-handler/https;
|
|
||||||
StartupNotify=true
|
|
||||||
Actions=NewWindow;Incognito;TempProfile;
|
|
||||||
X-AppInstall-Package=chromium-browser
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
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;
|
||||||
|
|
||||||
|
#_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 ~ .*/(api/.*|websockify) {
|
||||||
|
try_files $uri @api$http_upgrade;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
rewrite /approot/(.*) /$1 break;
|
||||||
|
root /usr/local/lib/web/frontend/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @apiwebsocket {
|
||||||
|
#_RELATIVE_URL_ROOT_rewrite /_RELATIVE_URL_ROOT_/(.*) $1 break;
|
||||||
|
proxy_connect_timeout 7d;
|
||||||
|
proxy_send_timeout 7d;
|
||||||
|
proxy_read_timeout 7d;
|
||||||
|
proxy_buffering off;
|
||||||
|
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
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;
|
||||||
|
max_ranges 0;
|
||||||
|
proxy_pass http://127.0.0.1:6079;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -17,14 +17,10 @@ stdout_logfile_maxbytes=0
|
||||||
stderr_logfile=/dev/fd/1
|
stderr_logfile=/dev/fd/1
|
||||||
stderr_logfile_maxbytes=0
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
|
|
||||||
[group:x]
|
[group:x]
|
||||||
programs=xvfb,wm,lxpanel,pcmanfm,x11vnc,novnc
|
programs=xvfb,wm,lxpanel,pcmanfm,x11vnc,novnc
|
||||||
|
|
||||||
[program:xvfb]
|
|
||||||
priority=10
|
|
||||||
command=/usr/local/bin/xvfb.sh
|
|
||||||
stopsignal=KILL
|
|
||||||
|
|
||||||
[program:wm]
|
[program:wm]
|
||||||
priority=15
|
priority=15
|
||||||
command=/usr/bin/openbox
|
command=/usr/bin/openbox
|
||||||
|
|
@ -42,11 +38,22 @@ priority=15
|
||||||
directory=%HOME%
|
directory=%HOME%
|
||||||
command=/usr/bin/pcmanfm --desktop --profile LXDE
|
command=/usr/bin/pcmanfm --desktop --profile LXDE
|
||||||
user=%USER%
|
user=%USER%
|
||||||
|
stopwaitsecs=3
|
||||||
environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%"
|
environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[program:xvfb]
|
||||||
|
priority=10
|
||||||
|
command=/usr/local/bin/xvfb.sh
|
||||||
|
stopsignal=KILL
|
||||||
|
|
||||||
[program:x11vnc]
|
[program:x11vnc]
|
||||||
priority=20
|
priority=20
|
||||||
command=x11vnc -display :1 -xkb -forever -shared -repeat
|
command=x11vnc -display :1 -xkb -forever -shared -repeat -capslock
|
||||||
|
|
||||||
[program:novnc]
|
[program:novnc]
|
||||||
priority=25
|
priority=25
|
||||||
|
|
@ -0,0 +1,86 @@
|
||||||
|
[supervisord]
|
||||||
|
redirect_stderr=true
|
||||||
|
stopsignal=QUIT
|
||||||
|
autorestart=true
|
||||||
|
directory=/root
|
||||||
|
|
||||||
|
[program:nginx]
|
||||||
|
priority=10
|
||||||
|
command=nginx -c /etc/nginx/nginx.conf -g 'daemon off;'
|
||||||
|
|
||||||
|
[program:web]
|
||||||
|
priority=10
|
||||||
|
directory=/usr/local/lib/web/backend
|
||||||
|
command=/usr/local/lib/web/backend/run.py
|
||||||
|
stdout_logfile=/dev/fd/1
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/fd/1
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
|
||||||
|
{% if desktop == "lxde" %}
|
||||||
|
[group:x]
|
||||||
|
programs=xvfb,wm,lxpanel,pcmanfm,x11vnc,novnc
|
||||||
|
|
||||||
|
[program:wm]
|
||||||
|
priority=15
|
||||||
|
command=/usr/bin/openbox
|
||||||
|
environment=DISPLAY=":1",HOME="/root",USER="root"
|
||||||
|
|
||||||
|
[program:lxpanel]
|
||||||
|
priority=15
|
||||||
|
directory=%HOME%
|
||||||
|
command=/usr/bin/lxpanel --profile LXDE
|
||||||
|
user=%USER%
|
||||||
|
environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%"
|
||||||
|
|
||||||
|
[program:pcmanfm]
|
||||||
|
priority=15
|
||||||
|
directory=%HOME%
|
||||||
|
command=/usr/bin/pcmanfm --desktop --profile LXDE
|
||||||
|
user=%USER%
|
||||||
|
environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%"
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if desktop == "lxqt" %}
|
||||||
|
[group:x]
|
||||||
|
programs=xvfb,wm,lxpanel,x11vnc,novnc
|
||||||
|
|
||||||
|
[program:wm]
|
||||||
|
priority=15
|
||||||
|
command=/usr/bin/openbox
|
||||||
|
environment=DISPLAY=":1",HOME="/root",USER="root"
|
||||||
|
|
||||||
|
[program:lxpanel]
|
||||||
|
priority=15
|
||||||
|
directory=%HOME%
|
||||||
|
command=/usr/bin/startlxqt
|
||||||
|
user=%USER%
|
||||||
|
environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%"
|
||||||
|
{% 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]
|
||||||
|
priority=10
|
||||||
|
command=/usr/local/bin/xvfb.sh
|
||||||
|
stopsignal=KILL
|
||||||
|
|
||||||
|
[program:x11vnc]
|
||||||
|
priority=20
|
||||||
|
command=x11vnc -display :1 -xkb -forever -shared -repeat -capslock
|
||||||
|
|
||||||
|
[program:novnc]
|
||||||
|
priority=25
|
||||||
|
directory=/usr/local/lib/web/frontend/static/novnc
|
||||||
|
command=bash /usr/local/lib/web/frontend/static/novnc/utils/launch.sh --listen 6081
|
||||||
|
stopasgroup=true
|
||||||
|
|
@ -8,8 +8,16 @@ if [ -n "$VNC_PASSWORD" ]; then
|
||||||
export VNC_PASSWORD=
|
export VNC_PASSWORD=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "$X11VNC_ARGS" ]; then
|
||||||
|
sed -i "s/^command=x11vnc.*/& ${X11VNC_ARGS}/" /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$OPENBOX_ARGS" ]; then
|
||||||
|
sed -i "s#^command=/usr/bin/openbox\$#& ${OPENBOX_ARGS}#" /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$RESOLUTION" ]; then
|
if [ -n "$RESOLUTION" ]; then
|
||||||
sed -i "s/1024x768/$RESOLUTION/" /etc/supervisor/conf.d/supervisord.conf
|
sed -i "s/1024x768/$RESOLUTION/" /usr/local/bin/xvfb.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
USER=${USER:-root}
|
USER=${USER:-root}
|
||||||
|
|
@ -23,16 +31,18 @@ if [ "$USER" != "root" ]; then
|
||||||
fi
|
fi
|
||||||
HOME=/home/$USER
|
HOME=/home/$USER
|
||||||
echo "$USER:$PASSWORD" | chpasswd
|
echo "$USER:$PASSWORD" | chpasswd
|
||||||
cp -r /root/{.gtkrc-2.0,.asoundrc} ${HOME}
|
cp -r /root/{.config,.gtkrc-2.0,.asoundrc} ${HOME}
|
||||||
|
chown -R $USER:$USER ${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
|
||||||
|
|
@ -51,12 +61,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
|
||||||
|
|
@ -5,4 +5,4 @@ if [ -z "$ALSADEV" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
exec /usr/bin/chromium-browser --no-sandbox --alsa-output-device="$ALSADEV" "$@"
|
exec /usr/bin/google-chrome --no-sandbox --alsa-output-device="$ALSADEV" "$@"
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
exec /usr/bin/Xvfb :1 -screen 0 1024x768x24
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
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.11.3
|
||||||
|
MarkupSafe==1.1.1
|
||||||
|
meld3==2.0.0
|
||||||
|
requests==2.22.0
|
||||||
|
six==1.12.0
|
||||||
|
urllib3==1.25.6
|
||||||
|
websocket-client==0.47.0
|
||||||
|
Werkzeug==0.16.0
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
from __future__ import (
|
from __future__ import (
|
||||||
absolute_import, division, print_function, with_statement
|
absolute_import, division, print_function, with_statement
|
||||||
)
|
)
|
||||||
|
|
@ -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()
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -2,12 +2,13 @@ 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,
|
||||||
Response,
|
Response,
|
||||||
jsonify,
|
jsonify,
|
||||||
|
abort,
|
||||||
)
|
)
|
||||||
from gevent import subprocess as gsp, spawn, sleep
|
from gevent import subprocess as gsp, spawn, sleep
|
||||||
from geventwebsocket.exceptions import WebSocketError
|
from geventwebsocket.exceptions import WebSocketError
|
||||||
|
|
@ -20,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')
|
||||||
|
|
@ -35,12 +36,19 @@ def apistate():
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@app.route('/api/health')
|
||||||
|
def apihealth():
|
||||||
|
if state.health:
|
||||||
|
return 'success'
|
||||||
|
abort(503, 'unhealthy')
|
||||||
|
|
||||||
|
|
||||||
@app.route('/api/reset')
|
@app.route('/api/reset')
|
||||||
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'])
|
||||||
|
|
||||||
|
|
@ -60,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():
|
||||||
|
|
@ -136,7 +151,7 @@ def liveflv():
|
||||||
cmd,
|
cmd,
|
||||||
stdout=gsp.PIPE,
|
stdout=gsp.PIPE,
|
||||||
stderr=gsp.PIPE,
|
stderr=gsp.PIPE,
|
||||||
env={k: str(v) for k, v in xenvs.iteritems()},
|
env={k: str(v) for k, v in xenvs.items()},
|
||||||
)
|
)
|
||||||
|
|
||||||
def readerr(f):
|
def readerr(f):
|
||||||
|
|
@ -27,11 +27,11 @@ class State(object):
|
||||||
self._event.set()
|
self._event.set()
|
||||||
|
|
||||||
def _update_health(self):
|
def _update_health(self):
|
||||||
if self._health:
|
|
||||||
return
|
|
||||||
|
|
||||||
health = True
|
health = True
|
||||||
output = gsp.check_output(['supervisorctl', 'status'])
|
output = gsp.check_output([
|
||||||
|
'supervisorctl', '-c', '/etc/supervisor/supervisord.conf',
|
||||||
|
'status'
|
||||||
|
], encoding='UTF-8')
|
||||||
for line in output.strip().split('\n'):
|
for line in output.strip().split('\n'):
|
||||||
if not line.startswith('web') and line.find('RUNNING') < 0:
|
if not line.startswith('web') and line.find('RUNNING') < 0:
|
||||||
health = False
|
health = False
|
||||||
|
|
@ -65,13 +65,16 @@ class State(object):
|
||||||
'sed -i \'s#'
|
'sed -i \'s#'
|
||||||
'^exec /usr/bin/Xvfb.*$'
|
'^exec /usr/bin/Xvfb.*$'
|
||||||
'#'
|
'#'
|
||||||
'exec /usr/bin/Xvfb :1 -screen 0 {}x{}x16'
|
'exec /usr/bin/Xvfb :1 -screen 0 {}x{}x24'
|
||||||
'#\' /usr/local/bin/xvfb.sh'
|
'#\' /usr/local/bin/xvfb.sh'
|
||||||
).format(w, h), shell=True)
|
).format(w, h), shell=True)
|
||||||
self.size_changed_count += 1
|
self.size_changed_count += 1
|
||||||
|
|
||||||
def apply_and_restart(self):
|
def apply_and_restart(self):
|
||||||
gsp.check_call(['supervisorctl', 'restart', 'x:'])
|
gsp.check_call([
|
||||||
|
'supervisorctl', '-c', '/etc/supervisor/supervisord.conf',
|
||||||
|
'restart', 'x:'
|
||||||
|
])
|
||||||
self._w = self._h = self._health = None
|
self._w = self._h = self._health = None
|
||||||
self.notify()
|
self.notify()
|
||||||
|
|
||||||
|
|
@ -110,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
|
||||||
|
Before Width: | Height: | Size: 339 KiB After Width: | Height: | Size: 339 KiB |
|
Before Width: | Height: | Size: 527 KiB After Width: | Height: | Size: 527 KiB |
|
Before Width: | Height: | Size: 246 KiB After Width: | Height: | Size: 246 KiB |
|
Before Width: | Height: | Size: 870 KiB After Width: | Height: | Size: 870 KiB |
|
|
@ -0,0 +1,221 @@
|
||||||
|
[Desktop Entry]
|
||||||
|
Version=1.0
|
||||||
|
Name=Google Chrome Sound
|
||||||
|
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
|
||||||
|
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
|
||||||
|
GenericName=Web Browser
|
||||||
|
GenericName[ar]=متصفح الشبكة
|
||||||
|
GenericName[bg]=Уеб браузър
|
||||||
|
GenericName[ca]=Navegador web
|
||||||
|
GenericName[cs]=WWW prohlížeč
|
||||||
|
GenericName[da]=Browser
|
||||||
|
GenericName[de]=Web-Browser
|
||||||
|
GenericName[el]=Περιηγητής ιστού
|
||||||
|
GenericName[en_GB]=Web Browser
|
||||||
|
GenericName[es]=Navegador web
|
||||||
|
GenericName[et]=Veebibrauser
|
||||||
|
GenericName[fi]=WWW-selain
|
||||||
|
GenericName[fr]=Navigateur Web
|
||||||
|
GenericName[gu]=વેબ બ્રાઉઝર
|
||||||
|
GenericName[he]=דפדפן אינטרנט
|
||||||
|
GenericName[hi]=वेब ब्राउज़र
|
||||||
|
GenericName[hu]=Webböngésző
|
||||||
|
GenericName[it]=Browser Web
|
||||||
|
GenericName[ja]=ウェブブラウザ
|
||||||
|
GenericName[kn]=ಜಾಲ ವೀಕ್ಷಕ
|
||||||
|
GenericName[ko]=웹 브라우저
|
||||||
|
GenericName[lt]=Žiniatinklio naršyklė
|
||||||
|
GenericName[lv]=Tīmekļa pārlūks
|
||||||
|
GenericName[ml]=വെബ് ബ്രൌസര്
|
||||||
|
GenericName[mr]=वेब ब्राऊजर
|
||||||
|
GenericName[nb]=Nettleser
|
||||||
|
GenericName[nl]=Webbrowser
|
||||||
|
GenericName[pl]=Przeglądarka WWW
|
||||||
|
GenericName[pt]=Navegador Web
|
||||||
|
GenericName[pt_BR]=Navegador da Internet
|
||||||
|
GenericName[ro]=Navigator de Internet
|
||||||
|
GenericName[ru]=Веб-браузер
|
||||||
|
GenericName[sl]=Spletni brskalnik
|
||||||
|
GenericName[sv]=Webbläsare
|
||||||
|
GenericName[ta]=இணைய உலாவி
|
||||||
|
GenericName[th]=เว็บเบราว์เซอร์
|
||||||
|
GenericName[tr]=Web Tarayıcı
|
||||||
|
GenericName[uk]=Навігатор Тенет
|
||||||
|
GenericName[zh_CN]=网页浏览器
|
||||||
|
GenericName[zh_HK]=網頁瀏覽器
|
||||||
|
GenericName[zh_TW]=網頁瀏覽器
|
||||||
|
# Not translated in KDE, from Epiphany 2.26.1-0ubuntu1.
|
||||||
|
GenericName[bn]=ওয়েব ব্রাউজার
|
||||||
|
GenericName[fil]=Web Browser
|
||||||
|
GenericName[hr]=Web preglednik
|
||||||
|
GenericName[id]=Browser Web
|
||||||
|
GenericName[or]=ଓ୍ବେବ ବ୍ରାଉଜର
|
||||||
|
GenericName[sk]=WWW prehliadač
|
||||||
|
GenericName[sr]=Интернет прегледник
|
||||||
|
GenericName[te]=మహాతల అన్వేషి
|
||||||
|
GenericName[vi]=Bộ duyệt Web
|
||||||
|
# Gnome and KDE 3 uses Comment.
|
||||||
|
Comment=Access the Internet
|
||||||
|
Comment[ar]=الدخول إلى الإنترنت
|
||||||
|
Comment[bg]=Достъп до интернет
|
||||||
|
Comment[bn]=ইন্টারনেটটি অ্যাক্সেস করুন
|
||||||
|
Comment[ca]=Accedeix a Internet
|
||||||
|
Comment[cs]=Přístup k internetu
|
||||||
|
Comment[da]=Få adgang til internettet
|
||||||
|
Comment[de]=Internetzugriff
|
||||||
|
Comment[el]=Πρόσβαση στο Διαδίκτυο
|
||||||
|
Comment[en_GB]=Access the Internet
|
||||||
|
Comment[es]=Accede a Internet.
|
||||||
|
Comment[et]=Pääs Internetti
|
||||||
|
Comment[fi]=Käytä internetiä
|
||||||
|
Comment[fil]=I-access ang Internet
|
||||||
|
Comment[fr]=Accéder à Internet
|
||||||
|
Comment[gu]=ઇંટરનેટ ઍક્સેસ કરો
|
||||||
|
Comment[he]=גישה אל האינטרנט
|
||||||
|
Comment[hi]=इंटरनेट तक पहुंच स्थापित करें
|
||||||
|
Comment[hr]=Pristup Internetu
|
||||||
|
Comment[hu]=Internetelérés
|
||||||
|
Comment[id]=Akses Internet
|
||||||
|
Comment[it]=Accesso a Internet
|
||||||
|
Comment[ja]=インターネットにアクセス
|
||||||
|
Comment[kn]=ಇಂಟರ್ನೆಟ್ ಅನ್ನು ಪ್ರವೇಶಿಸಿ
|
||||||
|
Comment[ko]=인터넷 연결
|
||||||
|
Comment[lt]=Interneto prieiga
|
||||||
|
Comment[lv]=Piekļūt internetam
|
||||||
|
Comment[ml]=ഇന്റര്നെറ്റ് ആക്സസ് ചെയ്യുക
|
||||||
|
Comment[mr]=इंटरनेटमध्ये प्रवेश करा
|
||||||
|
Comment[nb]=Gå til Internett
|
||||||
|
Comment[nl]=Verbinding maken met internet
|
||||||
|
Comment[or]=ଇଣ୍ଟର୍ନେଟ୍ ପ୍ରବେଶ କରନ୍ତୁ
|
||||||
|
Comment[pl]=Skorzystaj z internetu
|
||||||
|
Comment[pt]=Aceder à Internet
|
||||||
|
Comment[pt_BR]=Acessar a internet
|
||||||
|
Comment[ro]=Accesaţi Internetul
|
||||||
|
Comment[ru]=Доступ в Интернет
|
||||||
|
Comment[sk]=Prístup do siete Internet
|
||||||
|
Comment[sl]=Dostop do interneta
|
||||||
|
Comment[sr]=Приступите Интернету
|
||||||
|
Comment[sv]=Gå ut på Internet
|
||||||
|
Comment[ta]=இணையத்தை அணுகுதல்
|
||||||
|
Comment[te]=ఇంటర్నెట్ను ఆక్సెస్ చెయ్యండి
|
||||||
|
Comment[th]=เข้าถึงอินเทอร์เน็ต
|
||||||
|
Comment[tr]=İnternet'e erişin
|
||||||
|
Comment[uk]=Доступ до Інтернету
|
||||||
|
Comment[vi]=Truy cập Internet
|
||||||
|
Comment[zh_CN]=访问互联网
|
||||||
|
Comment[zh_HK]=連線到網際網路
|
||||||
|
Comment[zh_TW]=連線到網際網路
|
||||||
|
Exec=/usr/local/bin/chromium-browser-sound.sh %U
|
||||||
|
StartupNotify=true
|
||||||
|
Terminal=false
|
||||||
|
Icon=google-chrome
|
||||||
|
Type=Application
|
||||||
|
Categories=Network;WebBrowser;
|
||||||
|
MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/ftp;x-scheme-handler/http;x-scheme-handler/https;
|
||||||
|
Actions=new-window;new-private-window;
|
||||||
|
|
||||||
|
[Desktop Action new-window]
|
||||||
|
Name=New Window
|
||||||
|
Name[am]=አዲስ መስኮት
|
||||||
|
Name[ar]=نافذة جديدة
|
||||||
|
Name[bg]=Нов прозорец
|
||||||
|
Name[bn]=নতুন উইন্ডো
|
||||||
|
Name[ca]=Finestra nova
|
||||||
|
Name[cs]=Nové okno
|
||||||
|
Name[da]=Nyt vindue
|
||||||
|
Name[de]=Neues Fenster
|
||||||
|
Name[el]=Νέο Παράθυρο
|
||||||
|
Name[en_GB]=New Window
|
||||||
|
Name[es]=Nueva ventana
|
||||||
|
Name[et]=Uus aken
|
||||||
|
Name[fa]=پنجره جدید
|
||||||
|
Name[fi]=Uusi ikkuna
|
||||||
|
Name[fil]=New Window
|
||||||
|
Name[fr]=Nouvelle fenêtre
|
||||||
|
Name[gu]=નવી વિંડો
|
||||||
|
Name[hi]=नई विंडो
|
||||||
|
Name[hr]=Novi prozor
|
||||||
|
Name[hu]=Új ablak
|
||||||
|
Name[id]=Jendela Baru
|
||||||
|
Name[it]=Nuova finestra
|
||||||
|
Name[iw]=חלון חדש
|
||||||
|
Name[ja]=新規ウインドウ
|
||||||
|
Name[kn]=ಹೊಸ ವಿಂಡೊ
|
||||||
|
Name[ko]=새 창
|
||||||
|
Name[lt]=Naujas langas
|
||||||
|
Name[lv]=Jauns logs
|
||||||
|
Name[ml]=പുതിയ വിന്ഡോ
|
||||||
|
Name[mr]=नवीन विंडो
|
||||||
|
Name[nl]=Nieuw venster
|
||||||
|
Name[no]=Nytt vindu
|
||||||
|
Name[pl]=Nowe okno
|
||||||
|
Name[pt]=Nova janela
|
||||||
|
Name[pt_BR]=Nova janela
|
||||||
|
Name[ro]=Fereastră nouă
|
||||||
|
Name[ru]=Новое окно
|
||||||
|
Name[sk]=Nové okno
|
||||||
|
Name[sl]=Novo okno
|
||||||
|
Name[sr]=Нови прозор
|
||||||
|
Name[sv]=Nytt fönster
|
||||||
|
Name[sw]=Dirisha Jipya
|
||||||
|
Name[ta]=புதிய சாளரம்
|
||||||
|
Name[te]=క్రొత్త విండో
|
||||||
|
Name[th]=หน้าต่างใหม่
|
||||||
|
Name[tr]=Yeni Pencere
|
||||||
|
Name[uk]=Нове вікно
|
||||||
|
Name[vi]=Cửa sổ Mới
|
||||||
|
Name[zh_CN]=新建窗口
|
||||||
|
Name[zh_TW]=開新視窗
|
||||||
|
Exec=/usr/bin/google-chrome-stable
|
||||||
|
|
||||||
|
[Desktop Action new-private-window]
|
||||||
|
Name=New Incognito Window
|
||||||
|
Name[ar]=نافذة جديدة للتصفح المتخفي
|
||||||
|
Name[bg]=Нов прозорец „инкогнито“
|
||||||
|
Name[bn]=নতুন ছদ্মবেশী উইন্ডো
|
||||||
|
Name[ca]=Finestra d'incògnit nova
|
||||||
|
Name[cs]=Nové anonymní okno
|
||||||
|
Name[da]=Nyt inkognitovindue
|
||||||
|
Name[de]=Neues Inkognito-Fenster
|
||||||
|
Name[el]=Νέο παράθυρο για ανώνυμη περιήγηση
|
||||||
|
Name[en_GB]=New Incognito window
|
||||||
|
Name[es]=Nueva ventana de incógnito
|
||||||
|
Name[et]=Uus inkognito aken
|
||||||
|
Name[fa]=پنجره جدید حالت ناشناس
|
||||||
|
Name[fi]=Uusi incognito-ikkuna
|
||||||
|
Name[fil]=Bagong Incognito window
|
||||||
|
Name[fr]=Nouvelle fenêtre de navigation privée
|
||||||
|
Name[gu]=નવી છુપી વિંડો
|
||||||
|
Name[hi]=नई गुप्त विंडो
|
||||||
|
Name[hr]=Novi anoniman prozor
|
||||||
|
Name[hu]=Új Inkognitóablak
|
||||||
|
Name[id]=Jendela Penyamaran baru
|
||||||
|
Name[it]=Nuova finestra di navigazione in incognito
|
||||||
|
Name[iw]=חלון חדש לגלישה בסתר
|
||||||
|
Name[ja]=新しいシークレット ウィンドウ
|
||||||
|
Name[kn]=ಹೊಸ ಅಜ್ಞಾತ ವಿಂಡೋ
|
||||||
|
Name[ko]=새 시크릿 창
|
||||||
|
Name[lt]=Naujas inkognito langas
|
||||||
|
Name[lv]=Jauns inkognito režīma logs
|
||||||
|
Name[ml]=പുതിയ വേഷ പ്രച്ഛന്ന വിന്ഡോ
|
||||||
|
Name[mr]=नवीन गुप्त विंडो
|
||||||
|
Name[nl]=Nieuw incognitovenster
|
||||||
|
Name[no]=Nytt inkognitovindu
|
||||||
|
Name[pl]=Nowe okno incognito
|
||||||
|
Name[pt]=Nova janela de navegação anónima
|
||||||
|
Name[pt_BR]=Nova janela anônima
|
||||||
|
Name[ro]=Fereastră nouă incognito
|
||||||
|
Name[ru]=Новое окно в режиме инкогнито
|
||||||
|
Name[sk]=Nové okno inkognito
|
||||||
|
Name[sl]=Novo okno brez beleženja zgodovine
|
||||||
|
Name[sr]=Нови прозор за прегледање без архивирања
|
||||||
|
Name[sv]=Nytt inkognitofönster
|
||||||
|
Name[ta]=புதிய மறைநிலைச் சாளரம்
|
||||||
|
Name[te]=క్రొత్త అజ్ఞాత విండో
|
||||||
|
Name[th]=หน้าต่างใหม่ที่ไม่ระบุตัวตน
|
||||||
|
Name[tr]=Yeni Gizli pencere
|
||||||
|
Name[uk]=Нове вікно в режимі анонімного перегляду
|
||||||
|
Name[vi]=Cửa sổ ẩn danh mới
|
||||||
|
Name[zh_CN]=新建隐身窗口
|
||||||
|
Name[zh_TW]=新增無痕式視窗
|
||||||
|
Exec=/usr/bin/google-chrome-stable --incognito
|
||||||
|
|
@ -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}"`
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
'use strict'
|
'use strict'
|
||||||
module.exports = {
|
module.exports = {
|
||||||
NODE_ENV: '"production"'
|
NODE_ENV: '"production"',
|
||||||
|
PREFIX_PATH: `"${process.env.PREFIX_PATH}"`
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
--- core/rfb.js 2019-02-24 21:17:04.402944311 +0800
|
||||||
|
+++ core/rfb.js 2019-02-24 21:17:34.782484107 +0800
|
||||||
|
@@ -1256,8 +1256,8 @@
|
||||||
|
encs.push(encodings.encodingCopyRect);
|
||||||
|
// Only supported with full depth support
|
||||||
|
if (this._fb_depth == 24) {
|
||||||
|
- encs.push(encodings.encodingTight);
|
||||||
|
- encs.push(encodings.encodingTightPNG);
|
||||||
|
+ // encs.push(encodings.encodingTight);
|
||||||
|
+ // encs.push(encodings.encodingTightPNG);
|
||||||
|
encs.push(encodings.encodingHextile);
|
||||||
|
encs.push(encodings.encodingRRE);
|
||||||
|
}
|
||||||
|
|
@ -13,9 +13,9 @@
|
||||||
"build": "node build/build.js"
|
"build": "node build/build.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^0.18.0",
|
"axios": "^0.21.1",
|
||||||
"vue": "^2.5.2",
|
"vue": "^2.5.2",
|
||||||
"vue-material": "^1.0.0-beta-7",
|
"vue-material": "^1.0.0-beta-10.2",
|
||||||
"vue-router": "^3.0.1"
|
"vue-router": "^3.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
@ -49,7 +49,7 @@
|
||||||
"friendly-errors-webpack-plugin": "^1.6.1",
|
"friendly-errors-webpack-plugin": "^1.6.1",
|
||||||
"html-webpack-plugin": "^2.30.1",
|
"html-webpack-plugin": "^2.30.1",
|
||||||
"nightwatch": "^0.9.12",
|
"nightwatch": "^0.9.12",
|
||||||
"node-notifier": "^5.1.2",
|
"node-notifier": "^8.0.1",
|
||||||
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
"optimize-css-assets-webpack-plugin": "^3.2.0",
|
||||||
"ora": "^1.2.0",
|
"ora": "^1.2.0",
|
||||||
"portfinder": "^1.0.13",
|
"portfinder": "^1.0.13",
|
||||||
|
|
@ -67,11 +67,12 @@
|
||||||
"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-dev-server": "^2.9.1",
|
"webpack-cli": "^3.3.7",
|
||||||
|
"webpack-dev-server": "^3.2.1",
|
||||||
"webpack-merge": "^4.1.0"
|
"webpack-merge": "^4.1.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 9.0.0",
|
"node": ">= 8.0.0",
|
||||||
"npm": ">= 3.0.0"
|
"npm": ">= 3.0.0"
|
||||||
},
|
},
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
|
|
|
||||||
|
|
@ -136,6 +136,7 @@ export default {
|
||||||
// console.trace()
|
// console.trace()
|
||||||
console.log(`connecting...`)
|
console.log(`connecting...`)
|
||||||
this.errorMessage = ''
|
this.errorMessage = ''
|
||||||
|
let websockifyPath = location.pathname.substr(1) + '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)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
|
|
@ -334,9 +328,13 @@
|
||||||
</audio>
|
</audio>
|
||||||
<script type="module">
|
<script type="module">
|
||||||
import UI from './novnc/app/ui.js';
|
import UI from './novnc/app/ui.js';
|
||||||
|
var f = function () {
|
||||||
|
if (!UI.rfb) {
|
||||||
|
setTimeout(f, 1000);
|
||||||
|
} else {
|
||||||
UI.rfb.addEventListener('connect', function(event) {
|
UI.rfb.addEventListener('connect', function(event) {
|
||||||
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'connected'}), '*');
|
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);
|
||||||
});
|
});
|
||||||
|
|
@ -344,6 +342,9 @@
|
||||||
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'disconnected'}), '*');
|
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'disconnected'}), '*');
|
||||||
});
|
});
|
||||||
// console.log(UI.rfb._rfb_connection_state);
|
// console.log(UI.rfb._rfb_connection_state);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
f();
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||