mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-25 17:44:01 +01:00
Merge pull request #16 from kasmtech/create_ubuntu_packages
Create Ubuntu 18.04 package
This commit is contained in:
commit
41d518eda4
3
.gitignore
vendored
3
.gitignore
vendored
@ -11,3 +11,6 @@ CMakeCache.txt
|
|||||||
Makefile
|
Makefile
|
||||||
Makefile.in
|
Makefile.in
|
||||||
config.h
|
config.h
|
||||||
|
|
||||||
|
builder/build/
|
||||||
|
builder/www/
|
||||||
|
@ -1,22 +1,35 @@
|
|||||||
REQIUREMENTS
|
## REQIUREMENTS
|
||||||
Docker CE
|
Docker CE
|
||||||
|
|
||||||
|
# Build the www webpack
|
||||||
|
```
|
||||||
|
docker build -t kasmweb/www -f builder/dockerfile.www.build .
|
||||||
|
docker run -it --rm -v $PWD/builder/www:/build kasmweb/www:latest
|
||||||
|
```
|
||||||
|
|
||||||
# build the docker image
|
# build the docker image
|
||||||
|
```
|
||||||
cd /src_code_root
|
cd /src_code_root
|
||||||
sudo docker build -t kasmvncbuilder:18.04 -f builder/dockerfile.build .
|
docker build -t kasmvncbuilder:18.04 -f builder/dockerfile.ubuntu1804.build .
|
||||||
|
```
|
||||||
|
|
||||||
# run the builder
|
### Run the builder
|
||||||
sudo docker run -v /tmp:/build --rm kasmvncbuilder:18.04
|
```sh
|
||||||
|
mkdir -p builder/build
|
||||||
|
docker run -v /tmp:/build --rm kasmvncbuilder:18.04
|
||||||
|
cp /tmp/build/kasmvnc.ubuntu_18.04.tar.gz builder/build/
|
||||||
|
```
|
||||||
|
|
||||||
# tar will be on /tmp of host
|
### Build test desktop container
|
||||||
cp /tmp/kasmvnc*.tar.gz builder/
|
```sh
|
||||||
|
|
||||||
# build test desktop container with new binary installed
|
|
||||||
cd builder
|
cd builder
|
||||||
sudo docker build -t kasmvnctester:18.04 -f dockerfile.test .
|
docker build -t kasmvnctester:18.04 -f dockerfile.ubuntu1804.test .
|
||||||
|
```
|
||||||
# run an instance of the new destkop
|
|
||||||
sudo docker run -d -p 80:6901 -p 5901:5901 -e VNCOPTIONS="-detectScrolling -PreferBandwidth -DynamicQualityMin=0" kasmvnctester:latest
|
|
||||||
|
|
||||||
open browser and point to http://IPAddress/vnc_lite.html
|
### run an instance of the new destkop
|
||||||
default password is "vncpassword" or use a VNC client
|
```sh
|
||||||
|
docker run -it -p 443:8443 --rm -e "VNC_USER=username" -e "VNC_PW=password123" kasmvnctester:18.04
|
||||||
|
```
|
||||||
|
|
||||||
|
open browser and point to https://<ip-address>/vnc.html
|
||||||
|
The username and password were set in the docker run command
|
||||||
|
13
builder/build-deb
Executable file
13
builder/build-deb
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
docker build -t debbuilder_ubuntu:18.04 -f \
|
||||||
|
builder/dockerfile.ubuntu1804.deb.build .
|
||||||
|
|
||||||
|
deb_output_dir=$(cd .. && echo $PWD)
|
||||||
|
L_UID=$(id -u) #Ubuntu already has UID env var, but this should work on all Linix systems
|
||||||
|
L_GID=$(id -g)
|
||||||
|
docker run --rm -v "$deb_output_dir":/src --user $L_UID:$L_GID debbuilder_ubuntu:18.04 /bin/bash -c '/src/*/builder/build-deb-inside-docker'
|
9
builder/build-deb-inside-docker
Executable file
9
builder/build-deb-inside-docker
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
dpkg-buildpackage -us -uc -b
|
||||||
|
cp ../*.deb builder/build
|
||||||
|
lintian ../*.deb
|
22
builder/build-tarball
Executable file
22
builder/build-tarball
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
build_www_dir() {
|
||||||
|
docker build -t kasmweb/www -f builder/dockerfile.www.build .
|
||||||
|
docker run -it --rm -v $PWD/builder/www:/build kasmweb/www:latest
|
||||||
|
}
|
||||||
|
|
||||||
|
cd "$(dirname "$0")/.."
|
||||||
|
|
||||||
|
build_www_dir
|
||||||
|
|
||||||
|
docker pull ubuntu:18.04
|
||||||
|
docker build -t kasmvncbuilder:18.04 -f builder/dockerfile.ubuntu1804.build .
|
||||||
|
mkdir -p builder/build
|
||||||
|
docker run -v /tmp:/build --rm kasmvncbuilder:18.04
|
||||||
|
|
||||||
|
L_GID=$(id -g)
|
||||||
|
L_UID=$(id -u)
|
||||||
|
chown $L_UID:$L_GID /tmp/kasmvnc.ubuntu_18.04.tar.gz
|
||||||
|
mv /tmp/kasmvnc.ubuntu_18.04.tar.gz $PWD/builder/build/
|
@ -7,7 +7,10 @@
|
|||||||
|
|
||||||
# Ubuntu applies a million patches, but here we use upstream to simplify matters
|
# Ubuntu applies a million patches, but here we use upstream to simplify matters
|
||||||
cd /tmp
|
cd /tmp
|
||||||
wget https://www.x.org/archive/individual/xserver/xorg-server-1.19.6.tar.bz2
|
# default to the version of x in Ubuntu 18.04, otherwise caller will need to specify
|
||||||
|
XORG_VER=${XORG_VER:-"1.19.6"}
|
||||||
|
XORG_PATCH=$(echo "$XORG_VER" | grep -Po '^\d.\d+' | sed 's#\.##')
|
||||||
|
wget https://www.x.org/archive/individual/xserver/xorg-server-${XORG_VER}.tar.bz2
|
||||||
|
|
||||||
#git clone https://kasmweb@bitbucket.org/kasmtech/kasmvnc.git
|
#git clone https://kasmweb@bitbucket.org/kasmtech/kasmvnc.git
|
||||||
#cd kasmvnc
|
#cd kasmvnc
|
||||||
@ -23,10 +26,10 @@ sed -i -e '/find_package(FLTK/s@^@#@' \
|
|||||||
cmake .
|
cmake .
|
||||||
make -j5
|
make -j5
|
||||||
|
|
||||||
tar -C unix/xserver -xvf /tmp/xorg-server-1.19.6.tar.bz2 --strip-components=1
|
tar -C unix/xserver -xvf /tmp/xorg-server-${XORG_VER}.tar.bz2 --strip-components=1
|
||||||
|
|
||||||
cd unix/xserver
|
cd unix/xserver
|
||||||
patch -Np1 -i ../xserver119.patch
|
patch -Np1 -i ../xserver${XORG_PATCH}.patch
|
||||||
autoreconf -i
|
autoreconf -i
|
||||||
# Configuring Xorg is long and has many distro-specific paths.
|
# Configuring Xorg is long and has many distro-specific paths.
|
||||||
# The distro paths start after prefix and end with the font path,
|
# The distro paths start after prefix and end with the font path,
|
||||||
@ -64,4 +67,4 @@ mv release/maketarball3 release/maketarball
|
|||||||
|
|
||||||
make servertarball
|
make servertarball
|
||||||
|
|
||||||
cp kasmvnc*.tar.gz /build/
|
cp kasmvnc*.tar.gz /build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz
|
||||||
|
19
builder/build_www.sh
Executable file
19
builder/build_www.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# clear previous build
|
||||||
|
rm -rf /build/*
|
||||||
|
|
||||||
|
# build webpack
|
||||||
|
npm run build
|
||||||
|
# remove node stuff from directory
|
||||||
|
rm -rf node_modules/
|
||||||
|
# copy all to build dir
|
||||||
|
cp -R ./* /build/
|
||||||
|
|
||||||
|
# remove unneccesary files
|
||||||
|
cd /build
|
||||||
|
rm *.md
|
||||||
|
rm AUTHORS
|
||||||
|
rm *.yml
|
||||||
|
rm vnc.html
|
||||||
|
rm vnc_lite.html
|
20
builder/dockerfile.centos7.build
Normal file
20
builder/dockerfile.centos7.build
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
FROM centos:centos7
|
||||||
|
|
||||||
|
RUN yum install -y build-dep xorg-server libxfont-dev sudo
|
||||||
|
RUN yum install -y cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
|
||||||
|
RUN yum install -y libjpeg-dev libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev
|
||||||
|
|
||||||
|
# Additions for webp
|
||||||
|
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
||||||
|
RUN cd /tmp && tar -xzvf /tmp/libwebp-*
|
||||||
|
RUN cd /tmp/libwebp-1.0.2 && \
|
||||||
|
./configure --enable-static --disable-shared && \
|
||||||
|
make && make install
|
||||||
|
|
||||||
|
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||||
|
|
||||||
|
COPY . /src
|
||||||
|
RUN chown -R docker:docker /src
|
||||||
|
|
||||||
|
USER docker
|
||||||
|
ENTRYPOINT ["/src/builder/build.sh"]
|
31
builder/dockerfile.debian10.build
Normal file
31
builder/dockerfile.debian10.build
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
FROM debian:buster
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS debian
|
||||||
|
ENV KASMVNC_BUILD_OS_VER 10
|
||||||
|
ENV XORG_VER 1.20.10
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
RUN grep '^deb' /etc/apt/sources.list | sed 's#^deb#deb-src#' >> /etc/apt/sources.list
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -y install sudo
|
||||||
|
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
|
||||||
|
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
|
||||||
|
RUN apt-get update && apt-get -y install cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
|
||||||
|
RUN apt-get update && apt-get -y install libjpeg-dev libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev
|
||||||
|
|
||||||
|
# Additions for webp
|
||||||
|
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
||||||
|
RUN cd /tmp && tar -xzvf /tmp/libwebp-*
|
||||||
|
RUN cd /tmp/libwebp-1.0.2 && \
|
||||||
|
./configure --enable-static --disable-shared && \
|
||||||
|
make && make install
|
||||||
|
|
||||||
|
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||||
|
|
||||||
|
COPY . /src
|
||||||
|
RUN chown -R docker:docker /src
|
||||||
|
|
||||||
|
USER docker
|
||||||
|
ENTRYPOINT ["/src/builder/build.sh"]
|
@ -1,12 +0,0 @@
|
|||||||
FROM kasmweb/desktop-deluxe:develop
|
|
||||||
|
|
||||||
ENV VNCOPTIONS "-PreferBandwidth -DynamicQualityMin=3 -DynamicQualityMax=7 -detectScrolling"
|
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
COPY kasmvnc-Linux-x86_64-*.tar.gz /tmp/
|
|
||||||
RUN tar -xzvf /tmp/kasmvnc-Linux-x86_64-*.tar.gz --strip 1 -C /
|
|
||||||
|
|
||||||
USER 1000
|
|
||||||
|
|
||||||
CMD ["--tail-log"]
|
|
@ -1,5 +1,8 @@
|
|||||||
FROM ubuntu:18.04
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS ubuntu
|
||||||
|
ENV KASMVNC_BUILD_OS_VER 18.04
|
||||||
|
|
||||||
RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list
|
RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
10
builder/dockerfile.ubuntu1804.deb.build
Normal file
10
builder/dockerfile.ubuntu1804.deb.build
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -y install vim build-essential devscripts equivs
|
||||||
|
|
||||||
|
# Install build-deps for the package.
|
||||||
|
COPY ./debian/control /tmp
|
||||||
|
RUN echo YYY | mk-build-deps --install --remove /tmp/control
|
||||||
|
|
||||||
|
USER 1000
|
52
builder/dockerfile.ubuntu1804.deb.test
Normal file
52
builder/dockerfile.ubuntu1804.deb.test
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
ENV DISPLAY=:1 \
|
||||||
|
VNC_PORT=8443 \
|
||||||
|
VNC_RESOLUTION=1280x720 \
|
||||||
|
MAX_FRAME_RATE=24 \
|
||||||
|
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \
|
||||||
|
HOME=/home/user \
|
||||||
|
TERM=xterm \
|
||||||
|
STARTUPDIR=/dockerstartup \
|
||||||
|
INST_SCRIPTS=/dockerstartup/install \
|
||||||
|
KASM_RX_HOME=/dockerstartup/kasmrx \
|
||||||
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
VNC_COL_DEPTH=24 \
|
||||||
|
VNC_RESOLUTION=1280x1024 \
|
||||||
|
VNC_PW=vncpassword \
|
||||||
|
VNC_USER=user \
|
||||||
|
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||||
|
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||||
|
OMP_WAIT_POLICY=PASSIVE \
|
||||||
|
SHELL=/bin/bash \
|
||||||
|
SINGLE_APPLICATION=0 \
|
||||||
|
KASMVNC_BUILD_OS=ubuntu \
|
||||||
|
KASMVNC_BUILD_OS_VER=18.04
|
||||||
|
|
||||||
|
EXPOSE $VNC_PORT
|
||||||
|
|
||||||
|
WORKDIR $HOME
|
||||||
|
|
||||||
|
### REQUIRED STUFF ###
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext wget
|
||||||
|
RUN apt-get purge -y pm-utils xscreensaver*
|
||||||
|
RUN apt-get update && apt-get install -y vim less
|
||||||
|
|
||||||
|
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|
||||||
|
RUN mkdir -p $STARTUPDIR
|
||||||
|
COPY startup/ $STARTUPDIR
|
||||||
|
|
||||||
|
### START CUSTOM STUFF ####
|
||||||
|
|
||||||
|
COPY build/*.deb /tmp
|
||||||
|
RUN dpkg -i /tmp/*.deb; apt-get -yf install
|
||||||
|
|
||||||
|
### END CUSTOM STUFF ###
|
||||||
|
|
||||||
|
RUN chown -R 1000:0 $HOME
|
||||||
|
USER 1000:kasmvnc
|
||||||
|
WORKDIR $HOME
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
|
51
builder/dockerfile.ubuntu1804.test
Normal file
51
builder/dockerfile.ubuntu1804.test
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
FROM ubuntu:18.04
|
||||||
|
|
||||||
|
ENV DISPLAY=:1 \
|
||||||
|
VNC_PORT=8443 \
|
||||||
|
VNC_RESOLUTION=1280x720 \
|
||||||
|
MAX_FRAME_RATE=24 \
|
||||||
|
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \
|
||||||
|
HOME=/home/user \
|
||||||
|
TERM=xterm \
|
||||||
|
STARTUPDIR=/dockerstartup \
|
||||||
|
INST_SCRIPTS=/dockerstartup/install \
|
||||||
|
KASM_RX_HOME=/dockerstartup/kasmrx \
|
||||||
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
VNC_COL_DEPTH=24 \
|
||||||
|
VNC_RESOLUTION=1280x1024 \
|
||||||
|
VNC_PW=vncpassword \
|
||||||
|
VNC_USER=user \
|
||||||
|
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||||
|
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||||
|
OMP_WAIT_POLICY=PASSIVE \
|
||||||
|
SHELL=/bin/bash \
|
||||||
|
SINGLE_APPLICATION=0 \
|
||||||
|
KASMVNC_BUILD_OS=ubuntu \
|
||||||
|
KASMVNC_BUILD_OS_VER=18.04
|
||||||
|
|
||||||
|
EXPOSE $VNC_PORT
|
||||||
|
|
||||||
|
WORKDIR $HOME
|
||||||
|
|
||||||
|
### REQUIRED STUFF ###
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext libjpeg-dev wget
|
||||||
|
RUN apt-get purge -y pm-utils xscreensaver*
|
||||||
|
|
||||||
|
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|
||||||
|
RUN mkdir -p $STARTUPDIR
|
||||||
|
COPY startup/ $STARTUPDIR
|
||||||
|
|
||||||
|
### START CUSTOM STUFF ####
|
||||||
|
|
||||||
|
COPY build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz /tmp/
|
||||||
|
RUN tar -xzvf /tmp/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz --strip 1 -C /
|
||||||
|
|
||||||
|
### END CUSTOM STUFF ###
|
||||||
|
|
||||||
|
RUN chown -R 1000:0 $HOME
|
||||||
|
USER 1000
|
||||||
|
WORKDIR $HOME
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
|
31
builder/dockerfile.ubuntu2004.build
Normal file
31
builder/dockerfile.ubuntu2004.build
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
ENV KASMVNC_BUILD_OS ubuntu
|
||||||
|
ENV KASMVNC_BUILD_OS_VER 20.04
|
||||||
|
ENV XORG_VER 1.20.8
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list
|
||||||
|
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get -y install sudo
|
||||||
|
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata
|
||||||
|
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
|
||||||
|
RUN apt-get update && apt-get -y install cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
|
||||||
|
RUN apt-get update && apt-get -y install libjpeg-dev libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev
|
||||||
|
|
||||||
|
# Additions for webp
|
||||||
|
RUN cd /tmp && wget https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.0.2.tar.gz
|
||||||
|
RUN cd /tmp && tar -xzvf /tmp/libwebp-*
|
||||||
|
RUN cd /tmp/libwebp-1.0.2 && \
|
||||||
|
./configure --enable-static --disable-shared && \
|
||||||
|
make && make install
|
||||||
|
|
||||||
|
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
|
||||||
|
|
||||||
|
COPY . /src
|
||||||
|
RUN chown -R docker:docker /src
|
||||||
|
|
||||||
|
USER docker
|
||||||
|
ENTRYPOINT ["/src/builder/build.sh"]
|
51
builder/dockerfile.ubuntu2004.test
Normal file
51
builder/dockerfile.ubuntu2004.test
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
FROM ubuntu:20.04
|
||||||
|
|
||||||
|
ENV DISPLAY=:1 \
|
||||||
|
VNC_PORT=8443 \
|
||||||
|
VNC_RESOLUTION=1280x720 \
|
||||||
|
MAX_FRAME_RATE=24 \
|
||||||
|
VNCOPTIONS="-PreferBandwidth -DynamicQualityMin=4 -DynamicQualityMax=7" \
|
||||||
|
HOME=/home/user \
|
||||||
|
TERM=xterm \
|
||||||
|
STARTUPDIR=/dockerstartup \
|
||||||
|
INST_SCRIPTS=/dockerstartup/install \
|
||||||
|
KASM_RX_HOME=/dockerstartup/kasmrx \
|
||||||
|
DEBIAN_FRONTEND=noninteractive \
|
||||||
|
VNC_COL_DEPTH=24 \
|
||||||
|
VNC_RESOLUTION=1280x1024 \
|
||||||
|
VNC_PW=vncpassword \
|
||||||
|
VNC_USER=user \
|
||||||
|
VNC_VIEW_ONLY_PW=vncviewonlypassword \
|
||||||
|
LD_LIBRARY_PATH=/usr/local/lib/ \
|
||||||
|
OMP_WAIT_POLICY=PASSIVE \
|
||||||
|
SHELL=/bin/bash \
|
||||||
|
SINGLE_APPLICATION=0 \
|
||||||
|
KASMVNC_BUILD_OS=ubuntu \
|
||||||
|
KASMVNC_BUILD_OS_VER=20.04
|
||||||
|
|
||||||
|
EXPOSE $VNC_PORT
|
||||||
|
|
||||||
|
WORKDIR $HOME
|
||||||
|
|
||||||
|
### REQUIRED STUFF ###
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext libjpeg-dev wget
|
||||||
|
RUN apt-get purge -y pm-utils xscreensaver*
|
||||||
|
|
||||||
|
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
|
||||||
|
|
||||||
|
RUN mkdir -p $STARTUPDIR
|
||||||
|
COPY startup/ $STARTUPDIR
|
||||||
|
|
||||||
|
### START CUSTOM STUFF ####
|
||||||
|
|
||||||
|
COPY build/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz /tmp/
|
||||||
|
RUN tar -xzvf /tmp/kasmvnc.${KASMVNC_BUILD_OS}_${KASMVNC_BUILD_OS_VER}.tar.gz --strip 1 -C /
|
||||||
|
|
||||||
|
### END CUSTOM STUFF ###
|
||||||
|
|
||||||
|
RUN chown -R 1000:0 $HOME
|
||||||
|
USER 1000
|
||||||
|
WORKDIR $HOME
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]
|
10
builder/dockerfile.www.build
Normal file
10
builder/dockerfile.www.build
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM node:12-buster
|
||||||
|
|
||||||
|
COPY kasmweb/ /src/www/
|
||||||
|
COPY builder/build_www.sh /src/
|
||||||
|
|
||||||
|
WORKDIR /src/www
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
ENTRYPOINT [ "/src/build_www.sh" ]
|
37
builder/startup/generate_container_user
Executable file
37
builder/startup/generate_container_user
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
# Set current user in nss_wrapper
|
||||||
|
USER_ID=$(id -u)
|
||||||
|
GROUP_ID=$(id -g)
|
||||||
|
echo "USER_ID: $USER_ID, GROUP_ID: $GROUP_ID"
|
||||||
|
|
||||||
|
# Attempt to set the username to the kasm username
|
||||||
|
USERNAME=${VNC_USER:-default}
|
||||||
|
# Make the username posix compliant
|
||||||
|
USERNAME=$(echo "$USERNAME" | sed -r 's#[^a-zA-Z0-9\._\-]#_#g')
|
||||||
|
if ! echo "$USERNAME" | grep -qP "^[a-zA-Z0-9_\.][a-zA-Z0-9_\-\.]*"; then
|
||||||
|
USERNAME="default"
|
||||||
|
fi
|
||||||
|
export PS1="$USERNAME:\w\$ "
|
||||||
|
|
||||||
|
if [ x"$USER_ID" != x"0" ]; then
|
||||||
|
|
||||||
|
NSS_WRAPPER_PASSWD=/tmp/passwd
|
||||||
|
NSS_WRAPPER_GROUP=/etc/group
|
||||||
|
|
||||||
|
cat /etc/passwd > $NSS_WRAPPER_PASSWD
|
||||||
|
|
||||||
|
echo "${USERNAME}:x:${USER_ID}:${GROUP_ID}:Default Application User:${HOME}:/bin/bash" >> $NSS_WRAPPER_PASSWD
|
||||||
|
|
||||||
|
export NSS_WRAPPER_PASSWD
|
||||||
|
export NSS_WRAPPER_GROUP
|
||||||
|
|
||||||
|
if [ -r /usr/lib/libnss_wrapper.so ]; then
|
||||||
|
LD_PRELOAD=/usr/lib/libnss_wrapper.so
|
||||||
|
elif [ -r /usr/lib64/libnss_wrapper.so ]; then
|
||||||
|
LD_PRELOAD=/usr/lib64/libnss_wrapper.so
|
||||||
|
else
|
||||||
|
echo "no libnss_wrapper.so installed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "nss_wrapper location: $LD_PRELOAD"
|
||||||
|
export LD_PRELOAD
|
||||||
|
fi
|
93
builder/startup/vnc_startup.sh
Executable file
93
builder/startup/vnc_startup.sh
Executable file
@ -0,0 +1,93 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
### every exit != 0 fails the script
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# should also source $STARTUPDIR/generate_container_user
|
||||||
|
source $HOME/.bashrc
|
||||||
|
|
||||||
|
## correct forwarding of shutdown signal
|
||||||
|
cleanup () {
|
||||||
|
kill -s SIGTERM $!
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
trap cleanup SIGINT SIGTERM
|
||||||
|
|
||||||
|
detect_www_dir() {
|
||||||
|
local package_www_dir="/usr/share/kasmvnc/www"
|
||||||
|
if [[ -d "$package_www_dir" ]]; then
|
||||||
|
package_www_dir_option="-httpd $package_www_dir"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
detect_cert_location() {
|
||||||
|
local tarball_cert="$HOME/.vnc/self.pem"
|
||||||
|
local package_cert="/etc/kasmvnc/server.pem"
|
||||||
|
local use_cert=
|
||||||
|
|
||||||
|
if [[ -f "$package_cert" ]]; then
|
||||||
|
use_cert="$package_cert"
|
||||||
|
else
|
||||||
|
use_cert="$tarball_cert"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cert_option="-cert $use_cert"
|
||||||
|
}
|
||||||
|
|
||||||
|
## resolve_vnc_connection
|
||||||
|
VNC_IP=$(hostname -i)
|
||||||
|
|
||||||
|
# first entry is control, second is view (if only one is valid for both)
|
||||||
|
mkdir -p "$HOME/.vnc"
|
||||||
|
PASSWD_PATH="$HOME/.vnc/passwd"
|
||||||
|
echo "$VNC_PW" | kasmvncpasswd -f > $HOME/.kasmpasswd
|
||||||
|
chmod 0600 $HOME/.kasmpasswd
|
||||||
|
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout $HOME/.vnc/self.pem -out $HOME/.vnc/self.pem -subj "/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=kasm/emailAddress=none@none.none"
|
||||||
|
|
||||||
|
vncserver :1 -interface 0.0.0.0
|
||||||
|
vncserver -kill :1
|
||||||
|
|
||||||
|
if [[ -f $PASSWD_PATH ]]; then
|
||||||
|
rm -f $PASSWD_PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
#echo "$VNC_PW" | vncpasswd -f > $PASSWD_PATH
|
||||||
|
#echo "$VNC_VIEW_ONLY_PW" | vncpasswd -f >> $PASSWD_PATH
|
||||||
|
#chmod 600 $PASSWD_PATH
|
||||||
|
|
||||||
|
unset VNC_VIEW_ONLY_PW
|
||||||
|
unset VNC_PW
|
||||||
|
|
||||||
|
if [[ $DEBUG == true ]]; then
|
||||||
|
echo -e "\n------------------ start VNC server ------------------------"
|
||||||
|
echo "remove old vnc locks to be a reattachable container"
|
||||||
|
fi
|
||||||
|
vncserver -kill $DISPLAY &> $HOME/.vnc/vnc_startup.log \
|
||||||
|
|| rm -rfv /tmp/.X*-lock /tmp/.X11-unix &> $HOME/.vnc/vnc_startup.log \
|
||||||
|
|| echo "no locks present"
|
||||||
|
|
||||||
|
|
||||||
|
detect_www_dir
|
||||||
|
detect_cert_location
|
||||||
|
|
||||||
|
echo -e "start vncserver with param: VNC_COL_DEPTH=$VNC_COL_DEPTH, VNC_RESOLUTION=$VNC_RESOLUTION\n..."
|
||||||
|
vncserver $DISPLAY -depth $VNC_COL_DEPTH -geometry $VNC_RESOLUTION -FrameRate=$MAX_FRAME_RATE -websocketPort $VNC_PORT $cert_option -sslOnly -interface 0.0.0.0 $VNCOPTIONS $package_www_dir_option #&> $STARTUPDIR/no_vnc_startup.log
|
||||||
|
|
||||||
|
PID_SUN=$!
|
||||||
|
|
||||||
|
echo -e "start window manager\n..."
|
||||||
|
$STARTUPDIR/window_manager_startup.sh #&> $STARTUPDIR/window_manager_startup.log
|
||||||
|
|
||||||
|
## log connect options
|
||||||
|
echo -e "\n\n------------------ VNC environment started ------------------"
|
||||||
|
echo -e "\nVNCSERVER started on DISPLAY= $DISPLAY \n\t=> connect via VNC viewer with $VNC_IP:$VNC_PORT"
|
||||||
|
echo -e "\nnoVNC HTML client started:\n\t=> connect via http://$VNC_IP:$NO_VNC_PORT/?password=...\n"
|
||||||
|
echo "WEB PID: $PID_SUB"
|
||||||
|
|
||||||
|
# tail vncserver logs
|
||||||
|
tail -f $HOME/.vnc/*$DISPLAY.log &
|
||||||
|
|
||||||
|
eval "$@"
|
||||||
|
|
||||||
|
wait $PID_SUB
|
||||||
|
|
||||||
|
echo "Exiting Kasm container"
|
15
builder/startup/window_manager_startup.sh
Executable file
15
builder/startup/window_manager_startup.sh
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo -e "\n------------------ Xfce4 window manager startup------------------"
|
||||||
|
|
||||||
|
### disable screen saver and power management
|
||||||
|
xset -dpms &
|
||||||
|
xset s noblank &
|
||||||
|
xset s off &
|
||||||
|
|
||||||
|
if [ "$SINGLE_APPLICATION" -eq "1" ]; then
|
||||||
|
echo "Configured of Single Application Mode"
|
||||||
|
sed -i "s/O|SHMC/|/g" $HOME/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml
|
||||||
|
#xfwm4 --daemon
|
||||||
|
fi
|
8
builder/test-deb
Executable file
8
builder/test-deb
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
|
docker build -t kasmvnctester-deb:18.04 -f dockerfile.ubuntu1804.deb.test .
|
||||||
|
#docker run -it -p 443:8443 --rm -e "VNC_USER=username" -e "VNC_PW=password123" kasmvnctester-deb:18.04
|
30
debian/Makefile.to_fakebuild_tar_package
vendored
Normal file
30
debian/Makefile.to_fakebuild_tar_package
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
TARBALL := builder/build/kasmvnc.ubuntu_18.04.tar.gz
|
||||||
|
TAR_DATA := $(shell mktemp -d)
|
||||||
|
SRC := $(TAR_DATA)/usr/local
|
||||||
|
SRC_BIN := $(SRC)/bin
|
||||||
|
DST_MAN := $(DESTDIR)/usr/share/man/man1
|
||||||
|
|
||||||
|
install: unpack_tarball
|
||||||
|
echo "TAR_DATA: $(TAR_DATA)"
|
||||||
|
echo "installing files"
|
||||||
|
mkdir -p $(DESTDIR)/usr/bin $(DESTDIR)/usr/share/man/man1 \
|
||||||
|
$(DESTDIR)/usr/share/doc/kasmvncserver
|
||||||
|
cp $(SRC_BIN)/Xvnc $(DESTDIR)/usr/bin/Xkasmvnc
|
||||||
|
cp $(SRC_BIN)/vncserver $(DESTDIR)/usr/bin/kasmvncserver
|
||||||
|
cp $(SRC_BIN)/vncconfig $(DESTDIR)/usr/bin/kasmvncconfig
|
||||||
|
cp $(SRC_BIN)/kasmvncpasswd $(DESTDIR)/usr/bin/
|
||||||
|
cp -r $(SRC)/share/doc/kasmvnc*/* $(DESTDIR)/usr/share/doc/kasmvncserver/
|
||||||
|
rsync -r --exclude '.git*' --exclude po2js --exclude xgettext-html \
|
||||||
|
--exclude genkeysymdef.js --exclude use_require.js \
|
||||||
|
--exclude .eslintrc \
|
||||||
|
$(SRC)/share/kasmvnc $(DESTDIR)/usr/share
|
||||||
|
cp $(SRC)/man/man1/Xvnc.1 $(DESTDIR)/usr/share/man/man1/Xkasmvnc.1
|
||||||
|
cp $(SRC)/share/man/man1/vncserver.1 $(DST_MAN)/kasmvncserver.1
|
||||||
|
cp $(SRC)/share/man/man1/vncpasswd.1 $(DST_MAN)/kasmvncpasswd.1
|
||||||
|
cp $(SRC)/share/man/man1/vncconfig.1 $(DST_MAN)/kasmvncconfig.1
|
||||||
|
|
||||||
|
unpack_tarball:
|
||||||
|
tar -xzf "$(TARBALL)" -C "$(TAR_DATA)"
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf $(TAR_DATA)
|
10
debian/README.source
vendored
Normal file
10
debian/README.source
vendored
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
kasmvnc for Debian
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
<this file describes information about the source package, see Debian policy
|
||||||
|
manual section 4.14. You WILL either need to modify or delete this file>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
-- Dmitry Maksyoma <ledestin@gmail.com> Fri, 25 Dec 2020 21:29:24 +1300
|
||||||
|
|
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
kasmvnc (0.9.1~beta-1) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Initial release of the Debian package.
|
||||||
|
|
||||||
|
-- Dmitry Maksyoma <ledestin@gmail.com> Fri, 25 Dec 2020 21:29:24 +1300
|
1
debian/compat
vendored
Normal file
1
debian/compat
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
11
|
17
debian/control
vendored
Normal file
17
debian/control
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Source: kasmvnc
|
||||||
|
Section: x11
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: Kasm Technologies LLC <info@kasmweb.com>
|
||||||
|
Build-Depends: debhelper (>= 11), rsync, libjpeg-dev, libjpeg-dev, libpng-dev,
|
||||||
|
libtiff-dev, libgif-dev, libavcodec-dev, libssl-dev, libgl1, libxfont2
|
||||||
|
Standards-Version: 4.1.3
|
||||||
|
Homepage: https://github.com/kasmtech/KasmVNC
|
||||||
|
#Vcs-Browser: https://salsa.debian.org/debian/kasmvnc
|
||||||
|
#Vcs-Git: https://salsa.debian.org/debian/kasmvnc.git
|
||||||
|
|
||||||
|
Package: kasmvncserver
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ssl-cert, python, xauth
|
||||||
|
Provides: vnc-server
|
||||||
|
Description: virtual network computing server with web interface
|
||||||
|
Lorem ipsum
|
70
debian/copyright
vendored
Normal file
70
debian/copyright
vendored
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: kasmvnc
|
||||||
|
Source: https://github.com/kasmtech/KasmVNC
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: Copyright (C) 2020 Kasm Technologies LLC
|
||||||
|
Copyright (C) 1999 AT&T Laboratories Cambridge
|
||||||
|
Copyright (C) 2002-2005 RealVNC Ltd.
|
||||||
|
Copyright (C) 2000-2006 TightVNC Group
|
||||||
|
Copyright (C) 2005-2006 Martin Koegler
|
||||||
|
Copyright (C) 2005-2006 Sun Microsystems, Inc.
|
||||||
|
Copyright (C) 2006 OCCAM Financial Technology
|
||||||
|
Copyright (C) 2000-2008 Constantin Kaplinsky
|
||||||
|
Copyright (C) 2004-2017 Peter Astrand for Cendio AB
|
||||||
|
Copyright (C) 2010 Antoine Martin
|
||||||
|
Copyright (C) 2010 m-privacy GmbH
|
||||||
|
Copyright (C) 2009-2011 D. R. Commander
|
||||||
|
Copyright (C) 2009-2011 Pierre Ossman for Cendio AB
|
||||||
|
Copyright (C) 2004, 2009-2011 Red Hat, Inc.
|
||||||
|
Copyright (C) 2009-2018 TigerVNC Team
|
||||||
|
All Rights Reserved.
|
||||||
|
|
||||||
|
License: GPL-2+
|
||||||
|
This package is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
.
|
||||||
|
This package is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
.
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>
|
||||||
|
.
|
||||||
|
On Debian systems, the complete text of the GNU General
|
||||||
|
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
||||||
|
|
||||||
|
libwebp statically linked:
|
||||||
|
Copyright: Copyright (c) 2010, Google Inc. All rights reserved.
|
||||||
|
|
||||||
|
License:
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are
|
||||||
|
met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer in
|
||||||
|
the documentation and/or other materials provided with the
|
||||||
|
distribution.
|
||||||
|
|
||||||
|
* Neither the name of Google nor the names of its contributors may
|
||||||
|
be used to endorse or promote products derived from this software
|
||||||
|
without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
1
debian/dirs
vendored
Normal file
1
debian/dirs
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
etc/kasmvnc
|
1
debian/kasmvnc-docs.docs
vendored
Normal file
1
debian/kasmvnc-docs.docs
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
README.source
|
2
debian/menu.ex
vendored
Normal file
2
debian/menu.ex
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
?package(kasmvnc):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
|
||||||
|
title="kasmvnc" command="/usr/bin/kasmvnc"
|
72
debian/postinst
vendored
Normal file
72
debian/postinst
vendored
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# postinst script for kasmvnc
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <postinst> `configure' <most-recently-configured-version>
|
||||||
|
# * <old-postinst> `abort-upgrade' <new version>
|
||||||
|
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
|
||||||
|
# <new-version>
|
||||||
|
# * <postinst> `abort-remove'
|
||||||
|
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
|
||||||
|
# <failed-install-package> <version> `removing'
|
||||||
|
# <conflicting-package> <version>
|
||||||
|
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||||
|
# the debian-policy package
|
||||||
|
|
||||||
|
kasmvnc_group="kasmvnc"
|
||||||
|
|
||||||
|
create_kasmvnc_group() {
|
||||||
|
if ! getent group "$kasmvnc_group" >/dev/null; then
|
||||||
|
addgroup --quiet --system "$kasmvnc_group"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
make_self_signed_certificate() {
|
||||||
|
local cert_file=/etc/kasmvnc/server.pem
|
||||||
|
[ -f "$cert_file" ] && return 0
|
||||||
|
|
||||||
|
openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout "$cert_file" \
|
||||||
|
-out "$cert_file" -subj \
|
||||||
|
"/C=US/ST=VA/L=None/O=None/OU=DoFu/CN=kasm/emailAddress=none@none.none"
|
||||||
|
chgrp "$kasmvnc_group" "$cert_file"
|
||||||
|
chmod g+r "$cert_file"
|
||||||
|
}
|
||||||
|
|
||||||
|
create_kasmvnc_group
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
configure)
|
||||||
|
bindir=/usr/bin
|
||||||
|
mandir=/usr/share/man
|
||||||
|
commands="kasmvncserver kasmvncpasswd kasmvncconfig Xkasmvnc"
|
||||||
|
|
||||||
|
for kasm_command in $commands; do
|
||||||
|
generic_command=`echo "$kasm_command" | sed -e 's/kasm//'`;
|
||||||
|
update-alternatives --install "$bindir/$generic_command" \
|
||||||
|
"$generic_command" "$bindir/$kasm_command" 90 \
|
||||||
|
--slave "$mandir/man1/$generic_command.1.gz" "$generic_command.1.gz" \
|
||||||
|
"$mandir/man1/$kasm_command.1.gz"
|
||||||
|
done
|
||||||
|
|
||||||
|
make_self_signed_certificate
|
||||||
|
;;
|
||||||
|
|
||||||
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "postinst called with unknown argument \`$1'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
40
debian/postrm
vendored
Normal file
40
debian/postrm
vendored
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# postrm script for kasmvnc
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <postrm> `remove'
|
||||||
|
# * <postrm> `purge'
|
||||||
|
# * <old-postrm> `upgrade' <new-version>
|
||||||
|
# * <new-postrm> `failed-upgrade' <old-version>
|
||||||
|
# * <new-postrm> `abort-install'
|
||||||
|
# * <new-postrm> `abort-install' <old-version>
|
||||||
|
# * <new-postrm> `abort-upgrade' <old-version>
|
||||||
|
# * <disappearer's-postrm> `disappear' <overwriter>
|
||||||
|
# <overwriter-version>
|
||||||
|
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||||
|
# the debian-policy package
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
purge)
|
||||||
|
rm -r /etc/kasmvnc
|
||||||
|
;;
|
||||||
|
purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "postrm called with unknown argument \`$1'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
35
debian/preinst.ex
vendored
Normal file
35
debian/preinst.ex
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# preinst script for kasmvnc
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <new-preinst> `install'
|
||||||
|
# * <new-preinst> `install' <old-version>
|
||||||
|
# * <new-preinst> `upgrade' <old-version>
|
||||||
|
# * <old-preinst> `abort-upgrade' <new-version>
|
||||||
|
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||||
|
# the debian-policy package
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
install|upgrade)
|
||||||
|
;;
|
||||||
|
|
||||||
|
abort-upgrade)
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "preinst called with unknown argument \`$1'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
49
debian/prerm
vendored
Normal file
49
debian/prerm
vendored
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# prerm script for kasmvnc
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# summary of how this script can be called:
|
||||||
|
# * <prerm> `remove'
|
||||||
|
# * <old-prerm> `upgrade' <new-version>
|
||||||
|
# * <new-prerm> `failed-upgrade' <old-version>
|
||||||
|
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
|
||||||
|
# * <deconfigured's-prerm> `deconfigure' `in-favour'
|
||||||
|
# <package-being-installed> <version> `removing'
|
||||||
|
# <conflicting-package> <version>
|
||||||
|
# for details, see https://www.debian.org/doc/debian-policy/ or
|
||||||
|
# the debian-policy package
|
||||||
|
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
remove)
|
||||||
|
bindir=/usr/bin
|
||||||
|
mandir=/usr/share/man
|
||||||
|
commands="kasmvncserver kasmvncpasswd kasmvncconfig Xkasmvnc"
|
||||||
|
|
||||||
|
for kasm_command in $commands; do
|
||||||
|
generic_command=`echo "$kasm_command" | sed -e 's/kasm//'`;
|
||||||
|
update-alternatives --remove "$generic_command" "$bindir/$kasm_command"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
remove|upgrade|deconfigure)
|
||||||
|
;;
|
||||||
|
|
||||||
|
failed-upgrade)
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "prerm called with unknown argument \`$1'" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# dh_installdeb will replace this with shell code automatically
|
||||||
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
|
|
||||||
|
exit 0
|
35
debian/rules
vendored
Executable file
35
debian/rules
vendored
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
# See debhelper(7) (uncomment to enable)
|
||||||
|
# output every command that modifies files on the build system.
|
||||||
|
export DH_VERBOSE = 1
|
||||||
|
export DH_OPTIONS=-v
|
||||||
|
|
||||||
|
|
||||||
|
# see FEATURE AREAS in dpkg-buildflags(1)
|
||||||
|
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||||
|
|
||||||
|
# see ENVIRONMENT in dpkg-buildflags(1)
|
||||||
|
# package maintainers to append CFLAGS
|
||||||
|
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||||
|
# package maintainers to append LDFLAGS
|
||||||
|
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||||
|
|
||||||
|
MAKEFILE_TO_FAKEBUILD_TAR_PACKAGE := debian/Makefile.to_fakebuild_tar_package
|
||||||
|
|
||||||
|
build:
|
||||||
|
cp $(MAKEFILE_TO_FAKEBUILD_TAR_PACKAGE) Makefile
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f Makefile
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
%:
|
||||||
|
@echo "target: $@"
|
||||||
|
dh $@
|
||||||
|
|
||||||
|
# .PHONY: build
|
||||||
|
|
||||||
|
# dh_make generated override targets
|
||||||
|
# This is example for Cmake (See https://bugs.debian.org/641051 )
|
||||||
|
#override_dh_auto_configure:
|
||||||
|
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
3.0 (quilt)
|
38
debian/watch.ex
vendored
Normal file
38
debian/watch.ex
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Example watch control file for uscan
|
||||||
|
# Rename this file to "watch" and then you can run the "uscan" command
|
||||||
|
# to check for upstream updates and more.
|
||||||
|
# See uscan(1) for format
|
||||||
|
|
||||||
|
# Compulsory line, this is a version 4 file
|
||||||
|
version=4
|
||||||
|
|
||||||
|
# PGP signature mangle, so foo.tar.gz has foo.tar.gz.sig
|
||||||
|
#opts="pgpsigurlmangle=s%$%.sig%"
|
||||||
|
|
||||||
|
# HTTP site (basic)
|
||||||
|
#http://example.com/downloads.html \
|
||||||
|
# files/kasmvnc-([\d\.]+)\.tar\.gz debian uupdate
|
||||||
|
|
||||||
|
# Uncomment to examine an FTP server
|
||||||
|
#ftp://ftp.example.com/pub/kasmvnc-(.*)\.tar\.gz debian uupdate
|
||||||
|
|
||||||
|
# SourceForge hosted projects
|
||||||
|
# http://sf.net/kasmvnc/ kasmvnc-(.*)\.tar\.gz debian uupdate
|
||||||
|
|
||||||
|
# GitHub hosted projects
|
||||||
|
#opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%<project>-$1.tar.gz%" \
|
||||||
|
# https://github.com/<user>/kasmvnc/tags \
|
||||||
|
# (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
|
||||||
|
|
||||||
|
# PyPI
|
||||||
|
# https://pypi.debian.net/kasmvnc/kasmvnc-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
|
||||||
|
|
||||||
|
# Direct Git
|
||||||
|
# opts="mode=git" http://git.example.com/kasmvnc.git \
|
||||||
|
# refs/tags/v([\d\.]+) debian uupdate
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# Uncomment to find new files on GooglePages
|
||||||
|
# http://example.googlepages.com/foo.html kasmvnc-(.*)\.tar\.gz
|
2
kasmweb/.gitignore
vendored
2
kasmweb/.gitignore
vendored
@ -10,3 +10,5 @@ recordings
|
|||||||
*.swp
|
*.swp
|
||||||
*~
|
*~
|
||||||
noVNC-*.tgz
|
noVNC-*.tgz
|
||||||
|
/dist
|
||||||
|
index.html
|
@ -5,6 +5,20 @@
|
|||||||
*
|
*
|
||||||
* See README.md for usage and integration instructions.
|
* See README.md for usage and integration instructions.
|
||||||
*/
|
*/
|
||||||
|
window._noVNC_has_module_support = true;
|
||||||
|
window.addEventListener("load", function() {
|
||||||
|
if (window._noVNC_has_module_support) return;
|
||||||
|
var loader = document.createElement("script");
|
||||||
|
loader.src = "vendor/browser-es-module-loader/dist/browser-es-module-loader.js";
|
||||||
|
document.head.appendChild(loader);
|
||||||
|
});
|
||||||
|
window.addEventListener("load", function() {
|
||||||
|
var connect_btn_el = document.getElementById("noVNC_connect_button");
|
||||||
|
if (typeof(connect_btn_el) != 'undefined' && connect_btn_el != null)
|
||||||
|
{
|
||||||
|
connect_btn_el.click();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
import * as Log from '../core/util/logging.js';
|
import * as Log from '../core/util/logging.js';
|
||||||
import _, { l10n } from './localization.js';
|
import _, { l10n } from './localization.js';
|
||||||
|
@ -1076,9 +1076,7 @@ export default class RFB extends EventTargetMixin {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
if (!this._rfb_credentials.password) {
|
this._rfb_credentials.password = "";
|
||||||
this._rfb_credentials.password = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(directxman12): make genDES not require an Array
|
// TODO(directxman12): make genDES not require an Array
|
||||||
const challenge = Array.prototype.slice.call(this._sock.rQshiftBytes(16));
|
const challenge = Array.prototype.slice.call(this._sock.rQshiftBytes(16));
|
||||||
|
370
kasmweb/load.html
Normal file
370
kasmweb/load.html
Normal file
@ -0,0 +1,370 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="noVNC_loading">
|
||||||
|
<head>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
noVNC example: simple example using default UI
|
||||||
|
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).
|
||||||
|
|
||||||
|
Connect parameters are provided in query string:
|
||||||
|
http://example.com/?host=HOST&port=PORT&encrypt=1
|
||||||
|
or the fragment:
|
||||||
|
http://example.com/#host=HOST&port=PORT&encrypt=1
|
||||||
|
-->
|
||||||
|
<title>KasmVNC</title>
|
||||||
|
|
||||||
|
<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 app/images/icons/Makefile for what the sizes are for) -->
|
||||||
|
<link rel="icon" sizes="16x16" type="image/png" href="app/images/icons/368_kasm_logo_only_16x16.png">
|
||||||
|
<link rel="icon" sizes="24x24" type="image/png" href="app/images/icons/368_kasm_logo_only_24x24.png">
|
||||||
|
<link rel="icon" sizes="32x32" type="image/png" href="app/images/icons/368_kasm_logo_only_32x32.png">
|
||||||
|
<link rel="icon" sizes="48x48" type="image/png" href="app/images/icons/368_kasm_logo_only_48x48.png">
|
||||||
|
<link rel="icon" sizes="60x60" type="image/png" href="app/images/icons/368_kasm_logo_only_60x60.png">
|
||||||
|
<link rel="icon" sizes="64x64" type="image/png" href="app/images/icons/368_kasm_logo_only_64x64.png">
|
||||||
|
<link rel="icon" sizes="72x72" type="image/png" href="app/images/icons/368_kasm_logo_only_72x72.png">
|
||||||
|
<link rel="icon" sizes="76x76" type="image/png" href="app/images/icons/368_kasm_logo_only_76x76.png">
|
||||||
|
<link rel="icon" sizes="96x96" type="image/png" href="app/images/icons/368_kasm_logo_only_96x96.png">
|
||||||
|
<link rel="icon" sizes="120x120" type="image/png" href="app/images/icons/368_kasm_logo_only_120x120.png">
|
||||||
|
<link rel="icon" sizes="144x144" type="image/png" href="app/images/icons/368_kasm_logo_only_144x144.png">
|
||||||
|
<link rel="icon" sizes="152x152" type="image/png" href="app/images/icons/368_kasm_logo_only_152x152.png">
|
||||||
|
<link rel="icon" sizes="192x192" type="image/png" href="app/images/icons/368_kasm_logo_only_192x192.png">
|
||||||
|
<!-- Firefox currently mishandles SVG, see #1419039
|
||||||
|
<link rel="icon" sizes="any" type="image/svg+xml" href="app/images/icons/kasm-icon.svg">
|
||||||
|
-->
|
||||||
|
<!-- Repeated last so that legacy handling will pick this -->
|
||||||
|
<link rel="icon" sizes="16x16" type="image/png" href="app/images/icons/368_kasm_logo_only_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" />
|
||||||
|
<!-- Home Screen Icons (favourites and bookmarks use the normal icons) -->
|
||||||
|
<link rel="apple-touch-icon" sizes="60x60" type="image/png" href="app/images/icons/368_kasm_logo_only_60x60.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="76x76" type="image/png" href="app/images/icons/368_kasm_logo_only_76x76.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="120x120" type="image/png" href="app/images/icons/368_kasm_logo_only_120x120.png">
|
||||||
|
<link rel="apple-touch-icon" sizes="152x152" type="image/png" href="app/images/icons/368_kasm_logo_only_152x152.png">
|
||||||
|
|
||||||
|
<!-- Stylesheets -->
|
||||||
|
<!-- <link rel="stylesheet" href="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="app/error-handler.js"></script> -->
|
||||||
|
|
||||||
|
<!-- begin scripts -->
|
||||||
|
<!-- promise polyfills promises for IE11 -->
|
||||||
|
<!-- <script src="vendor/promise.js"></script> -->
|
||||||
|
<!-- ES2015/ES6 modules polyfill -->
|
||||||
|
<!-- <script type="module">
|
||||||
|
window._noVNC_has_module_support = true;
|
||||||
|
</script> -->
|
||||||
|
<!-- <script>
|
||||||
|
window.addEventListener("load", function() {
|
||||||
|
if (window._noVNC_has_module_support) return;
|
||||||
|
var loader = document.createElement("script");
|
||||||
|
loader.src = "vendor/browser-es-module-loader/dist/browser-es-module-loader.js";
|
||||||
|
document.head.appendChild(loader);
|
||||||
|
});
|
||||||
|
window.addEventListener("load", function() {
|
||||||
|
document.getElementById("noVNC_connect_button").click();
|
||||||
|
});
|
||||||
|
</script> -->
|
||||||
|
<!-- actual script modules -->
|
||||||
|
<!-- <script type="module" crossorigin='use-credentials' src="app/ui.js"></script> -->
|
||||||
|
<!-- end scripts -->
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div id="noVNC_fallback_error" class="noVNC_center">
|
||||||
|
<div>
|
||||||
|
<div>Kasm encountered an error:</div>
|
||||||
|
<br>
|
||||||
|
<div id="noVNC_fallback_errormsg"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="noVNC_connection_stats">
|
||||||
|
Loading statistics...
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- noVNC Control Bar -->
|
||||||
|
<div id="noVNC_control_bar_anchor" class="noVNC_vcenter">
|
||||||
|
|
||||||
|
<div id="noVNC_control_bar">
|
||||||
|
<div id="noVNC_control_bar_handle" title="Hide/Show the control bar"><div></div></div>
|
||||||
|
|
||||||
|
<div class="noVNC_scroll">
|
||||||
|
|
||||||
|
<h1 class="noVNC_logo"><img src="app/images/icons/368_kasm_logo_only_24x24.png" /></h1>
|
||||||
|
|
||||||
|
<!-- Drag/Pan the viewport -->
|
||||||
|
<img alt="viewport drag" src="app/images/drag.svg"
|
||||||
|
id="noVNC_view_drag_button" class="noVNC_button noVNC_hidden"
|
||||||
|
title="Move/Drag Viewport" />
|
||||||
|
|
||||||
|
<!--noVNC Touch Device only buttons-->
|
||||||
|
<div id="noVNC_mobile_buttons">
|
||||||
|
<img alt="No mousebutton" src="app/images/mouse_none.svg"
|
||||||
|
id="noVNC_mouse_button0" class="noVNC_button"
|
||||||
|
title="Active Mouse Button"/>
|
||||||
|
<img alt="Left mousebutton" src="app/images/mouse_left.svg"
|
||||||
|
id="noVNC_mouse_button1" class="noVNC_button"
|
||||||
|
title="Active Mouse Button"/>
|
||||||
|
<img alt="Middle mousebutton" src="app/images/mouse_middle.svg"
|
||||||
|
id="noVNC_mouse_button2" class="noVNC_button"
|
||||||
|
title="Active Mouse Button"/>
|
||||||
|
<img alt="Right mousebutton" src="app/images/mouse_right.svg"
|
||||||
|
id="noVNC_mouse_button4" class="noVNC_button"
|
||||||
|
title="Active Mouse Button"/>
|
||||||
|
<img alt="Keyboard" src="app/images/keyboard.svg"
|
||||||
|
id="noVNC_keyboard_button" class="noVNC_button"
|
||||||
|
value="Keyboard" title="Show Keyboard" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Extra manual keys -->
|
||||||
|
<div id="noVNC_extra_keys">
|
||||||
|
<img alt="Extra keys" src="app/images/toggleextrakeys.svg"
|
||||||
|
id="noVNC_toggle_extra_keys_button" class="noVNC_button"
|
||||||
|
title="Show Extra Keys"/>
|
||||||
|
<div class="noVNC_vcenter">
|
||||||
|
<div id="noVNC_modifiers" class="noVNC_panel">
|
||||||
|
<img alt="Ctrl" src="app/images/ctrl.svg"
|
||||||
|
id="noVNC_toggle_ctrl_button" class="noVNC_button"
|
||||||
|
title="Toggle Ctrl"/>
|
||||||
|
<img alt="Alt" src="app/images/alt.svg"
|
||||||
|
id="noVNC_toggle_alt_button" class="noVNC_button"
|
||||||
|
title="Toggle Alt"/>
|
||||||
|
<img alt="Windows" src="app/images/windows.svg"
|
||||||
|
id="noVNC_toggle_windows_button" class="noVNC_button"
|
||||||
|
title="Toggle Windows"/>
|
||||||
|
<img alt="Tab" src="app/images/tab.svg"
|
||||||
|
id="noVNC_send_tab_button" class="noVNC_button"
|
||||||
|
title="Send Tab"/>
|
||||||
|
<img alt="Esc" src="app/images/esc.svg"
|
||||||
|
id="noVNC_send_esc_button" class="noVNC_button"
|
||||||
|
title="Send Escape"/>
|
||||||
|
<img alt="Ctrl+Alt+Del" src="app/images/ctrlaltdel.svg"
|
||||||
|
id="noVNC_send_ctrl_alt_del_button" class="noVNC_button"
|
||||||
|
title="Send Ctrl-Alt-Del" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Shutdown/Reboot -->
|
||||||
|
<img alt="Shutdown/Reboot" src="app/images/power.svg"
|
||||||
|
id="noVNC_power_button" class="noVNC_button"
|
||||||
|
title="Shutdown/Reboot..." />
|
||||||
|
<div class="noVNC_vcenter">
|
||||||
|
<div id="noVNC_power" class="noVNC_panel">
|
||||||
|
<div class="noVNC_heading">
|
||||||
|
<img src="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" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Clipboard -->
|
||||||
|
<img alt="Clipboard" src="app/images/clipboard.svg"
|
||||||
|
id="noVNC_clipboard_button" class="noVNC_button"
|
||||||
|
title="Clipboard" />
|
||||||
|
<div class="noVNC_vcenter">
|
||||||
|
<div id="noVNC_clipboard" class="noVNC_panel">
|
||||||
|
<div class="noVNC_heading">
|
||||||
|
<img src="app/images/clipboard.svg"> Clipboard
|
||||||
|
</div>
|
||||||
|
<textarea id="noVNC_clipboard_text" rows=5></textarea>
|
||||||
|
<br />
|
||||||
|
<input id="noVNC_clipboard_clear_button" type="button"
|
||||||
|
value="Clear" class="noVNC_submit" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Toggle fullscreen -->
|
||||||
|
<img alt="Fullscreen" src="app/images/fullscreen.svg"
|
||||||
|
id="noVNC_fullscreen_button" class="noVNC_button noVNC_hidden"
|
||||||
|
title="Fullscreen" />
|
||||||
|
|
||||||
|
<!-- Settings -->
|
||||||
|
<img alt="Settings" src="app/images/settings.svg"
|
||||||
|
id="noVNC_settings_button" class="noVNC_button"
|
||||||
|
title="Settings" />
|
||||||
|
<div class="noVNC_vcenter">
|
||||||
|
<div id="noVNC_settings" class="noVNC_panel">
|
||||||
|
<ul>
|
||||||
|
<li class="noVNC_heading">
|
||||||
|
<img src="app/images/settings.svg"> Settings
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<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></li>
|
||||||
|
<li>
|
||||||
|
<label><input id="noVNC_setting_clipboard_up" type="checkbox" /> Clipboard Up</label></li>
|
||||||
|
<li>
|
||||||
|
<label><input id="noVNC_setting_clipboard_down" type="checkbox" /> Clipboard Down</label></li>
|
||||||
|
<li>
|
||||||
|
<label><input id="noVNC_setting_clipboard_seamless" type="checkbox" /> Clipboard Seamless</label></li>
|
||||||
|
<li>
|
||||||
|
<label><input id="noVNC_setting_prefer_local_cursor" type="checkbox" /> Prefer Local Cursor</label></li>
|
||||||
|
<li>
|
||||||
|
<label><input id="noVNC_setting_enable_webp" type="checkbox" /> Enable WebP Compression</label></li>
|
||||||
|
<li>
|
||||||
|
<label><input id="noVNC_setting_enable_perf_stats" type="checkbox" /> Enable Performance Stats</label></li>
|
||||||
|
<li>
|
||||||
|
<label><input id="noVNC_setting_toggle_control_panel" type="checkbox" /> Toggle Control Panel via Keystrokes</label></li>
|
||||||
|
<li>
|
||||||
|
<label for="noVNC_setting_video_quality">Video Quality:</label>
|
||||||
|
<select id="noVNC_setting_video_quality" name="vncVideoQuality">
|
||||||
|
<option value=0>Low</option>
|
||||||
|
<option value=1>Medium</option>
|
||||||
|
<option value=2>High</option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="noVNC_setting_idle_disconnect">Idle Timeout:</label>
|
||||||
|
<select id="noVNC_setting_idle_disconnect" name="vncIdleDisconnect">
|
||||||
|
<option value=20>20</option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li><hr></li>
|
||||||
|
<li>
|
||||||
|
<label><input id="noVNC_setting_view_clip" type="checkbox" /> Clip to Window</label>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="noVNC_setting_resize">Scaling Mode:</label>
|
||||||
|
<select id="noVNC_setting_resize" name="vncResize">
|
||||||
|
<option value="off">None</option>
|
||||||
|
<option value="scale">Local Scaling</option>
|
||||||
|
<option value="remote">Remote Resizing</option>
|
||||||
|
</select>
|
||||||
|
</li>
|
||||||
|
<li><hr></li>
|
||||||
|
<li>
|
||||||
|
<div class="noVNC_expander">Advanced</div>
|
||||||
|
<div><ul>
|
||||||
|
<li>
|
||||||
|
<label for="noVNC_setting_repeaterID">Repeater ID:</label>
|
||||||
|
<input id="noVNC_setting_repeaterID" type="input" value="" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<div class="noVNC_expander">WebSocket</div>
|
||||||
|
<div><ul>
|
||||||
|
<li>
|
||||||
|
<label><input id="noVNC_setting_encrypt" type="checkbox" /> Encrypt</label>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="noVNC_setting_host">Host:</label>
|
||||||
|
<input id="noVNC_setting_host" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<label for="noVNC_setting_port">Port:</label>
|
||||||
|
<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" />
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
</li>
|
||||||
|
<li><hr></li>
|
||||||
|
<li>
|
||||||
|
<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" />
|
||||||
|
</li>
|
||||||
|
<li><hr></li>
|
||||||
|
<li>
|
||||||
|
<label><input id="noVNC_setting_show_dot" type="checkbox" /> Show Dot when No Cursor</label>
|
||||||
|
</li>
|
||||||
|
<li><hr></li>
|
||||||
|
<!-- Logging selection dropdown -->
|
||||||
|
<li>
|
||||||
|
<label>Logging:
|
||||||
|
<select id="noVNC_setting_logging" name="vncLogging">
|
||||||
|
</select>
|
||||||
|
</label>
|
||||||
|
</li>
|
||||||
|
</ul></div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Connection Controls -->
|
||||||
|
<img alt="Disconnect" src="app/images/disconnect.svg"
|
||||||
|
id="noVNC_disconnect_button" class="noVNC_button"
|
||||||
|
title="Disconnect" />
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="noVNC_control_bar_hint"></div>
|
||||||
|
|
||||||
|
</div> <!-- End of noVNC_control_bar -->
|
||||||
|
|
||||||
|
<!-- Status Dialog -->
|
||||||
|
<div style="visibility: hidden" id="noVNC_status"></div>
|
||||||
|
|
||||||
|
<!-- Connect button -->
|
||||||
|
<div class="noVNC_center">
|
||||||
|
<div id="noVNC_connect_dlg">
|
||||||
|
<!--div class="noVNC_logo" translate="no"><span>no</span>VNC</div-->
|
||||||
|
<div id="noVNC_connect_button"><div>
|
||||||
|
<img src="app/images/connect.svg"> Connect
|
||||||
|
</div></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Password Dialog -->
|
||||||
|
<div class="noVNC_center noVNC_connect_layer">
|
||||||
|
<div id="noVNC_password_dlg" class="noVNC_panel"><form>
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<label>Password:</label>
|
||||||
|
<input id="noVNC_password_input" type="password" />
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<input id="noVNC_password_button" type="submit" value="Send Password" class="noVNC_submit" />
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</form></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Transition Screens -->
|
||||||
|
<div id="noVNC_transition">
|
||||||
|
<div id="noVNC_transition_text"></div>
|
||||||
|
<div>
|
||||||
|
<input type="button" id="noVNC_cancel_reconnect_button" value="Cancel" class="noVNC_submit" />
|
||||||
|
</div>
|
||||||
|
<div class="noVNC_spinner"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- This is where the RFB elements will attach -->
|
||||||
|
<div id="noVNC_container">
|
||||||
|
<!-- Note that Google Chrome on Android doesn't respect any of these,
|
||||||
|
html attributes which attempt to disable text suggestions on the
|
||||||
|
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>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<audio id="noVNC_bell">
|
||||||
|
<source src="app/sounds/bell.oga" type="audio/ogg">
|
||||||
|
<source src="app/sounds/bell.mp3" type="audio/mpeg">
|
||||||
|
</audio>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -21,7 +21,9 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint app core po tests utils",
|
"lint": "eslint app core po tests utils",
|
||||||
"test": "karma start karma.conf.js",
|
"test": "karma start karma.conf.js",
|
||||||
"prepublish": "node ./utils/use_require.js --as commonjs --clean"
|
"prepublish": "node ./utils/use_require.js --as commonjs --clean",
|
||||||
|
"build": "webpack --config webpack.config.js",
|
||||||
|
"build-production": "cross-env NODE_ENV=production webpack --config webpack.config.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -40,7 +42,10 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/novnc/noVNC",
|
"homepage": "https://github.com/novnc/noVNC",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@babel/core": "^7.12.10",
|
||||||
|
"@babel/preset-env": "^7.12.11",
|
||||||
"babel-core": "^6.22.1",
|
"babel-core": "^6.22.1",
|
||||||
|
"babel-loader": "^8.2.2",
|
||||||
"babel-plugin-add-module-exports": "^0.2.1",
|
"babel-plugin-add-module-exports": "^0.2.1",
|
||||||
"babel-plugin-import-redirect": "*",
|
"babel-plugin-import-redirect": "*",
|
||||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||||
@ -52,24 +57,39 @@
|
|||||||
"babelify": "^7.3.0",
|
"babelify": "^7.3.0",
|
||||||
"browserify": "^13.1.0",
|
"browserify": "^13.1.0",
|
||||||
"chai": "^3.5.0",
|
"chai": "^3.5.0",
|
||||||
|
"clean-webpack-plugin": "^3.0.0",
|
||||||
"commander": "^2.9.0",
|
"commander": "^2.9.0",
|
||||||
|
"css-loader": "^5.0.1",
|
||||||
|
"css-minimizer-webpack-plugin": "^1.1.5",
|
||||||
"es-module-loader": "^2.1.0",
|
"es-module-loader": "^2.1.0",
|
||||||
"eslint": "^4.16.0",
|
"eslint": "^4.16.0",
|
||||||
|
"file-loader": "^6.2.0",
|
||||||
"fs-extra": "^1.0.0",
|
"fs-extra": "^1.0.0",
|
||||||
|
"html-loader": "^1.3.2",
|
||||||
|
"html-webpack-inline-svg-plugin": "^2.3.0",
|
||||||
|
"html-webpack-plugin": "^4.5.0",
|
||||||
"jsdom": "*",
|
"jsdom": "*",
|
||||||
"karma": "^1.3.0",
|
"karma": "^1.3.0",
|
||||||
"karma-mocha": "^1.3.0",
|
"karma-mocha": "^1.3.0",
|
||||||
"karma-mocha-reporter": "^2.2.0",
|
"karma-mocha-reporter": "^2.2.0",
|
||||||
"karma-sauce-launcher": "^1.0.0",
|
"karma-sauce-launcher": "^1.0.0",
|
||||||
"karma-sinon-chai": "^2.0.0",
|
"karma-sinon-chai": "^2.0.0",
|
||||||
|
"mini-css-extract-plugin": "^1.3.3",
|
||||||
"mocha": "^3.1.2",
|
"mocha": "^3.1.2",
|
||||||
"node-getopt": "*",
|
"node-getopt": "*",
|
||||||
"po2json": "*",
|
"po2json": "*",
|
||||||
|
"postcss-loader": "^4.1.0",
|
||||||
|
"preload-webpack-plugin": "^3.0.0-beta.4",
|
||||||
"requirejs": "^2.3.2",
|
"requirejs": "^2.3.2",
|
||||||
"rollup": "^0.41.4",
|
"rollup": "^0.41.4",
|
||||||
"rollup-plugin-node-resolve": "^2.0.0",
|
"rollup-plugin-node-resolve": "^2.0.0",
|
||||||
|
"sass": "^1.30.0",
|
||||||
|
"sass-loader": "^10.1.0",
|
||||||
"sinon": "^4.0.0",
|
"sinon": "^4.0.0",
|
||||||
"sinon-chai": "^2.8.0"
|
"sinon-chai": "^2.8.0",
|
||||||
|
"svg-sprite-html-webpack": "^2.3.0",
|
||||||
|
"webpack": "^4.29.6",
|
||||||
|
"webpack-cli": "^3.2.3"
|
||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"keywords": [
|
"keywords": [
|
||||||
|
138
kasmweb/webpack.config.js
Normal file
138
kasmweb/webpack.config.js
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
const path = require('path');
|
||||||
|
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||||
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
|
||||||
|
const HtmlWebpackInlineSVGPlugin = require('html-webpack-inline-svg-plugin');
|
||||||
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
|
// const SvgSpriteHtmlWebpackPlugin = require('svg-sprite-html-webpack');
|
||||||
|
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
mode: "production",
|
||||||
|
entry: {
|
||||||
|
main: './app/ui.js',
|
||||||
|
error_handler: './app/error-handler.js',
|
||||||
|
promise: './vendor/promise.js',
|
||||||
|
style: './app/styles/base.css'
|
||||||
|
},
|
||||||
|
output: {
|
||||||
|
path: path.resolve(__dirname, 'dist'),
|
||||||
|
filename: '[name].bundle.js'
|
||||||
|
},
|
||||||
|
module: {
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
test: /\.js$/,
|
||||||
|
exclude: /(node_modules)/,
|
||||||
|
use: {
|
||||||
|
loader: 'babel-loader',
|
||||||
|
options: {
|
||||||
|
presets: ['@babel/preset-env']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(sa|sc|c)ss$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
loader: MiniCssExtractPlugin.loader
|
||||||
|
},
|
||||||
|
{
|
||||||
|
loader: "css-loader",
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// loader: "postcss-loader"
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
loader: "sass-loader",
|
||||||
|
options: {
|
||||||
|
implementation: require("sass")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Now we apply rule for images
|
||||||
|
test: /\.(png|jpe?g|gif|svg)$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
// Using file-loader for these files
|
||||||
|
loader: "file-loader",
|
||||||
|
|
||||||
|
// In options we can set different things like format
|
||||||
|
// and directory to save
|
||||||
|
options: {
|
||||||
|
outputPath: 'images'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// Apply rule for fonts files
|
||||||
|
test: /\.(woff|woff2|ttf|otf|eot)$/,
|
||||||
|
use: [
|
||||||
|
{
|
||||||
|
// Using file-loader too
|
||||||
|
loader: "file-loader",
|
||||||
|
options: {
|
||||||
|
outputPath: 'fonts'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// test: /\.svg$/,
|
||||||
|
// exclude: /node_modules/,
|
||||||
|
// use: SvgSpriteHtmlWebpackPlugin.getLoader(),
|
||||||
|
// }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
optimization: {
|
||||||
|
minimize: true,
|
||||||
|
minimizer: [
|
||||||
|
new CssMinimizerPlugin(),
|
||||||
|
],
|
||||||
|
runtimeChunk: 'single',
|
||||||
|
splitChunks: {
|
||||||
|
chunks: 'all',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new CleanWebpackPlugin(),
|
||||||
|
new HtmlWebpackPlugin({
|
||||||
|
filename: '../index.html',
|
||||||
|
template: 'load.html',
|
||||||
|
minify: {
|
||||||
|
html5: true,
|
||||||
|
collapseWhitespace: true,
|
||||||
|
minifyCSS: true,
|
||||||
|
minifyJS: true,
|
||||||
|
minifyURLs: false,
|
||||||
|
removeAttributeQuotes: true,
|
||||||
|
removeComments: true, // false for Vue SSR to find app placeholder
|
||||||
|
removeEmptyAttributes: true,
|
||||||
|
removeOptionalTags: true,
|
||||||
|
removeRedundantAttributes: true,
|
||||||
|
removeScriptTypeAttributes: true,
|
||||||
|
removeStyleLinkTypeAttributese: true,
|
||||||
|
useShortDoctype: true
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
// new SvgSpriteHtmlWebpackPlugin({
|
||||||
|
// append: true,
|
||||||
|
// includeFiles: [
|
||||||
|
// 'app/images/*.svg',
|
||||||
|
// ],
|
||||||
|
// generateSymbolId: function(svgFilePath, svgHash, svgContent) {
|
||||||
|
// return svgHash.toString();
|
||||||
|
// },
|
||||||
|
// }),
|
||||||
|
new HtmlWebpackInlineSVGPlugin({
|
||||||
|
inlineAll: true,
|
||||||
|
runPreEmit: true,
|
||||||
|
}),
|
||||||
|
new MiniCssExtractPlugin({
|
||||||
|
filename: "[name].bundle.css"
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
};
|
@ -51,7 +51,7 @@ if [ $SERVER = 1 ]; then
|
|||||||
mkdir -p $OUTDIR/lib/dri/
|
mkdir -p $OUTDIR/lib/dri/
|
||||||
install -m 755 ./xorg.build/lib/dri/swrast_dri.so $OUTDIR/lib/dri/
|
install -m 755 ./xorg.build/lib/dri/swrast_dri.so $OUTDIR/lib/dri/
|
||||||
mkdir -p $OUTDIR/share/kasmvnc
|
mkdir -p $OUTDIR/share/kasmvnc
|
||||||
cp -r $SRCDIR/kasmweb $OUTDIR/share/kasmvnc/www
|
cp -r $SRCDIR/builder/www $OUTDIR/share/kasmvnc/www
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#pushd $TMPDIR/inst
|
#pushd $TMPDIR/inst
|
||||||
|
@ -276,7 +276,7 @@ $passwordArgSpecified = 0;
|
|||||||
#}
|
#}
|
||||||
|
|
||||||
# Disable vnc auth, kasmvnc uses https basic auth
|
# Disable vnc auth, kasmvnc uses https basic auth
|
||||||
system("echo '' | ".$exedir."vncpasswd -f > $vncUserDir/passwd");
|
system("echo 'WrLNwLrcrxM=' | base64 -d > $vncUserDir/passwd");
|
||||||
|
|
||||||
$kasmAuthEnabled = 1;
|
$kasmAuthEnabled = 1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user