Compare commits

..

102 commits

Author SHA1 Message Date
Doro Wu
e4922ce92f
Merge pull request #235 from fcwu/dependabot/npm_and_yarn/web/dot-prop-4.2.1
chore(deps): bump dot-prop from 4.2.0 to 4.2.1 in /web
2021-04-04 09:42:55 +08:00
dependabot[bot]
402ae8480e
chore(deps): bump dot-prop from 4.2.0 to 4.2.1 in /web
Bumps [dot-prop](https://github.com/sindresorhus/dot-prop) from 4.2.0 to 4.2.1.
- [Release notes](https://github.com/sindresorhus/dot-prop/releases)
- [Commits](https://github.com/sindresorhus/dot-prop/compare/v4.2.0...v4.2.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-04 01:41:32 +00:00
Doro Wu
2af5a6de3d
Merge pull request #203 from fcwu/dependabot/npm_and_yarn/web/http-proxy-1.18.1
chore(deps): bump http-proxy from 1.18.0 to 1.18.1 in /web
2021-04-04 09:41:23 +08:00
Doro Wu
fc062fd475
Merge pull request #216 from fcwu/dependabot/npm_and_yarn/web/ini-1.3.7
chore(deps): bump ini from 1.3.5 to 1.3.7 in /web
2021-04-04 09:40:57 +08:00
Doro Wu
7cc73c0903
Merge pull request #217 from fcwu/dependabot/npm_and_yarn/web/node-notifier-8.0.1
chore(deps-dev): bump node-notifier from 5.4.3 to 8.0.1 in /web
2021-04-04 09:40:39 +08:00
dependabot[bot]
534231c44b
chore(deps): bump http-proxy from 1.18.0 to 1.18.1 in /web
Bumps [http-proxy](https://github.com/http-party/node-http-proxy) from 1.18.0 to 1.18.1.
- [Release notes](https://github.com/http-party/node-http-proxy/releases)
- [Changelog](https://github.com/http-party/node-http-proxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/http-party/node-http-proxy/compare/1.18.0...1.18.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-04 01:40:34 +00:00
Doro Wu
4bf2bab0e4
Merge pull request #228 from fcwu/dependabot/npm_and_yarn/web/elliptic-6.5.4
chore(deps): bump elliptic from 6.5.1 to 6.5.4 in /web
2021-04-04 09:40:25 +08:00
Doro Wu
51c11693b8
Merge pull request #218 from fcwu/dependabot/npm_and_yarn/web/axios-0.21.1
chore(deps): bump axios from 0.18.1 to 0.21.1 in /web
2021-04-04 09:39:34 +08:00
Doro Wu
6b473f3409
Merge pull request #230 from fcwu/dependabot/pip/rootfs/usr/local/lib/web/backend/jinja2-2.11.3
chore(deps): bump jinja2 from 2.10.3 to 2.11.3 in /rootfs/usr/local/lib/web/backend
2021-04-04 09:39:22 +08:00
Doro Wu
ba08e79a0a
Merge pull request #234 from fcwu/dependabot/npm_and_yarn/web/y18n-3.2.2
chore(deps): bump y18n from 3.2.1 to 3.2.2 in /web
2021-04-04 09:39:07 +08:00
dependabot[bot]
7dbf4dcfa7
chore(deps): bump y18n from 3.2.1 to 3.2.2 in /web
Bumps [y18n](https://github.com/yargs/y18n) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-30 14:43:14 +00:00
dependabot[bot]
ed863976d8
chore(deps): bump jinja2 in /rootfs/usr/local/lib/web/backend
Bumps [jinja2](https://github.com/pallets/jinja) from 2.10.3 to 2.11.3.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/master/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/2.10.3...2.11.3)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-20 01:27:19 +00:00
dependabot[bot]
09a4c478a5
chore(deps): bump elliptic from 6.5.1 to 6.5.4 in /web
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.1 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.1...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-09 01:37:24 +00:00
Doro Wu
8d323eca97
feat: add ubuntu 20.04 arm64 2021-03-03 22:43:44 +08:00
dependabot[bot]
cd4ba0b05d
chore(deps): bump axios from 0.18.1 to 0.21.1 in /web
Bumps [axios](https://github.com/axios/axios) from 0.18.1 to 0.21.1.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v0.21.1/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v0.18.1...v0.21.1)

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-05 07:32:07 +00:00
dependabot[bot]
9a06ac1255
chore(deps-dev): bump node-notifier from 5.4.3 to 8.0.1 in /web
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 5.4.3 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v5.4.3...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-21 21:34:27 +00:00
dependabot[bot]
58213d8593
chore(deps): bump ini from 1.3.5 to 1.3.7 in /web
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.7.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.7)

Signed-off-by: dependabot[bot] <support@github.com>
2020-12-11 03:07:18 +00:00
Doro Wu
75c5f5549f fix: repeatly autostart (issue#85) 2020-07-22 22:48:31 +08:00
Doro Wu
8e6e37e097 docs: update README.md 2020-07-22 22:48:31 +08:00
Doro Wu
d58b5c2f22 fix(jinja): support LXDE and Ubuntu 20.04 only 2020-07-22 22:48:31 +08:00
Doro Wu
c41043bec9
Merge pull request #196 from fcwu/dependabot/npm_and_yarn/web/lodash-4.17.19
chore(deps): bump lodash from 4.17.15 to 4.17.19 in /web
2020-07-22 08:54:22 +08:00
dependabot[bot]
245ac95552
chore(deps): bump lodash from 4.17.15 to 4.17.19 in /web
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>
2020-07-16 20:03:15 +00:00
Doro Wu
c571aa57bf
Merge pull request #192 from 486/set_size
Have set_size use color depth of 24
2020-07-06 19:51:29 +08:00
Robert Hoffmann
beb25ee06a
Have resolution updates use color depth of 24 2020-07-06 12:55:16 +02:00
Doro Wu
3c7b6dd70c
Merge pull request #185 from fcwu/dependabot/npm_and_yarn/web/websocket-extensions-0.1.4
chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 in /web
2020-06-08 21:44:26 +08:00
dependabot[bot]
12a80b7c53
chore(deps): bump websocket-extensions from 0.1.3 to 0.1.4 in /web
Bumps [websocket-extensions](https://github.com/faye/websocket-extensions-node) from 0.1.3 to 0.1.4.
- [Release notes](https://github.com/faye/websocket-extensions-node/releases)
- [Changelog](https://github.com/faye/websocket-extensions-node/blob/master/CHANGELOG.md)
- [Commits](https://github.com/faye/websocket-extensions-node/compare/0.1.3...0.1.4)

Signed-off-by: dependabot[bot] <support@github.com>
2020-06-06 14:03:42 +00:00
Doro Wu
9d7362e87c
fix(websocket): RELATIVE_URL_ROOT not works on websockify (#157) 2020-05-26 15:21:30 +08:00
Doro Wu
ae4e571be3
doc: update focal 2020-05-16 21:14:59 +08:00
Doro Wu
c3bce99da9
feat: Ubuntu focal 20.04 2020-05-11 23:16:03 +08:00
Doro Wu
0e70047bdc fix: novnc language (#174) 2020-04-24 15:02:47 +08:00
Doro Wu
2bd60c0f88 fix: USER does not work #176 2020-04-24 15:01:34 +08:00
Doro Wu
5ab34a8aef fix: capslock not work (#173) 2020-04-16 08:13:23 +08:00
Doro Wu
2ceb2a1574
Merge pull request #170 from srghma/patch-1
update nodejs version
2020-04-06 13:46:47 +08:00
Serhii Khoma
60f4d82a65 feat: update node version from 8 to 12 2020-04-06 08:16:08 +03:00
Doro Wu
73349836cb
Merge pull request #168 from tedder/patch-1
18.04; copyedit
2020-03-12 21:21:27 +08:00
Ted Timmons
2ba96474d7
18.04; copyedit
Change the lede to 'advertise' 18.04 so it doesn't feel outdated. (yes, 16.04 is available and explained in the tags later)
2020-03-11 11:01:13 -07:00
Doro Wu
60f9ae18e7
chore: upgrade web packages 2019-10-22 10:42:47 +08:00
Doro Wu
7ee6c9175f
chore: upgrade python packages 2019-10-22 10:16:01 +08:00
Doro Wu
0c38539444
Merge pull request #151 from fcwu/dependabot/npm_and_yarn/web/mixin-deep-1.3.2
chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 in /web
2019-10-22 09:15:36 +08:00
dependabot[bot]
e885d558a8
chore(deps): bump mixin-deep from 1.3.1 to 1.3.2 in /web
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](https://github.com/jonschlinkert/mixin-deep/compare/1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
2019-10-21 15:56:19 +00:00
Doro Wu
9bf4a1bda4
chore: add github issue template 2019-10-21 05:41:15 +08:00
Doro Wu
5975c36dc7
cont: fix(build): fix ubuntu 16.04 not to find x11vnc package (issue #141) 2019-09-28 19:35:32 +08:00
Doro Wu
34ca3dc9c9
fix(build): fix ubuntu 16.04 not to find x11vnc package (issue #141) 2019-09-28 12:22:34 +08:00
Doro Wu
ee4b0bf9ec
feat: support arm64 2019-09-17 09:33:23 +08:00
Doro Wu
e457b2dbab
fix: saving desktop status (issues #124) 2019-09-15 21:57:55 +08:00
Doro Wu
9505dead57
Merge pull request #134 from Felix-neko/develop
Supervisord: running without full path
2019-08-19 17:10:26 +08:00
Felix-Neko
0552617a5b supervisord is now running just as supervisord instead of full path (in some Ubuntu 18.04 distros it lyes in other dirs than /usr/bin) 2019-08-19 11:39:26 +03:00
Doro Wu
1affc9183a
feat: add resize endpoint to resize screen size (fix #115) 2019-08-19 14:07:08 +08:00
Doro Wu
d4d3f867d5
fix: set default color depth to 24 (fix #130) 2019-08-19 01:27:24 +08:00
Doro Wu
fb28d897fc
feat: support RELATIVE_URL_ROOT (fix #127) 2019-08-19 01:14:34 +08:00
Doro Wu
9b94a2fbeb
Merge pull request #128 from tostein/configureable_path
Dynamic prefix path
2019-08-17 23:16:37 +08:00
Tobias Stein
0cb3248487 Set paths after handling dynamic prefix path 2019-08-06 16:11:03 +02:00
Tobias Stein
fe7954da78 Fix typo. 2019-07-22 10:19:16 +02:00
Tobias Stein
1d5e9f6dca Enable dynamic prefix path handling 2019-07-11 11:49:06 +02:00
Tobias Stein
328e8f1aa1 Add separate docker file for linux 16.04
Enable dynamic path with environment variable which triggers node js build at container runtime
2019-07-08 13:06:02 +02:00
Tobias Stein
b0ece0637c Add rename URL script to update nginx config with prefix path ENV 2019-06-28 11:24:08 +02:00
Tobias Stein
f48e7551f4 Let node.js use the docker env 2019-06-28 10:15:13 +02:00
Tobias Stein
175d7a8517 Add ENV variable PREFIX_PATH to backend and web project 2019-06-26 11:56:29 +02:00
Tobias Stein
f26fe29012 Changes to make deployment path configureable with prefix by ENV 2019-06-24 11:00:44 +02:00
Tobias Stein
1c3f34aa6e Add docker file with reusable node build 2019-06-12 10:42:47 +02:00
Doro Wu
c85026298e
feat: update noVNC to v1.1.0, flv.js to v1.5.0 2019-04-23 23:32:29 +08:00
DoroWu
5e9ff11764
doc: update README.md
update /dev/shm
2019-04-05 12:43:37 +08:00
DoroWu
9d7e06c824
Merge pull request #111 from olberger/master
Proposed description of the architecture
2019-04-05 12:36:46 +08:00
Olivier Berger
2ba8a28748 make LOCALBUILD=0 should be working 2019-04-04 16:43:48 +02:00
Olivier Berger
d50463920d Ensure rebuild is really made 2019-04-04 16:43:22 +02:00
Olivier Berger
59822970a7 More docs 2019-04-04 16:42:58 +02:00
Olivier Berger
034a4876f4 Some more docs 2019-04-04 16:41:31 +02:00
Olivier Berger
b7ee1c3f5c Work-around config issue 2019-04-04 15:15:59 +02:00
Olivier Berger
eef40af3a4 Alternative option to git clone --recursive 2019-04-04 15:14:26 +02:00
Olivier Berger
a4c6b2b9aa Initial description of the architecture 2019-04-04 13:57:11 +02:00
DoroWu
5c9261d592
Merge pull request #109 from lifei/patch-1
make sure the type of input value is int
2019-04-01 10:42:11 +08:00
软件工程师李飛
2280e040d0
make sure the type of input value is int 2019-03-31 05:35:51 +08:00
Doro Wu
68887af903
feat: support xfce4 2019-03-25 00:09:22 +08:00
DoroWu
334325ec3c
doc: update DEVELOPMENT.md 2019-03-23 23:12:46 +08:00
Doro Wu
35d0080b79
fix: armhf 2019-03-20 22:56:58 +08:00
Doro Wu
588b38ca03
test: hooks 2019-03-20 21:37:46 +08:00
Doro Wu
10423e2ce4
fix: armhf 2019-03-19 22:28:18 +08:00
Doro Wu
213ca63e7e
feat: upgrade yarn.lock 2019-03-18 11:35:23 +08:00
Doro Wu
f9ae9a3337
feat: upgrade yarn.lock 2019-03-18 11:26:55 +08:00
Doro Wu
548a511a54
Merge branch 'mcree-master' 2019-03-18 09:34:22 +08:00
Doro Wu
5088c5af01
feat: merge mcree:master supporting Dockerfile by jinja 2019-03-18 09:33:35 +08:00
Erno Rigo
ed74dcda84 Basic templating support 2019-03-12 21:05:16 +01:00
Doro Wu
8f3a5ceb42
ttt 2019-02-24 23:13:17 +08:00
Doro Wu
99ceecbf0e
feat: add OPENBOX_ARGS (issue #97) 2019-02-24 21:44:07 +08:00
Doro Wu
f1d608d92c
fix: mask tight encoding for armhf (bug #98) 2019-02-24 21:25:35 +08:00
Doro Wu
0adc0da8e8
feat: support x11vnc args - X11VNC_ARGS (bug #101)
Docker env X11VNC_ARGS
2019-02-23 17:04:45 +08:00
Doro Wu
e6441d418a fix: FFmpeg depedency update 2019-02-22 15:03:09 +08:00
Doro Wu
6d8a4b2569
fix: novnc disconnected if idle 1 min 2018-12-18 17:35:41 +08:00
Doro Wu
43238d93a8
fix: vnc crash (issue #88)
upgrade x11vnc >= 0.9.13-6
2018-12-17 02:50:02 +08:00
Doro Wu
d87aa06c36
fix: security issue 2018-12-17 02:48:03 +08:00
Doro Wu
0151957c25
fix: requests security issue 2018-11-27 13:37:47 +08:00
Doro Wu
2640079f5d
fix: build failed 2018-11-27 13:36:02 +08:00
DoroWu
1a89dce557
Merge pull request #90 from chipkent/abstract_base_image
Allow users to choose the base image
2018-11-27 13:07:08 +08:00
David R. "Chip" Kent IV
0811a346a7 Allow the VNC/noVNC to be applied over another docker image 2018-11-26 21:21:12 -07:00
Doro Wu
91f7dab344 doc: update README 2018-10-23 00:39:44 +08:00
Doro Wu
e0d5e53998 fix(flask): flask security issue 2018-10-17 21:38:48 +08:00
DoroWu
32125c8564
doc(readme): add autostart 2018-10-17 21:30:42 +08:00
Doro Wu
8c3d7d46f6 fix: Healthcheck fails if HTTP_PASSWORD set (issue#86) 2018-09-19 22:36:14 +08:00
DoroWu
bd02bd87f3
docs: update README 2018-08-27 16:52:05 +08:00
Doro Wu
a399316536
feat: add armhf 2018-07-11 00:15:05 +08:00
DoroWu
4748358100
doc: update README.md 2018-07-10 11:54:32 +08:00
Doro Wu
fe4d1d6336
feat: support Ubuntu 18.04 Bionic 2018-07-10 09:31:46 +08:00
58 changed files with 3856 additions and 2264 deletions

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

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

View file

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

41
ARCHITECTURE.md Normal file
View file

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

View file

@ -1,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
```
## 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
supervisorctl stop web
supervisorctl -c /etc/supervisor/supervisord.conf stop web
cd /src/image/usr/local/lib/web/backend
./run.py --debug
```
## develop frontend
```
cd web
yarn add

View file

@ -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://tw.archive.ubuntu.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-amd64-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://tw.archive.ubuntu.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 system
LABEL maintainer="fcwu.tw@gmail.com"
COPY --from=builder /src/web/dist/ /usr/local/lib/web/frontend/
COPY image /
EXPOSE 80
WORKDIR /root
ENV HOME=/home/ubuntu \
SHELL=/bin/bash
HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1/api/health
ENTRYPOINT ["/startup.sh"]

1
Dockerfile Symbolic link
View file

@ -0,0 +1 @@
Dockerfile.amd64

129
Dockerfile.amd64 Normal file
View file

@ -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"]

129
Dockerfile.arm64 Normal file
View file

@ -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"]

124
Dockerfile.armhf Normal file
View file

@ -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"]

137
Dockerfile.j2 Normal file
View file

@ -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"]

View file

@ -1,27 +1,61 @@
.PHONY: build run
# Default values for variables
REPO ?= dorowu/ubuntu-desktop-lxde-vnc
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:
docker build -t $(REPO):$(TAG) --build-arg localbuild=1 .
# These files will be generated from teh Jinja templates (.j2 sources)
templates = Dockerfile rootfs/etc/supervisor/conf.d/supervisord.conf
# Rebuild the container image
build: $(templates)
docker build -t $(REPO):$(TAG) .
# Test run the container
# the local dir will be mounted under /src read-only
run:
docker run --rm \
docker run --privileged --rm \
-p 6080:80 -p 6081:443 \
-v ${PWD}:/src:ro \
-e USER=doro -e PASSWORD=mypassword \
-e ALSADEV=hw:2,0 \
-e SSL_PORT=443 \
-e RELATIVE_URL_ROOT=approot \
-e OPENBOX_ARGS="--startup /usr/bin/galculator" \
-v ${PWD}/ssl:/etc/nginx/ssl \
--device /dev/snd \
--name ubuntu-desktop-lxde-test \
$(REPO):$(TAG)
# Connect inside the running container for debugging
shell:
docker exec -it ubuntu-desktop-lxde-test bash
# Generate the SSL/TLS config for HTTPS
gen-ssl:
mkdir -p ssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-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 $@

124
README.md
View file

@ -1,99 +1,129 @@
docker-ubuntu-vnc-desktop
=========================
# docker-ubuntu-vnc-desktop
[![Docker Pulls](https://img.shields.io/docker/pulls/dorowu/ubuntu-desktop-lxde-vnc.svg)](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/)
[![Docker Stars](https://img.shields.io/docker/stars/dorowu/ubuntu-desktop-lxde-vnc.svg)](https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc/)
Docker image to provide HTML5 VNC interface to access Ubuntu 16.04 LXDE desktop environment.
docker-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`
```
docker run -p 6080:80 dorowu/ubuntu-desktop-lxde-vnc
```shell
docker run -p 6080:80 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc
```
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/>
### 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
```
docker run -p 6080:80 -p 5900:5900 dorowu/ubuntu-desktop-lxde-vnc
```shell
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
```
docker run -p 6080:80 -p 5900:5900 -e VNC_PASSWORD=mypassword dorowu/ubuntu-desktop-lxde-vnc
```shell
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.
HTTP Base Authentication
---------------------------
## HTTP Base Authentication
This image provides base access authentication of HTTP via `HTTP_PASSWORD`
```
docker run -p 6080:80 -e HTTP_PASSWORD=mypassword dorowu/ubuntu-desktop-lxde-vnc
```shell
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
```
```shell
mkdir -p ssl
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
```
docker run -p 6081:443 -e SSL_PORT=443 -v ${PWD}/ssl:/etc/nginx/ssl dorowu/ubuntu-desktop-lxde-vnc
```shell
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
```
docker run -p 6080:80 -e RESOLUTION=1920x1080 dorowu/ubuntu-desktop-lxde-vnc
```shell
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,
```
docker run -p 6080:80 -e USER=doro -e PASSWORD=password dorowu/ubuntu-desktop-lxde-vnc
```shell
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.
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
```
Start the container
```
```shell
docker run -it --rm -p 6080:80 --device /dev/snd -e ALSADEV=hw:2,0 dorowu/ubuntu-desktop-lxde-vnc
```
@ -106,13 +136,29 @@ Following is the screen capture of these operations. Turn on your sound at the e
[![demo video](http://img.youtube.com/vi/Kv9FGClP1-k/0.jpg)](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
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.

2
TODO Normal file
View file

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

8
flavors/lxde.yml Normal file
View file

@ -0,0 +1,8 @@
---
addon_packages:
- vim-tiny
- firefox
- chromium-browser
- ttf-ubuntu-font-family
- ttf-wqy-zenhei
desktop: lxde

8
flavors/lxqt.yml Normal file
View file

@ -0,0 +1,8 @@
---
addon_packages:
- vim-tiny
- firefox
- chromium-browser
- ttf-ubuntu-font-family
- ttf-wqy-zenhei
desktop: lxqt

6
flavors/xfce4.yml Normal file
View file

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

4
hooks/pre_build Normal file
View file

@ -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

View file

@ -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;
}
}

View file

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

View file

@ -1,20 +0,0 @@
backports.ssl-match-hostname==3.5.0.1
certifi==2018.1.18
chardet==3.0.4
click==6.7
Flask==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

View file

@ -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 duyt 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 cp 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

View file

@ -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;
}
}

View file

@ -17,14 +17,10 @@ stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/1
stderr_logfile_maxbytes=0
[group:x]
programs=xvfb,wm,lxpanel,pcmanfm,x11vnc,novnc
[program:xvfb]
priority=10
command=/usr/local/bin/xvfb.sh
stopsignal=KILL
[program:wm]
priority=15
command=/usr/bin/openbox
@ -42,11 +38,22 @@ priority=15
directory=%HOME%
command=/usr/bin/pcmanfm --desktop --profile LXDE
user=%USER%
stopwaitsecs=3
environment=DISPLAY=":1",HOME="%HOME%",USER="%USER%"
[program:xvfb]
priority=10
command=/usr/local/bin/xvfb.sh
stopsignal=KILL
[program:x11vnc]
priority=20
command=x11vnc -display :1 -xkb -forever -shared -repeat
command=x11vnc -display :1 -xkb -forever -shared -repeat -capslock
[program:novnc]
priority=25

View file

@ -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

View file

@ -8,6 +8,14 @@ if [ -n "$VNC_PASSWORD" ]; then
export VNC_PASSWORD=
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
sed -i "s/1024x768/$RESOLUTION/" /usr/local/bin/xvfb.sh
fi
@ -23,16 +31,18 @@ if [ "$USER" != "root" ]; then
fi
HOME=/home/$USER
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
fi
sed -i "s|%USER%|$USER|" /etc/supervisor/conf.d/supervisord.conf
sed -i "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf
sed -i -e "s|%USER%|$USER|" -e "s|%HOME%|$HOME|" /etc/supervisor/conf.d/supervisord.conf
# home folder
mkdir -p $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
if [ ! -x "$HOME/.config/pcmanfm/LXDE/" ]; then
mkdir -p $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
fi
# nginx workers
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
fi
# novnc websockify
ln -s /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
# dynamic prefix path renaming
if [ -n "$RELATIVE_URL_ROOT" ]; then
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
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

View file

@ -5,4 +5,4 @@ if [ -z "$ALSADEV" ]; then
exit 1
fi
exec /usr/bin/chromium-browser --no-sandbox --alsa-output-device="$ALSADEV" "$@"
exec /usr/bin/google-chrome --no-sandbox --alsa-output-device="$ALSADEV" "$@"

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

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

View file

@ -0,0 +1,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

View file

@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import (
absolute_import, division, print_function, with_statement
)
@ -74,7 +74,7 @@ def main():
def run_server():
import socket
from gevent.wsgi import WSGIServer
from gevent.pywsgi import WSGIServer
from vnc.app import app
# websocket conflict: WebSocketHandler
@ -114,6 +114,7 @@ def main():
)
logging.getLogger("werkzeug").setLevel(logging.WARNING)
log = logging.getLogger('novnc2')
entrypoint()

View file

@ -2,7 +2,7 @@ from __future__ import (
absolute_import, division, print_function, with_statement
)
import re
from os import environ
import os
from flask import (
Flask,
request,
@ -21,7 +21,7 @@ from .log import log
# Flask app
app = Flask('novnc2')
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')
@ -47,8 +47,8 @@ def apihealth():
def reset():
if 'w' in request.args and 'h' in request.args:
args = {
'w': request.args.get('w'),
'h': request.args.get('h'),
'w': int(request.args.get('w')),
'h': int(request.args.get('h')),
}
state.set_size(args['w'], args['h'])
@ -68,6 +68,13 @@ def reset():
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')
@httperror
def liveflv():
@ -144,7 +151,7 @@ def liveflv():
cmd,
stdout=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):

View file

@ -28,7 +28,10 @@ class State(object):
def _update_health(self):
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'):
if not line.startswith('web') and line.find('RUNNING') < 0:
health = False
@ -62,13 +65,16 @@ class State(object):
'sed -i \'s#'
'^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'
).format(w, h), shell=True)
self.size_changed_count += 1
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.notify()
@ -107,6 +113,9 @@ class State(object):
except gsp.CalledProcessError as e:
log.warn('failed to get dispaly size: ' + str(e))
def reset_size(self):
self.size_changed_count = 0
@property
def w(self):
return self._w

View file

Before

Width:  |  Height:  |  Size: 339 KiB

After

Width:  |  Height:  |  Size: 339 KiB

View file

Before

Width:  |  Height:  |  Size: 527 KiB

After

Width:  |  Height:  |  Size: 527 KiB

View file

Before

Width:  |  Height:  |  Size: 246 KiB

After

Width:  |  Height:  |  Size: 246 KiB

View file

Before

Width:  |  Height:  |  Size: 870 KiB

After

Width:  |  Height:  |  Size: 870 KiB

View file

@ -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 duyt 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 cp 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]=Ca s Mi
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]=Ca s n danh mi
Name[zh_CN]=
Name[zh_TW]=
Exec=/usr/bin/google-chrome-stable --incognito

View file

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

View file

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

View file

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

13
web/novnc-armhf-1.patch Normal file
View file

@ -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);
}

View file

@ -13,9 +13,9 @@
"build": "node build/build.js"
},
"dependencies": {
"axios": "^0.18.0",
"axios": "^0.21.1",
"vue": "^2.5.2",
"vue-material": "^1.0.0-beta-7",
"vue-material": "^1.0.0-beta-10.2",
"vue-router": "^3.0.1"
},
"devDependencies": {
@ -49,7 +49,7 @@
"friendly-errors-webpack-plugin": "^1.6.1",
"html-webpack-plugin": "^2.30.1",
"nightwatch": "^0.9.12",
"node-notifier": "^5.1.2",
"node-notifier": "^8.0.1",
"optimize-css-assets-webpack-plugin": "^3.2.0",
"ora": "^1.2.0",
"portfinder": "^1.0.13",
@ -67,11 +67,12 @@
"vue-template-compiler": "^2.5.2",
"webpack": "^3.6.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"
},
"engines": {
"node": ">= 9.0.0",
"node": ">= 8.0.0",
"npm": ">= 3.0.0"
},
"browserslist": [

View file

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

View file

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

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

File diff suppressed because one or more lines are too long

View file

@ -32,7 +32,7 @@
</head>
<body>
<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.
</video>
<br>
@ -63,21 +63,38 @@
//flv_load();
var videoElement = document.getElementsByName('videoElement')[0];
flvPlayer = flvjs.createPlayer({
type: 'flv',
url: url,
isLive: true,
withCredentials: true
}, {isLive: true, enableStashBuffer: false});
type: 'flv',
url: url,
isLive: true,
withCredentials: true
}, { isLive: true, enableStashBuffer: false });
flvPlayer.attachMediaElement(videoElement);
flvPlayer.load();
flvPlayer.play();
flvPlayer.on("error", function() {
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 () {
window.location.reload();
});
} catch (e) {
console.log(e);
}
});
});
</script>
</body>
</html>

View file

@ -1,12 +1,10 @@
<!DOCTYPE html>
<html class="noVNC_loading">
<html lang="en" class="noVNC_loading">
<head>
<!--
noVNC example: simple example using default UI
Copyright (C) 2012 Joel Martin
Copyright (C) 2016 Samuel Mannehed for Cendio AB
Copyright (C) 2016 Pierre Ossman for Cendio AB
Copyright (C) 2018 The noVNC Authors
noVNC is licensed under the MPL 2.0 (see LICENSE.txt)
This file is licensed under the 2-Clause BSD license (see LICENSE.txt).
@ -17,13 +15,9 @@
-->
<title>noVNC</title>
<meta charset="utf-8" />
<meta charset="utf-8">
<!-- Always force latest IE rendering engine (even in intranet) & Chrome Frame
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) -->
<!-- Icons (see app/images/icons/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="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">
@ -38,31 +32,26 @@
<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">
<!-- 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 -->
<link rel="icon" sizes="16x16" type="image/png" href="novnc/app/images/icons/novnc-16x16.png">
<!-- Apple iOS Safari settings -->
<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-status-bar-style" content="black-translucent" />
<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-status-bar-style" content="black-translucent">
<!-- 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="76x76" type="novnc/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="152x152" type="novnc/image/png" href="novnc/app/images/icons/novnc-152x152.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="image/png" href="novnc/app/images/icons/novnc-76x76.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="image/png" href="novnc/app/images/icons/novnc-152x152.png">
<!-- Stylesheets -->
<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>
-->
<link rel="stylesheet" href="novnc/app/styles/base.css">
<!-- 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 -->
<!-- promise polyfills promises for IE11 -->
@ -102,54 +91,56 @@
<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 -->
<input type="image" alt="viewport drag" src="novnc/app/images/drag.svg"
id="noVNC_view_drag_button" class="noVNC_button noVNC_hidden"
title="Move/Drag Viewport" />
title="Move/Drag Viewport">
<!--noVNC Touch Device only buttons-->
<div id="noVNC_mobile_buttons">
<input type="image" alt="No mousebutton" src="novnc/app/images/mouse_none.svg"
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"
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"
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"
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"
id="noVNC_keyboard_button" class="noVNC_button"
value="Keyboard" title="Show Keyboard" />
id="noVNC_keyboard_button" class="noVNC_button" title="Show Keyboard">
</div>
<!-- Extra manual keys -->
<div id="noVNC_extra_keys">
<input type="image" alt="Extra keys" src="novnc/app/images/toggleextrakeys.svg"
id="noVNC_toggle_extra_keys_button" class="noVNC_button"
title="Show Extra Keys"/>
title="Show Extra Keys">
<div class="noVNC_vcenter">
<div id="noVNC_modifiers" class="noVNC_panel">
<input type="image" alt="Ctrl" src="novnc/app/images/ctrl.svg"
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"
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"
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"
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"
id="noVNC_send_ctrl_alt_del_button" class="noVNC_button"
title="Send Ctrl-Alt-Del" />
title="Send Ctrl-Alt-Del">
</div>
</div>
</div>
@ -157,58 +148,58 @@
<!-- Shutdown/Reboot -->
<input type="image" alt="Shutdown/Reboot" src="novnc/app/images/power.svg"
id="noVNC_power_button" class="noVNC_button"
title="Shutdown/Reboot..." />
title="Shutdown/Reboot...">
<div class="noVNC_vcenter">
<div id="noVNC_power" class="noVNC_panel">
<div class="noVNC_heading">
<img src="novnc/app/images/power.svg"> Power
<img alt="" src="novnc/app/images/power.svg"> Power
</div>
<input type="button" id="noVNC_shutdown_button" value="Shutdown" />
<input type="button" id="noVNC_reboot_button" value="Reboot" />
<input type="button" id="noVNC_reset_button" value="Reset" />
<input type="button" id="noVNC_shutdown_button" value="Shutdown">
<input type="button" id="noVNC_reboot_button" value="Reboot">
<input type="button" id="noVNC_reset_button" value="Reset">
</div>
</div>
<!-- Clipboard -->
<input type="image" alt="Clipboard" src="novnc/app/images/clipboard.svg"
id="noVNC_clipboard_button" class="noVNC_button"
title="Clipboard" />
title="Clipboard">
<div class="noVNC_vcenter">
<div id="noVNC_clipboard" class="noVNC_panel">
<div class="noVNC_heading">
<img src="novnc/app/images/clipboard.svg"> Clipboard
<img alt="" src="novnc/app/images/clipboard.svg"> Clipboard
</div>
<textarea id="noVNC_clipboard_text" rows=5></textarea>
<br />
<br>
<input id="noVNC_clipboard_clear_button" type="button"
value="Clear" class="noVNC_submit" />
value="Clear" class="noVNC_submit">
</div>
</div>
<!-- Toggle fullscreen -->
<input type="image" alt="Fullscreen" src="novnc/app/images/fullscreen.svg"
id="noVNC_fullscreen_button" class="noVNC_button noVNC_hidden"
title="Fullscreen" />
title="Fullscreen">
<!-- Settings -->
<input type="image" alt="Settings" src="novnc/app/images/settings.svg"
id="noVNC_settings_button" class="noVNC_button"
title="Settings" />
title="Settings">
<div class="noVNC_vcenter">
<div id="noVNC_settings" class="noVNC_panel">
<ul>
<li class="noVNC_heading">
<img src="novnc/app/images/settings.svg"> Settings
<img alt="" src="novnc/app/images/settings.svg"> Settings
</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>
<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><hr></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>
<label for="noVNC_setting_resize">Scaling Mode:</label>
@ -224,35 +215,39 @@
<div><ul>
<li>
<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>
<div class="noVNC_expander">WebSocket</div>
<div><ul>
<li>
<label><input id="noVNC_setting_encrypt" type="checkbox" /> Encrypt</label>
<label><input id="noVNC_setting_encrypt" type="checkbox"> Encrypt</label>
</li>
<li>
<label for="noVNC_setting_host">Host:</label>
<input id="noVNC_setting_host" />
<input id="noVNC_setting_host">
</li>
<li>
<label for="noVNC_setting_port">Port:</label>
<input id="noVNC_setting_port" type="number" />
<input id="noVNC_setting_port" type="number">
</li>
<li>
<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>
</ul></div>
</li>
<li><hr></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>
<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><hr></li>
<!-- Logging selection dropdown -->
@ -271,7 +266,7 @@
<!-- Connection Controls -->
<input type="image" alt="Disconnect" src="novnc/app/images/disconnect.svg"
id="noVNC_disconnect_button" class="noVNC_button"
title="Disconnect" />
title="Disconnect">
</div>
</div>
@ -288,7 +283,7 @@
<div id="noVNC_connect_dlg">
<div class="noVNC_logo" translate="no"><span>no</span>VNC</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>
@ -299,10 +294,10 @@
<ul>
<li>
<label>Password:</label>
<input id="noVNC_password_input" type="password" />
<input id="noVNC_password_input" type="password">
</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>
</ul>
</form></div>
@ -312,7 +307,7 @@
<div id="noVNC_transition">
<div id="noVNC_transition_text"></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 class="noVNC_spinner"></div>
</div>
@ -324,8 +319,7 @@
on-screen keyboard. Let's hope Chrome implements the ime-mode
style for example -->
<textarea id="noVNC_keyboardinput" autocapitalize="off"
autocorrect="off" autocomplete="off" spellcheck="false"
mozactionhint="Enter" tabindex="-1"></textarea>
autocomplete="off" spellcheck="false" tabindex="-1"></textarea>
</div>
<audio id="noVNC_bell">
@ -339,13 +333,13 @@
setTimeout(f, 1000);
} else {
UI.rfb.addEventListener('connect', function(event) {
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'connectedd'}), '*');
UI.rfb._display.defaultCursor();
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'connected'}), '*');
// UI.rfb._display.defaultCursor();
// console.log(UI.connected)
// console.log(event);
});
UI.rfb.addEventListener('disconnect', function(event) {
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'disconneccted'}), '*');
window.parent.postMessage(JSON.stringify({from: 'novnc', state: 'disconnected'}), '*');
});
// console.log(UI.rfb._rfb_connection_state);
}

File diff suppressed because it is too large Load diff