Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
noVNC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Armin Co
noVNC
Commits
ab21b2ea
Verified
Commit
ab21b2ea
authored
Jul 28, 2020
by
Armin Co
Browse files
Options
Downloads
Patches
Plain Diff
Initial commit
parent
367628a4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Dockerfile
+17
-0
17 additions, 0 deletions
Dockerfile
cvholp.pdf
+0
-0
0 additions, 0 deletions
cvholp.pdf
docker-compose.yml
+19
-0
19 additions, 0 deletions
docker-compose.yml
novnc_start.sh
+65
-0
65 additions, 0 deletions
novnc_start.sh
with
101 additions
and
0 deletions
Dockerfile
0 → 100644
+
17
−
0
View file @
ab21b2ea
# novnc builder
FROM
ubuntu:latest
AS
novnc
ENV
DEBIAN_FRONTEND noninteractive
RUN
apt-get update
&&
apt-get
install
-y
\
novnc
\
net-tools
\
bash
\
pwgen
\
x11vnc
\
tigervnc-standalone-server
\
tigervnc-viewer
\
xtightvncviewer
\
evince
COPY
./novnc_start.sh /
COPY
./vnc-testbild.pdf /
RUN
chmod
+x /novnc_start.sh
&&
\
touch
/root/.Xauthority
This diff is collapsed.
Click to expand it.
cvholp.pdf
0 → 100644
+
0
−
0
View file @
ab21b2ea
File added
This diff is collapsed.
Click to expand it.
docker-compose.yml
0 → 100644
+
19
−
0
View file @
ab21b2ea
version
:
'
3.4'
services
:
# just for building the image
#
novnc_image
:
build
:
context
:
./
target
:
novnc
image
:
novnc
# example novnc "room"
novnc_1
:
container_name
:
novnc_1
# is also the hostname
image
:
novnc
ports
:
-
6081:6080
# webinterface port
-
5500:5500
# vnc listening viewer
restart
:
always
command
:
[
"
./novnc_start.sh,
"
testcvh_password"
]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
novnc_start.sh
0 → 100644
+
65
−
0
View file @
ab21b2ea
#!/bin/bash
## Config
#
# Arguments that can be passed to the script:
VIEW_PASSWORD
=
$1
# novnc
# Display where content should be shwon
# and that will be shared.
display
=
:0
## Functions
#
# start vnc viewer in listening mode
start_vnc_viewer
()
{
listening_port
=
5500
vnc_passwd
=
"-passwd
$HOME
/.vnc/passwdp"
view_opts
=
"-DotWhenNoCursor=on -ViewOnly -Shared -FullScreen -DesktopSize 1920x1080"
DISPLAY
=
$display
xtigervncviewer
$vnc_passwd
$view_opts
-listen
$listening_port
}
# runs vnc_viewer
# and restarts after a lost connection
run_listening_vnc_viewer
()
{
while
:
do
echo
"Starting vnc listener"
start_vnc_viewer
;
echo
"Listener exited!'
\n
'"
;
sleep
1
;
done
}
## Script
#
# setup vnc for the user
su
$USER
-c
"mkdir
$HOME
/.vnc &&
\
echo '
$VIEW_PASSWORD
' | vncpasswd -f >
$HOME
/.vnc/passwd &&
\
echo '
$PRESENTATION_PASSWORD
' | vncpasswd -f >
$HOME
/.vnc/passwdp &&
\
chmod 600
$HOME
/.vnc/passwd &&
\
chmod 600
$HOME
/.vnc/passwdp &&
\
touch
$HOME
/.Xresources"
chown
-R
$USER
:
$USER
$HOME
# start vnc server / create display
vnc_opts
=
"-AcceptPointerEvents=off -AcceptKeyEvents=off -depth 24 -geometry 1920x1080"
tigervncserver
$display
$vnc_opts
# show a test image
DISPLAY
=
$display
evince cvholp.pdf
-p
1
--presentation
&
# start a listening vnc_viewer
# which you can connect to
run_listening_vnc_viewer &
# start NoVNC
exec
/usr/share/novnc/utils/launch.sh
--listen
6080
--vnc
localhost:5900
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment