Compare commits

..

108 Commits

Author SHA1 Message Date
mattmcclaskey
56c840fc94 update novnc ref to 1.1.0 2023-04-05 10:28:20 -04:00
Richard Koliser
5c068f0d4f Merge branch 'bump-packages-to-1.1.0' into 'master'
Bump packages to 1.1.0

See merge request kasm-technologies/internal/KasmVNC!99
2023-04-05 14:20:08 +00:00
Matthew McClaskey
932ca80b50 update Xvnc version 2023-04-04 18:15:53 +00:00
Dmitry Maksyoma
ee07a90111 Bump package versions to 1.1.0 2023-04-05 01:53:55 +12:00
Dmitry Maksyoma
09fdbc1ab3 bump-package-version-rpm: support Fedora 2023-04-05 01:51:21 +12:00
Dmitry Maksyoma
8372a91d53 bump-package-version-rpm: support multiple specs per dir 2023-04-05 01:49:56 +12:00
Matthew McClaskey
76618a3e0b Merge branch 'bugfix/KASM-4239-index.html-symlink' into 'master'
Resolve KASM-4239 "Bugfix/ index.html symlink"

Closes KASM-4239

See merge request kasm-technologies/internal/KasmVNC!98
2023-04-04 13:35:26 +00:00
Dmitry Maksyoma
22901b87b0 Fix Oracle 9 barebones test 2023-04-01 23:33:39 +13:00
Dmitry Maksyoma
a0121b4117 Fedora: add xkbcomp dependency 2023-04-01 23:26:18 +13:00
Dmitry Maksyoma
0fa8eafa01 Add xkbcomp as Oracle 9 dependency 2023-04-01 20:44:21 +13:00
Dmitry Maksyoma
5ad7b2dc54 Add symlink vnc.html -> index.html 2023-03-31 20:32:25 +13:00
mattmcclaskey
d00c1819fe update novnc ref 2023-03-22 11:53:13 -04:00
Matthew McClaskey
037eae7f44 Merge branch 'bugfix/KASM-4151-cherry-pick-fixes' into 'master'
KASM-4151 copying over fixes from gnome_blank branch

See merge request kasm-technologies/internal/KasmVNC!97
2023-03-22 15:47:39 +00:00
ryan.kuba
9aa33f1900 KASM-4151 copying over fixes from gnome_blank branch 2023-03-21 12:21:40 -07:00
Richard Koliser
32a9b354b9 Merge branch 'feature/KASM-4134_gpl2_lic' into 'master'
KASM-4134 change license to GPLv2

Closes KASM-4134

See merge request kasm-technologies/internal/KasmVNC!95
2023-03-20 13:03:11 +00:00
mattmcclaskey
a1e3d91489 KASM-4134 change license to GPLv2 2023-03-15 12:59:38 -04:00
Matthew McClaskey
9a8bfce25f Merge branch 'feature/KASM-4139-build-at-release' into 'master'
KASM-4139 use latest release intead of development head for libjpeg turbo

Closes KASM-4139

See merge request kasm-technologies/internal/KasmVNC!94
2023-03-15 16:50:17 +00:00
Ryan Kuba
5b58cfb1e1 KASM-4139 use latest release intead of development head for libjpeg turbo 2023-03-15 16:50:16 +00:00
mattmcclaskey
243176984e update noVNC ref 2023-03-14 14:32:33 -04:00
Matthew McClaskey
059bec7ddf Merge branch 'feature/KASM-2117_watermark' into 'master'
Resolve KASM-2117 "Feature/ watermark"

Closes KASM-2117

See merge request kasm-technologies/internal/KasmVNC!91
2023-03-14 18:08:18 +00:00
mattmcclaskey
a2b2230489 fix for opensuse build 2023-03-14 11:18:36 -04:00
mattmcclaskey
cc4ec630c2 update noVNC ref 2023-03-14 08:26:20 -04:00
mattmcclaskey
3116154f79 Merge branch 'master' into feature/KASM-2117_watermark 2023-03-14 08:24:34 -04:00
Matthew McClaskey
cc606d0c00 Merge branch 'feature/KASM-3870-statically-link-libjpeg' into 'master'
Resolve KASM-3870 "Feature/ statically link libjpeg"

Closes KASM-3870

See merge request kasm-technologies/internal/KasmVNC!87
2023-03-14 12:20:28 +00:00
mattmcclaskey
ba399efc3f Alpine and Oracle 9 build fixes 2023-03-13 15:57:24 -04:00
Dmitry Maksyoma
ec347f5b46 Support newest libjpeg-turbo on Fedora 37 2023-03-09 23:20:18 +13:00
mattmcclaskey
252fc2f20c rebase and fix conflicts 2023-03-07 07:23:03 -05:00
Matthew McClaskey
47bdc828c1 Merge branch 'feature/KASM-3806_hw3d' into 'master'
Resolve KASM-3806 "Feature/ hw3d"

Closes KASM-3806

See merge request kasm-technologies/internal/KasmVNC!89
2023-03-06 15:50:59 +00:00
ryan.kuba
f0786fa3d4 KASM-3806 update OpenSUSE gl version sub 2023-03-05 12:30:08 -08:00
ryan.kuba
178dd8e7ae KASM-3806 remove testing logic from MR branch 2023-03-05 12:13:42 -08:00
ryan.kuba
3070de6d10 KASM-3806 remove panic assert from Fedora and fix Opensuse builds 2023-03-04 15:47:29 -08:00
ryan.kuba
8b9ef1bc15 KASM-3806 bump fedora and alpine xorg versions 2023-03-04 14:16:05 -08:00
ryan.kuba
90fd90b948 KASM-3806 revert changes for build issue 2023-03-03 10:09:03 -08:00
ryan.kuba
e77d6693b3 KASM-3806 cross deps from ol9 epel 2023-03-03 09:57:42 -08:00
ryan.kuba
13458a0a88 KASM-3806 update deps for oracle 9 2023-03-03 09:36:53 -08:00
mattmcclaskey
6a8adf0fb1 Add yaml configs for new settings 2023-03-03 08:58:14 -05:00
mattmcclaskey
ec810a2abe Merge branch 'master' into feature/KASM-2117_watermark 2023-03-03 08:35:52 -05:00
mattmcclaskey
d15492fa32 add missing dependency for oracle 9 2023-03-03 06:53:36 -05:00
mattmcclaskey
f9e6aa234e rebase and fix merge conflicts 2023-03-03 06:24:26 -05:00
Matthew McClaskey
4678f3d969 Merge branch 'feature/KASM-4031-alpine-317' into 'master'
Resolve KASM-4031 "Feature/ alpine 317"

Closes KASM-4031

See merge request kasm-technologies/internal/KasmVNC!93
2023-03-03 11:09:08 +00:00
Ryan Kuba
20876547a1 Resolve KASM-4031 "Feature/ alpine 317" 2023-03-03 11:09:08 +00:00
ryan.kuba
ee10b81eef KASM-3806 revert yaml changes to working ones 2023-03-02 13:06:29 -08:00
ryan.kuba
ea7568b240 KASM-3806 centos 7 is too old to build dri3 2023-03-02 12:29:03 -08:00
ryan.kuba
d1492bd0c0 KASM-3806 update fedora build logic for dri3 2023-03-02 12:00:16 -08:00
Ryan Kuba
f1bdfb5ab5 Merge branch 'master' into 'feature/KASM-3806_hw3d'
# Conflicts:
#   builder/build.sh
2023-03-02 19:52:20 +00:00
ryan.kuba
099211c281 KASM-3806 fix builds and deps for oracle and opensuse 2023-03-02 11:45:21 -08:00
Dmitry Maksyoma
60cfd52bcf Refactor 2023-02-28 23:31:00 +13:00
ryan.kuba
1b7ebc2a96 KASM-4038 update var to be inside scope instead of global 2023-02-24 07:21:51 -08:00
Matthew McClaskey
a2c49f6d89 Merge branch 'feature/KASM-4032-build-fedora-37' into 'master'
Resolve KASM-4032 "Feature/ build fedora 37"

Closes KASM-4032

See merge request kasm-technologies/internal/KasmVNC!92
2023-02-24 12:02:29 +00:00
Ryan Kuba
e64a5f87d0 Resolve KASM-4032 "Feature/ build fedora 37" 2023-02-24 12:02:28 +00:00
ryan.kuba
bbfbcc5af8 KASM-4038 add current options in readme and add note to changelog 2023-02-23 12:27:41 -08:00
Dmitry Maksyoma
8a9fd18228 vncserver: die without printing source code line 2023-02-23 07:40:00 +13:00
Dmitry Maksyoma
e5056eaeea vncserver: fix debug output 2023-02-23 07:01:42 +13:00
Dmitry Maksyoma
16bf937bfa vncserver: die if config wasn't loaded 2023-02-23 06:19:42 +13:00
Dmitry Maksyoma
797c57121a vncserver: add debug output on config load 2023-02-23 05:40:12 +13:00
Dmitry Maksyoma
a1b138e5e1 vncserver: support Logger debug level 2023-02-23 05:39:12 +13:00
Lauri Kasanen
834bb9a925 Another optimization 2023-02-17 14:52:26 +02:00
Lauri Kasanen
5b3786e5ad Small optimization 2023-02-17 14:45:31 +02:00
Lauri Kasanen
ae93cd6840 Initial support for intensity-tinted alpha watermark 2023-02-17 14:04:32 +02:00
ryan.kuba
cdf21ea6fd KASM-4038 fix yaml processor to now pass a bool value for hw3d 2023-02-16 18:48:42 -08:00
ryan.kuba
22ec1c6dbd KASM-4038 add yaml config options for new CLI params 2023-02-16 16:01:11 -08:00
Matthew McClaskey
61613c4e65 Merge branch 'feature/KASM-3986_fixed_runner' into 'master'
Resolve KASM-3986 "Feature/ fixed runner"

Closes KASM-3986

See merge request kasm-technologies/internal/KasmVNC!88
2023-02-14 20:05:23 +00:00
Matthew McClaskey
7366bbc613 build all jobs by default 2023-02-13 18:39:26 +00:00
Matthew McClaskey
b91d06f734 arm runner 2023-02-09 02:11:25 +00:00
Matthew McClaskey
73016d8d55 tseting 2023-02-09 00:25:35 +00:00
Matthew McClaskey
ed4d4ea59f update docker host 2023-02-09 00:11:27 +00:00
Matthew McClaskey
9684bd1f0a KASM-3986 test fixed runner 2023-02-02 16:53:50 +00:00
Lauri Kasanen
a2d2e48bd4 Debian changes from Matt 2023-01-27 08:18:39 +02:00
Dmitry Maksyoma
a1cd656910 Update test-deb and test-rpm docs 2023-01-26 21:05:07 +13:00
Dmitry Maksyoma
1116642e62 Update README 2023-01-26 20:56:25 +13:00
Dmitry Maksyoma
3104465f62 Remove cruft 2023-01-26 19:51:36 +13:00
Dmitry Maksyoma
33018e7b82 Remove package dependencies on libjpeg 2023-01-26 18:56:39 +13:00
Dmitry Maksyoma
6d791eb059 Refactor 2023-01-26 18:52:02 +13:00
Dmitry Maksyoma
a5a36d96b6 Extract WebP building into a script 2023-01-26 17:18:17 +13:00
Dmitry Maksyoma
2017ac01f5 Support --perf-test, --shell in barebones test scripts 2023-01-25 18:30:56 +13:00
Dmitry Maksyoma
8d49eed7f0 Support --perf-test, --shell in test-deb, test-rpm 2023-01-25 18:28:53 +13:00
Dmitry Maksyoma
55c8c1e80e Support newest libjpeg-turbo on Fedora 33 2023-01-25 17:27:10 +13:00
Dmitry Maksyoma
a5193e240a Remove cruft 2023-01-24 22:16:11 +13:00
Dmitry Maksyoma
503784a4aa Refactor 2023-01-24 22:15:03 +13:00
Dmitry Maksyoma
956f83dda2 Remove special Bionic libjpeg-turbo build 2023-01-24 22:09:35 +13:00
Dmitry Maksyoma
546814266d Support newest libjpeg-turbo on Ubuntu Bionic 2023-01-24 21:46:53 +13:00
Dmitry Maksyoma
07ef056612 Support newest libjpeg-turbo on Kali Linux 2023-01-24 21:45:30 +13:00
Dmitry Maksyoma
0206686ce0 Support newest libjpeg-turbo on Debian Buster 2023-01-24 21:44:37 +13:00
Dmitry Maksyoma
5fcff79967 Support newest libjpeg-turbo on Ubuntu Jammy 2023-01-24 21:43:54 +13:00
Dmitry Maksyoma
4bf7097dc9 Support newest libjpeg-turbo on Debian Bullseye 2023-01-24 21:43:36 +13:00
Dmitry Maksyoma
40401ef380 Support newest libjpeg-turbo on OpenSuse 2023-01-24 21:40:09 +13:00
Dmitry Maksyoma
c34724f421 Support newest libjpeg-turbo on Oracle 2023-01-24 21:29:05 +13:00
Lauri Kasanen
9f5fbae244 Enable dri3 in builder 2023-01-20 13:28:07 +02:00
Lauri Kasanen
38ac841490 Update xserver120.patch with present change 2023-01-20 13:23:54 +02:00
Lauri Kasanen
d04982125a Initial DRI3 support 2023-01-20 13:18:05 +02:00
Lauri Kasanen
4b89868219 Some warning fixes 2023-01-18 15:31:13 +02:00
Lauri Kasanen
7760ec2d84 Clear a warning 2023-01-18 15:31:13 +02:00
Dmitry Maksyoma
8cd57a612d Refactor 2023-01-19 01:47:04 +13:00
Dmitry Maksyoma
23676ab3b3 Support newest libjpeg-turbo on Centos 2023-01-19 01:35:36 +13:00
Dmitry Maksyoma
d1cc18f751 Refactor 2023-01-18 20:09:40 +13:00
Dmitry Maksyoma
cac80a22a3 Refactor 2023-01-18 20:01:19 +13:00
Dmitry Maksyoma
907e32187c Staticly link libjpeg-turbo in Ubuntu Focal 2023-01-18 19:35:15 +13:00
Lauri Kasanen
895b6b5697 Complain about missing read permissions once, as it's a typical config mistake 2023-01-16 15:01:57 +02:00
Lauri Kasanen
90afa1f005 Save xorg .gitignore 2023-01-16 14:34:40 +02:00
Matthew McClaskey
f1104e2cb5 Merge branch 'feature/KASM-2863-clipboard-api-redo' into 'master'
Add clear_clipboard API

Closes KASM-2863

See merge request kasm-technologies/internal/KasmVNC!86
2023-01-11 11:13:30 +00:00
Matt McClaskey
9f42bad1f8 update novnc ref 2023-01-10 13:34:38 +00:00
Lauri Kasanen
1bd674d7b3 Also clear local clipboards 2023-01-10 13:56:13 +02:00
Matthew McClaskey
22949e28e3 Added Github issue templates 2023-01-10 11:12:03 +00:00
Lauri Kasanen
66f3013998 Add clear_clipboard API 2023-01-09 13:32:30 +02:00
Matthew McClaskey
95f64ce1f2 Merge branch 'bugfix/KASM-3742_readme_link_fix' into 'master'
KASM-3742 fix link

Closes KASM-3742

See merge request kasm-technologies/internal/KasmVNC!83
2022-12-09 20:40:17 +00:00
matt
e187fb7205 KASM-3742 fix link 2022-12-09 20:38:46 +00:00
Matthew McClaskey
1623c5da93 Merge branch 'bugfix/KASM-3680-skip-tag-builds-ci' into 'master'
CI: disable tag builds

Closes KASM-3680

See merge request kasm-technologies/internal/KasmVNC!82
2022-12-02 11:51:28 +00:00
Dmitry Maksyoma
dca55c7c8b CI: disable tag builds 2022-12-02 10:12:05 +13:00
102 changed files with 2209 additions and 411 deletions

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.

View File

@@ -0,0 +1,27 @@
---
name: Installation Issue
about: Create a report about an installation issue
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the issue is.
**System Description**
Provide the output of
```bash
cat /etc/os-release
uname -a
```
**KasmVNC Details**
Provide the filename of the package you installed KasmVNC with. The filename includes important details like the OS, architecture, and commit sha.
**Installation Details**
Provide the commands used to install the KasmVNC package and the output of those commands.
**Additional context**
Add any other context about the problem here.

View File

@@ -0,0 +1,46 @@
---
name: Report a bug or issue with KasmVNC
about: Create a bug/issue report on KasmVNC
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the issue is.
**System Description**
Provide the output of
```bash
cat /etc/os-release
uname -a
```
**KasmVNC Details**
Provide the filename of the package you installed KasmVNC with. The filename includes important details like the OS, architecture, and commit sha.
Provide the output of this command.
```bash
Xvnc -version
```
**To Reproduce**
Steps to reproduce the behavior (for non-installation issues):
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.
**Browser**
If this is a problem with the KasmVNC client, provide details about the browser you are accessing KasmVNC from.
- Device: [e.g. iPhone6]
- OS: [e.g. Windows 11]
- Browser [e.g. chrome, safari, edge]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@@ -11,6 +11,12 @@ variables:
# arm builds, because build_debian_buster_arm matches build_debian_buster.
# "BUILD_JOBS: none" won't build any build jobs, nor www.
BUILD_JOBS: all
DOCKER_HOST: unix://
workflow:
rules:
# Disable tag builds.
- if: $CI_COMMIT_TAG != $CI_COMMIT_REF_NAME
stages:
- www
@@ -30,6 +36,10 @@ stages:
- cp -r builder/build/* output/
- rm output/*.tar.gz
default:
tags:
- oci-fixed-amd64
build_www:
stage: www
allow_failure: false
@@ -42,11 +52,13 @@ build_www:
- docker run --rm -v $PWD/builder/www:/build kasmweb/www:latest
- mkdir -p output/www
- cd builder
- echo $PWD
- ls -l
- ls -l ../output
- tar -zcvf ../output/www/kasm_www.tar.gz www
only:
variables:
- $BUILD_JOBS !~ /^none$/
- $CI_COMMIT_TAG == ""
artifacts:
paths:
- output/
@@ -72,7 +84,7 @@ build_ubuntu_bionic_arm:
stage: build
allow_failure: false
tags:
- arm
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
@@ -87,23 +99,6 @@ build_ubuntu_bionic_arm:
paths:
- output/
build_ubuntu_bionic_libjpeg_turbo:
stage: build
allow_failure: false
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package ubuntu bionic +libjpeg-turbo_latest
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_ubuntu_focal:
stage: build
allow_failure: true
@@ -125,7 +120,7 @@ build_ubuntu_focal_arm:
stage: build
allow_failure: true
tags:
- arm
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
@@ -161,7 +156,7 @@ build_ubuntu_jammy_arm:
stage: build
allow_failure: true
tags:
- arm
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
@@ -188,7 +183,7 @@ build_debian_buster:
- bash builder/build-package debian buster;
only:
variables:
- $CI_COMMIT_MESSAGE =~ /\[full [cC][Ii]\]/ || $BUILD_JOBS =~ $CI_JOB_NAME
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
@@ -197,7 +192,7 @@ build_debian_buster_arm:
stage: build
allow_failure: true
tags:
- arm
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
@@ -207,7 +202,7 @@ build_debian_buster_arm:
- bash builder/build-package debian buster;
only:
variables:
- $CI_COMMIT_MESSAGE =~ /\[full [cC][Ii]\]/ || $BUILD_JOBS =~ $CI_JOB_NAME
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
@@ -224,7 +219,7 @@ build_debian_bullseye:
- bash builder/build-package debian bullseye;
only:
variables:
- $CI_COMMIT_MESSAGE =~ /\[full [cC][Ii]\]/ || $BUILD_JOBS =~ $CI_JOB_NAME
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
@@ -233,7 +228,7 @@ build_debian_bullseye_arm:
stage: build
allow_failure: true
tags:
- arm
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
@@ -243,7 +238,7 @@ build_debian_bullseye_arm:
- bash builder/build-package debian bullseye;
only:
variables:
- $CI_COMMIT_MESSAGE =~ /\[full [cC][Ii]\]/ || $BUILD_JOBS =~ $CI_JOB_NAME
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
@@ -269,7 +264,7 @@ build_kali_rolling_arm:
stage: build
allow_failure: true
tags:
- arm
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
@@ -322,7 +317,7 @@ build_oracle_8_arm:
stage: build
allow_failure: true
tags:
- arm
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
@@ -337,6 +332,42 @@ build_oracle_8_arm:
paths:
- output/
build_oracle_9:
stage: build
allow_failure: true
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package oracle 9;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_oracle_9_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package oracle 9;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_opensuse_15:
stage: build
allow_failure: true
@@ -358,7 +389,7 @@ build_opensuse_15_arm:
stage: build
allow_failure: true
tags:
- arm
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
@@ -373,6 +404,78 @@ build_opensuse_15_arm:
paths:
- output/
build_fedora_thirtyseven:
stage: build
allow_failure: true
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora thirtyseven;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_fedora_thirtyseven_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package fedora thirtyseven;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_317:
stage: build
allow_failure: true
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 317;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
build_alpine_317_arm:
stage: build
allow_failure: true
tags:
- oci-fixed-arm64
before_script:
- *prepare_build
- *prepare_www
after_script:
- *prepare_artfacts
script:
- bash builder/build-package alpine 317;
only:
variables:
- $BUILD_JOBS == 'all' || $BUILD_JOBS =~ $CI_JOB_NAME
artifacts:
paths:
- output/
test:
stage: test
before_script:
@@ -399,12 +502,12 @@ upload:
done
- export S3_BUILD_DIRECTORY="kasmvnc/${CI_COMMIT_SHA}"
- export RELEASE_VERSION=$(.ci/next_release_version "$CI_COMMIT_REF_NAME")
- for package in `find output/ -type f -name '*.deb' -or -name '*.rpm'`; do
- for package in `find output/ -type f -name '*.deb' -or -name '*.rpm' -or -name '*.tgz'`; do
prepare_upload_filename "$package";
upload_filename="${S3_BUILD_DIRECTORY}/$upload_filename";
echo;
echo "File to upload $upload_filename";
upload_to_s3 "$package" "$upload_filename" "$S3_BUCKET";
UPLOAD_NAME=$(basename $upload_filename | sed 's#kasmvncserver_##' | sed -r 's#_([0-9]{1,3}\.){2}[0-9]{1,2}_\S+?([a-f0-9]{6})##' | sed -r 's#\.(deb|rpm)##');
UPLOAD_NAME=$(basename $upload_filename | sed 's#kasmvncserver_##' | sed -r 's#_([0-9]{1,3}\.){2}[0-9]{1,2}_\S+?([a-f0-9]{6})##' | sed -r 's#\.(deb|rpm|tgz)##');
curl --request POST --header "PRIVATE-TOKEN:${GITLAB_API_TOKEN}" "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/statuses/${CI_COMMIT_SHA}?state=success&name=${UPLOAD_NAME}&target_url=${S3_URL}";
done

2
.gitmodules vendored
View File

@@ -1,4 +1,4 @@
[submodule "kasmweb"]
path = kasmweb
url = https://github.com/kasmtech/noVNC.git
branch = master
branch = release/1.1.0

View File

@@ -148,9 +148,14 @@ endif()
# Check for zlib
find_package(ZLIB REQUIRED)
# Check for libpng
find_package(PNG REQUIRED)
# Check for libjpeg
find_package(JPEG REQUIRED)
# Staticly link libjpeg-turbo
set(JPEG_LIBRARIES "-Wl,-Bstatic -lturbojpeg -Wl,-Bdynamic")
# Warn if it doesn't seem to be the accelerated libjpeg that's found
set(CMAKE_REQUIRED_LIBRARIES ${JPEG_LIBRARIES})
set(CMAKE_REQUIRED_FLAGS -I${JPEG_INCLUDE_DIR})

View File

@@ -92,7 +92,7 @@ KasmVNC is configured via YAML based configurations. The server level configurat
The following configuration shows all default settings. Many of the encoding settings can be overridden by the client, unless the `runtime_configuration.allow_client_to_override_kasm_server_settings` setting is set tot false. By default the client is allowed to modify encoding settings.
For a full description of each setting see the [configuration reference](https://www.kasmweb/kasmvnc/docs/latest/index.html).
For a full description of each setting see the [configuration reference](https://www.kasmweb.com/kasmvnc/docs/latest/configuration.html).
```yaml
desktop:
@@ -101,6 +101,9 @@ desktop:
height: 768
allow_resize: true
pixel_depth: 24
gpu:
hw3d: false
drinode: /dev/dri/renderD128
network:
protocol: http
@@ -228,6 +231,7 @@ command_line:
# New Features!
- Faster jpeg compression (via statically linked libjpeg-turbo)
- Webp image compression for better bandwidth usage
- Automatic mixing of webp and jpeg based on CPU availability on server
- Multi-threaded image encoding for smoother frame rate for servers with more cores
@@ -255,6 +259,7 @@ command_line:
- Cursor lock
- IME support for languages with extended characters
- Better mobile support
- DRI3 GPU acceleration with open source drivers (AMDGPU,Intel,ATI,ARM)
Future Goals:

View File

@@ -48,6 +48,18 @@ It will install the package inside a new container and run KasmVNC.
Open browser and point to https://localhost:443/ or https://\<ip-address\>:443/
## Debugging
To debug a test container, run `test-deb ubuntu focal -s` or `test-deb ubuntu
focal --shell`. It runs a shell instead of starting KasmVNC.
## Testing performance
To run a performance test, add `-p` option:
```
builder/test-deb ubuntu focal -p
```
# Package development
## deb/rpm package building and testing

17
builder/build-apk Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
set -e
. builder/os_ver_cli.sh
cd "$(dirname "$0")/.."
docker build -t kasmvnc_apkbuilder_${os}:${os_codename} -f \
builder/dockerfile.${os}_${os_codename}.apk.build .
source_dir=$(echo $PWD)
L_UID=$(id -u)
L_GID=$(id -g)
docker run --rm -v "$source_dir":/src --user $L_UID:$L_GID \
kasmvnc_apkbuilder_${os}:${os_codename} /bin/bash -c \
'/src/builder/build-apk-inside-docker'

11
builder/build-apk-inside-docker Executable file
View File

@@ -0,0 +1,11 @@
#!/bin/bash
set -e
os=alpine
os_codename=$(cat /etc/os-release | awk '/VERSION_ID/' | grep -o '[[:digit:]]' | tr -d '\n' | head -c 3)
mkdir -p /src/builder/build/${os}_${os_codename}
mv \
/src/builder/build/kasmvnc.${os}_${os_codename}.tar.gz \
/src/builder/build/${os}_${os_codename}/kasmvnc.${os}_${os_codename}_$(uname -m).tgz

View File

@@ -10,6 +10,8 @@ detect_package_format() {
package_format=rpm
if ls builder/dockerfile*"$os"* | grep -q .deb.build; then
package_format=deb
elif ls builder/dockerfile*"$os"* | grep -q .apk.build; then
package_format=apk
fi
}

View File

@@ -8,7 +8,7 @@ prepare_build_env() {
}
copy_spec_and_tar_with_binaries() {
cp /tmp/kasmvncserver.spec ~/rpmbuild/SPECS/
cp /tmp/*.spec ~/rpmbuild/SPECS/
cp /src/builder/build/kasmvnc.${os}_${os_codename}.tar.gz \
~/rpmbuild/SOURCES/
}
@@ -30,6 +30,6 @@ fi
os_dir="build/${os}_${os_codename}"
prepare_build_env
rpmbuild -ba ~/rpmbuild/SPECS/kasmvncserver.spec
rpmbuild -ba ~/rpmbuild/SPECS/*.spec
copy_rpm_to_build_dir
rpmlint "$os_dir"/*.rpm || true

View File

@@ -40,14 +40,14 @@ EOF
#sudo apt-get install cmake git libjpeg-dev libgnutls-dev
# Gcc12 builds fail due to bug
fail_on_gcc_12
#fail_on_gcc_12
# Ubuntu applies a million patches, but here we use upstream to simplify matters
cd /tmp
# 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 --no-check-certificate https://www.x.org/archive/individual/xserver/xorg-server-${XORG_VER}.tar.bz2
wget --no-check-certificate https://www.x.org/archive/individual/xserver/xorg-server-${XORG_VER}.tar.gz
#git clone https://kasmweb@bitbucket.org/kasmtech/kasmvnc.git
#cd kasmvnc
@@ -64,9 +64,10 @@ cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo . -DBUILD_VIEWER:BOOL=OFF \
-DENABLE_GNUTLS:BOOL=OFF
make -j5
tar -C unix/xserver -xf /tmp/xorg-server-${XORG_VER}.tar.bz2 --strip-components=1
tar -C unix/xserver -xf /tmp/xorg-server-${XORG_VER}.tar.gz --strip-components=1
cd unix/xserver
# Apply patches
patch -Np1 -i ../xserver${XORG_PATCH}.patch
case "$XORG_VER" in
1.20.*)
@@ -85,22 +86,42 @@ autoreconf -i
# everything after that is based on BUILDING.txt to remove unneeded
# components.
ensure_crashpad_can_fetch_line_number_by_address
# Centos7 is too old for dri3
if [ ! "${KASMVNC_BUILD_OS}" == "centos" ]; then
CONFIG_OPTIONS="--enable-dri3"
fi
# remove gl check for opensuse
if [ "${KASMVNC_BUILD_OS}" == "opensuse" ]; then
if [ "${KASMVNC_BUILD_OS}" == "opensuse" ] || ([ "${KASMVNC_BUILD_OS}" == "oracle" ] && [ "${KASMVNC_BUILD_OS_CODENAME}" == 9 ]); then
sed -i 's/LIBGL="gl >= 7.1.0"/LIBGL="gl >= 1.1"/g' configure
fi
./configure --prefix=/opt/kasmweb \
--with-xkb-path=/usr/share/X11/xkb \
--with-xkb-output=/var/lib/xkb \
--with-xkb-bin-directory=/usr/bin \
--with-default-font-path="/usr/share/fonts/X11/misc,/usr/share/fonts/X11/cyrillic,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins" \
--with-sha1=libcrypto \
--without-dtrace --disable-dri \
--disable-static \
--disable-xinerama --disable-xvfb --disable-xnest --disable-xorg \
--disable-dmx --disable-xwin --disable-xephyr --disable-kdrive \
--disable-config-hal --disable-config-udev \
--disable-dri2 --enable-glx --disable-xwayland --disable-dri3
# build X11
./configure \
--disable-config-hal \
--disable-config-udev \
--disable-dmx \
--disable-dri \
--disable-dri2 \
--disable-kdrive \
--disable-static \
--disable-xephyr \
--disable-xinerama \
--disable-xnest \
--disable-xorg \
--disable-xvfb \
--disable-xwayland \
--disable-xwin \
--enable-glx \
--prefix=/opt/kasmweb \
--with-default-font-path="/usr/share/fonts/X11/misc,/usr/share/fonts/X11/cyrillic,/usr/share/fonts/X11/100dpi/:unscaled,/usr/share/fonts/X11/75dpi/:unscaled,/usr/share/fonts/X11/Type1,/usr/share/fonts/X11/100dpi,/usr/share/fonts/X11/75dpi,built-ins" \
--without-dtrace \
--with-sha1=libcrypto \
--with-xkb-bin-directory=/usr/bin \
--with-xkb-output=/var/lib/xkb \
--with-xkb-path=/usr/share/X11/xkb ${CONFIG_OPTIONS}
# remove array bounds errors for new versions of GCC
find . -name "Makefile" -exec sed -i 's/-Werror=array-bounds//g' {} \;
make -j5
# modifications for the servertarball
@@ -118,6 +139,8 @@ if [ -d /usr/lib/x86_64-linux-gnu/dri ]; then
ln -s /usr/lib/x86_64-linux-gnu/dri dri
elif [ -d /usr/lib/aarch64-linux-gnu/dri ]; then
ln -s /usr/lib/aarch64-linux-gnu/dri dri
elif [ -d /usr/lib/xorg/modules/dri ]; then
ln -s /usr/lib/xorg/modules/dri dri
else
ln -s /usr/lib64/dri dri
fi

View File

@@ -15,3 +15,4 @@ cd /build
rm *.md
rm AUTHORS
rm vnc.html
ln -s index.html vnc.html

View File

@@ -3,9 +3,13 @@
set -eo pipefail
new_version="$1"
specs="centos/kasmvncserver.spec
oracle/kasmvncserver.spec
opensuse/kasmvncserver.spec"
spec_dirs=(centos oracle opensuse fedora)
spec_files() {
for d in "${spec_dirs[@]}"; do
ls "$d"/*.spec
done
}
bump_version() {
sed -i "s/^Version:.\+/Version: $new_version/" "$1"
@@ -25,8 +29,7 @@ bump_changelog() {
sed -i -e "s/%changelog/%changelog\n$new_changelog_entry/" "$1"
}
IFS=$'\n'
for spec_file in $specs; do
for spec_file in $(spec_files); do
bump_version $spec_file
bump_changelog $spec_file
done

View File

@@ -0,0 +1,7 @@
FROM alpine:3.17
RUN apk add shadow bash
RUN useradd -m docker && echo "docker:docker" | chpasswd
USER docker

View File

@@ -0,0 +1,82 @@
FROM alpine:3.17
ENV KASMVNC_BUILD_OS alpine
ENV KASMVNC_BUILD_OS_CODENAME 317
ENV XORG_VER 1.20.14
RUN \
echo "**** install build deps ****" && \
apk add \
alpine-release \
alpine-sdk \
autoconf \
automake \
bash \
ca-certificates \
cmake \
coreutils \
curl \
eudev-dev \
font-cursor-misc \
font-misc-misc \
font-util-dev \
git \
grep \
jq \
libdrm-dev \
libepoxy-dev \
libjpeg-turbo-dev \
libjpeg-turbo-static \
libpciaccess-dev \
libtool \
libwebp-dev \
libx11-dev \
libxau-dev \
libxcb-dev \
libxcursor-dev \
libxcvt-dev \
libxdmcp-dev \
libxext-dev \
libxfont2-dev \
libxkbfile-dev \
libxrandr-dev \
libxshmfence-dev \
libxtst-dev \
mesa-dev \
mesa-dri-gallium \
meson \
nettle-dev \
openssl-dev \
pixman-dev \
procps \
shadow \
tar \
tzdata \
wayland-dev \
wayland-protocols \
xcb-util-dev \
xcb-util-image-dev \
xcb-util-keysyms-dev \
xcb-util-renderutil-dev \
xcb-util-wm-dev \
xinit \
xkbcomp \
xkbcomp-dev \
xkeyboard-config \
xorgproto \
xorg-server-common \
xorg-server-dev \
xtrans
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@@ -5,11 +5,11 @@ ENV KASMVNC_BUILD_OS_CODENAME core
RUN yum install -y ca-certificates
RUN yum install -y build-dep xorg-server libxfont-dev sudo
RUN yum install -y gcc cmake git libjpeg-dev libgnutls28-dev vim wget tightvncserver
RUN yum install -y libjpeg-dev libpng-dev libtiff-dev libgif-dev libavcodec-dev openssl-devel
RUN yum install -y gcc cmake git libgnutls28-dev vim wget tightvncserver
RUN yum install -y libpng-dev libtiff-dev libgif-dev libavcodec-dev openssl-devel
RUN yum install -y make
RUN yum group install -y "Development Tools"
RUN yum install -y xorg-x11-server-devel zlib-devel libjpeg-turbo-devel
RUN yum install -y xorg-x11-server-devel zlib-devel
RUN yum install -y libxkbfile-devel libXfont2-devel xorg-x11-font-utils \
xorg-x11-xtrans-devel xorg-x11-xkb-utils-devel libXrandr-devel pam-devel \
gnutls-devel libX11-devel libXtst-devel libXcursor-devel
@@ -23,6 +23,10 @@ RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/

View File

@@ -12,15 +12,13 @@ RUN apt-get update && \
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 cmake git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-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 -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo

View File

@@ -12,15 +12,13 @@ RUN apt-get update && \
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 cmake git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-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 -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo

View File

@@ -34,14 +34,6 @@ RUN apt-get purge -y pm-utils xscreensaver*
RUN apt-get update && apt-get install -y vim less
RUN apt-get update && apt-get -y install lsb-release
RUN apt-get update && apt-get install -y task-cinnamon-desktop
RUN apt-get update && apt-get install -y task-gnome-desktop
RUN mkdir -p /usr/share/man/man1
RUN apt-get update && apt-get install -y apt-utils openjdk-11-jre
RUN apt-get update && apt-get install -y task-lxde-desktop
RUN apt-get update && apt-get install -y task-mate-desktop
RUN apt-get update && apt-get install -y task-kde-desktop
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
RUN mkdir -p $STARTUPDIR

View File

@@ -1,4 +1,4 @@
FROM fedora:33
FROM fedora:37
ENV STARTUPDIR=/dockerstartup

View File

@@ -0,0 +1,86 @@
FROM fedora:37
ENV KASMVNC_BUILD_OS fedora
ENV KASMVNC_BUILD_OS_CODENAME thirtyseven
ENV XORG_VER 1.20.14
RUN \
echo "**** install build deps ****" && \
dnf group install -y \
"C Development Tools and Libraries" \
"Development Tools" && \
dnf install -y \
autoconf \
automake \
bison \
byacc \
bzip2 \
cmake \
diffutils \
doxygen \
file \
flex \
fop \
gcc \
gcc-c++ \
git \
glibc-devel \
libdrm-devel \
libepoxy-devel \
libmd-devel \
libpciaccess-devel \
libtool \
libwebp-devel \
libX11-devel \
libXau-devel \
libxcb-devel \
libXcursor-devel \
libxcvt-devel \
libXdmcp-devel \
libXext-devel \
libXfont2-devel \
libxkbfile-devel \
libXrandr-devel \
libxshmfence-devel \
libXtst-devel \
mesa-libEGL-devel \
mesa-libgbm-devel \
mesa-libGL-devel \
meson \
mingw64-binutils \
mt-st \
nettle-devel \
openssl-devel \
patch \
pixman-devel \
wayland-devel \
wget \
which \
xcb-util-devel \
xcb-util-image-devel \
xcb-util-keysyms-devel \
xcb-util-renderutil-devel \
xcb-util-wm-devel \
xinit \
xkbcomp \
xkbcomp-devel \
xkeyboard-config \
xmlto \
xorg-x11-font-utils \
xorg-x11-proto-devel \
xorg-x11-server-common \
xorg-x11-server-devel \
xorg-x11-xtrans-devel \
xsltproc
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@@ -1,11 +1,11 @@
FROM fedora:33
FROM fedora:37
RUN dnf install -y fedora-packager fedora-review
RUN dnf install -y tree vim less
RUN dnf install -y redhat-lsb-core
RUN dnf install -y dnf-plugins-core
COPY centos/*.spec /tmp
COPY fedora/*.spec /tmp
RUN dnf builddep -y /tmp/*.spec
RUN useradd -m docker && echo "docker:docker" | chpasswd

View File

@@ -1,4 +1,4 @@
FROM fedora:33
FROM fedora:37
ENV DISPLAY=:1 \
VNC_PORT=8443 \
@@ -31,8 +31,7 @@ WORKDIR $HOME
RUN dnf install -y openssl xterm gettext wget
RUN dnf install -y nss_wrapper
RUN dnf install -y xorg-x11-xauth xorg-x11-xkb-utils \
xkeyboard-config xorg-x11-server-utils
RUN dnf install -y xorg-x11-xauth xkeyboard-config
# xorg-x11-server-Xorg
# RUN dnf install -y @xfce-desktop-environment
RUN dnf erase -y pm-utils xscreensaver*
@@ -47,7 +46,7 @@ COPY builder/startup/ $STARTUPDIR
### START CUSTOM STUFF ####
COPY ./builder/scripts/ /tmp/scripts/
COPY ./centos/kasmvncserver.spec /tmp
COPY ./fedora/kasmvncserver.spec /tmp
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp/

View File

@@ -1,38 +0,0 @@
FROM fedora:33
ENV KASMVNC_BUILD_OS fedora
ENV KASMVNC_BUILD_OS_CODENAME thirtythree
ENV XORG_VER 1.20.10
# RUN dnf install -y build-dep xorg-server libxfont-dev sudo
RUN dnf install -y gcc cmake git gnutls-devel vim wget
#tightvncserver
RUN dnf install -y libjpeg-turbo-devel libpng-devel libtiff-devel giflib-devel openssl-devel
#libavcodec-dev
RUN dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
RUN dnf -y install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
RUN dnf -y install ffmpeg-devel
RUN dnf install -y make
RUN dnf group install -y "Development Tools"
RUN dnf install -y xorg-x11-server-devel zlib-devel libjpeg-turbo-devel
RUN dnf install -y libxkbfile-devel libXfont2-devel xorg-x11-font-utils \
xorg-x11-xtrans-devel xorg-x11-xkb-utils-devel libXrandr-devel libXtst-devel \
libXcursor-devel
RUN dnf install -y mesa-dri-drivers
RUN dnf install -y bzip2 redhat-lsb-core
# 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 -xzf /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
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@@ -14,16 +14,14 @@ RUN apt-get update && \
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 gcc-11 g++-11
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 gcc-11 g++-11 curl
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-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 -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make -j$(nproc) && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo

View File

@@ -9,6 +9,7 @@ RUN zypper install -ny \
bdftopcf \
bigreqsproto-devel \
cmake \
curl \
ffmpeg-4-libavcodec-devel \
fonttosfnt \
font-util \
@@ -19,14 +20,17 @@ RUN zypper install -ny \
gzip \
lbzip2 \
libbz2-devel \
libgbm-devel \
libGLw-devel \
libgnutls-devel \
libjpeg8-devel \
libopenssl-devel \
libpng16-devel \
libpnglite0 \
png++-devel \
libtiff-devel \
libXfont2-devel \
libxkbcommon-x11-devel \
libxshmfence-devel \
make \
Mesa-dri \
Mesa-libglapi-devel \
@@ -41,12 +45,10 @@ RUN zypper install -ny \
xorg-x11-util-devel \
zlib-devel
# 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 -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -u 1000 docker && \
groupadd -g 1000 docker && \

View File

@@ -5,27 +5,31 @@ ENV KASMVNC_BUILD_OS_CODENAME 8
ENV XORG_VER 1.20.10
# Install from stock repos
RUN dnf install -y \
bzip2-devel \
ca-certificates \
cmake \
dnf-plugins-core \
gcc \
gcc-c++ \
git \
gnutls-devel \
libjpeg-turbo-devel \
libpng-devel \
libtiff-devel \
make \
mesa-dri-drivers \
openssl-devel \
openssl-devel \
patch \
tigervnc-server \
wget \
xorg-x11-font-utils \
zlib-devel
RUN \
dnf install -y 'dnf-command(config-manager)' && \
dnf config-manager --set-enabled ol8_codeready_builder && \
dnf install -y \
bzip2-devel \
ca-certificates \
cmake \
dnf-plugins-core \
gcc \
gcc-c++ \
git \
gnutls-devel \
libjpeg-turbo-devel \
libpng-devel \
libtiff-devel \
libxshmfence-devel \
make \
mesa-dri-drivers \
mesa-libgbm-devel \
openssl-devel \
patch \
tigervnc-server \
wget \
xorg-x11-font-utils \
zlib-devel
# Enable additional repos (epel, powertools, and fusion)
RUN dnf config-manager --set-enabled ol8_codeready_builder
@@ -46,12 +50,10 @@ RUN dnf install -y \
libXtst-devel \
libXcursor-devel
# 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 -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd

View File

@@ -13,7 +13,7 @@ RUN dnf install -y \
tree \
vim
COPY oracle/*.spec /tmp
COPY oracle/kasmvncserver.spec /tmp
RUN dnf builddep -y /tmp/*.spec
RUN useradd -m docker && echo "docker:docker" | chpasswd

View File

@@ -0,0 +1,25 @@
FROM oraclelinux:9
ENV STARTUPDIR=/dockerstartup
RUN dnf install -y \
less \
vim \
xterm
RUN dnf config-manager --set-enabled ol9_codeready_builder
RUN dnf install -y oracle-epel-release-el9
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/*.rpm /tmp
RUN dnf localinstall -y /tmp/*.rpm
RUN dnf install -y crypto-policies-scripts
RUN update-crypto-policies --set FIPS:SHA1
RUN mkdir -p $STARTUPDIR
COPY startup/vnc_startup_barebones.sh $STARTUPDIR
RUN useradd -m foo
USER foo:kasmvnc-cert
ENTRYPOINT "/$STARTUPDIR/vnc_startup_barebones.sh"

View File

@@ -0,0 +1,63 @@
FROM oraclelinux:9
ENV KASMVNC_BUILD_OS oracle
ENV KASMVNC_BUILD_OS_CODENAME 9
ENV XORG_VER 1.20.10
# Install from stock repos
RUN \
dnf config-manager --set-enabled ol9_codeready_builder && \
dnf config-manager --set-enabled ol9_distro_builder && \
dnf install -y \
bzip2-devel \
ca-certificates \
cmake \
dnf-plugins-core \
gcc \
gcc-c++ \
git \
gnutls-devel \
libjpeg-turbo-devel \
libpng-devel \
libtiff-devel \
libxshmfence-devel \
make \
mesa-dri-drivers \
mesa-libGL-devel \
mesa-libgbm-devel \
openssl-devel \
openssl-devel \
patch \
tigervnc-server \
wget \
xorg-x11-font-utils \
zlib-devel
# Enable additional repos (epel, powertools, and fusion)
RUN dnf install -y oracle-epel-release-el9
RUN dnf install -y --nogpgcheck https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-9.noarch.rpm
# Install from new repos
RUN dnf install -y \
giflib-devel \
lbzip2 \
libXfont2-devel \
libxkbfile-devel \
xorg-x11-server-devel \
xorg-x11-xtrans-devel \
libXrandr-devel \
libXtst-devel \
libXcursor-devel
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@@ -0,0 +1,23 @@
FROM oraclelinux:9
ENV KASMVNC_BUILD_OS oracle
ENV KASMVNC_BUILD_OS_CODENAME 9
RUN dnf config-manager --set-enabled ol9_codeready_builder
RUN dnf config-manager --set-enabled ol9_distro_builder
RUN dnf install -y \
gpg* \
less \
redhat-lsb-core \
rng-tools \
rpm* \
rpmlint \
rsync \
tree \
vim
COPY oracle/kasmvncserver9.spec /tmp
RUN useradd -m docker && echo "docker:docker" | chpasswd
USER docker

View File

@@ -1,21 +0,0 @@
FROM ubuntu:16.04
RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list
RUN apt-get update && \
apt-get -y install sudo
RUN apt-get -y build-dep xorg-server
RUN apt-get -y install cmake git libjpeg-dev libgnutls-dev vim wget tightvncserver
RUN apt-get -y install libjpeg-dev libpng-dev libtiff-dev libgif-dev
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 && make && make install
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
COPY --chown=docker:docker . /src/
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@@ -1,39 +0,0 @@
FROM ubuntu:18.04
ENV KASMVNC_BUILD_OS ubuntu
ENV KASMVNC_BUILD_OS_CODENAME bionic
ENV XORG_VER 1.20.10
RUN sed -i 's$# deb-src$deb-src$' /etc/apt/sources.list
RUN apt-get update && \
apt-get -y install sudo
RUN apt-get update && apt-get -y build-dep xorg-server libxfont-dev
RUN apt-get update && apt-get -y install cmake git libgnutls28-dev vim wget tightvncserver
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-dev
RUN apt-get update && apt-get install -y cmake nasm gcc
RUN git clone https://github.com/libjpeg-turbo/libjpeg-turbo.git
RUN export MAKEFLAGS=-j`nproc`; cd libjpeg-turbo && cmake -G"Unix Makefiles" && make deb
RUN export MAKEFLAGS=-j`nproc`; cd libjpeg-turbo && cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G"Unix Makefiles" && make && make install
# 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 -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
# Fix for older required libs
#RUN cd /tmp && wget http://launchpadlibrarian.net/347526424/libxfont1-dev_1.5.2-4ubuntu2_amd64.deb && \
# wget http://launchpadlibrarian.net/347526425/libxfont1_1.5.2-4ubuntu2_amd64.deb && \
# dpkg -i libxfont1_1.5.2-4ubuntu2_amd64.deb && \
# dpkg -i libxfont1-dev_1.5.2-4ubuntu2_amd64.deb
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo
COPY --chown=docker:docker . /src
USER docker
ENTRYPOINT ["/src/builder/build.sh"]

View File

@@ -1,23 +0,0 @@
FROM ubuntu:bionic
RUN apt-get update && \
apt-get -y install vim build-essential devscripts equivs
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/libjpeg-turbo*deb /tmp/
RUN apt-get install /tmp/libjpeg-turbo*deb
# Install build-deps for the package.
COPY ./debian/control /tmp
RUN apt-get update && echo YYY | mk-build-deps --install --remove /tmp/control
ENV LD_LIBRARY_PATH="/opt/libjpeg-turbo/lib64/:$LD_LIBRARY_PATH"
ARG L_UID
RUN if [ "$L_UID" -eq 0 ]; then \
useradd -m docker; \
else \
useradd -m docker -u $L_UID;\
fi
USER docker

View File

@@ -1,60 +0,0 @@
FROM ubuntu:bionic
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=/opt/libjpeg-turbo/lib64/:/usr/local/lib/ \
OMP_WAIT_POLICY=PASSIVE \
SHELL=/bin/bash \
SINGLE_APPLICATION=0 \
KASMVNC_BUILD_OS=ubuntu \
KASMVNC_BUILD_OS_CODENAME=bionic
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 apt-get update && apt-get -y install lsb-release
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc
RUN mkdir -p $STARTUPDIR
COPY builder/startup/ $STARTUPDIR
### START CUSTOM STUFF ####
COPY ./builder/scripts/ /tmp/scripts/
COPY ./debian/changelog /tmp
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/libjpeg-turbo_*.deb /tmp/
RUN apt-get install /tmp/libjpeg-turbo*deb
ARG BUILD_DEBIAN_REVISION
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*$BUILD_DEBIAN_REVISION*.deb /tmp/
RUN /tmp/scripts/install_kasmvncserver_package "$BUILD_DEBIAN_REVISION"
### END CUSTOM STUFF ###
RUN chown -R 1000:0 $HOME
USER 1000:ssl-cert
WORKDIR $HOME
ENTRYPOINT [ "/dockerstartup/vnc_startup.sh" ]

View File

@@ -10,15 +10,13 @@ RUN apt-get update && \
apt-get -y install sudo
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 cmake git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-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 -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
# Fix for older required libs
#RUN cd /tmp && wget http://launchpadlibrarian.net/347526424/libxfont1-dev_1.5.2-4ubuntu2_amd64.deb && \

View File

@@ -29,7 +29,7 @@ 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 update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext wget
RUN apt-get purge -y pm-utils xscreensaver*
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc

View File

@@ -2,9 +2,13 @@ FROM ubuntu:focal
ENV STARTUPDIR=/dockerstartup
COPY ./builder/scripts/ /tmp/scripts/
COPY ./debian/changelog /tmp
ARG KASMVNC_PACKAGE_DIR
COPY $KASMVNC_PACKAGE_DIR/kasmvncserver_*.deb /tmp/
RUN rm -f /tmp/kasmvncserver_*+*.deb; apt-get update && dpkg -i /tmp/*.deb; apt-get -yf install
RUN /tmp/scripts/install_kasmvncserver_package
RUN apt-get update && apt-get -y install xterm lsb-release
RUN mkdir -p $STARTUPDIR

View File

@@ -12,15 +12,13 @@ RUN apt-get update && \
RUN apt-get update && 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 vim wget
RUN apt-get update && apt-get -y install cmake git vim wget curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-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 -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo

View File

@@ -29,7 +29,7 @@ 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 update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext wget
RUN apt-get purge -y pm-utils xscreensaver*
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc

View File

@@ -12,15 +12,13 @@ RUN apt-get update && \
RUN apt-get update && 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 cmake git libgnutls28-dev vim wget tightvncserver curl
RUN apt-get update && apt-get -y install libpng-dev libtiff-dev libgif-dev libavcodec-dev libssl-dev libxrandr-dev libxcursor-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 -xzf /tmp/libwebp-*
RUN cd /tmp/libwebp-1.0.2 && \
./configure --enable-static --disable-shared && \
make && make install
ENV SCRIPTS_DIR=/tmp/scripts
COPY builder/scripts $SCRIPTS_DIR
RUN $SCRIPTS_DIR/build-webp
RUN $SCRIPTS_DIR/build-libjpeg-turbo
RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo

View File

@@ -29,7 +29,7 @@ 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 update && apt-get install -y supervisor xfce4 xfce4-terminal xterm libnss-wrapper gettext wget
RUN apt-get purge -y pm-utils xscreensaver*
RUN echo 'source $STARTUPDIR/generate_container_user' >> $HOME/.bashrc

View File

@@ -1,3 +1,5 @@
#!/bin/bash
default_os=${default_os:-ubuntu}
default_os_codename=${default_os_codename:-bionic}

View File

@@ -0,0 +1,49 @@
#!/bin/bash
usage() {
echo >&2 "Usage: $(basename "$0") [-s|--shell] [-p|--perf-test] [-h|--help] <distro> <distro_version>"
exit
}
process_options() {
local sorted_options=$(getopt -o psh --long perf-test --long shell --long help -- "$@")
eval set -- $sorted_options
while : ; do
case "$1" in
-p|--perf-test)
entrypoint_args='-interface 0.0.0.0 -selfBench :1'
entrypoint_executable="--entrypoint=/usr/bin/Xvnc"
shift
;;
-s|--shell)
entrypoint_executable="--entrypoint=bash"
shift
;;
-h|--help)
print_usage=1
;;
--)
shift
break
;;
esac
done
leftover_options=("$@")
}
declare -a leftover_options
if [ "$#" -eq 0 ]; then
usage
exit
fi
process_options "$@"
set -- "${leftover_options[@]}"
if [ -n "$print_usage" ]; then
usage
exit
fi

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -euo pipefail
build_and_install() {
export MAKEFLAGS=-j`nproc`
export CFLAGS="-fpic"
cmake -DCMAKE_INSTALL_PREFIX=/usr/local -G"Unix Makefiles"
make
make install
}
install_build_dependencies() {
install_packages cmake gcc
ensure_libjpeg_is_fast
}
ensure_libjpeg_is_fast() {
install_packages nasm
}
prepare_libjpeg_source() {
export JPEG_TURBO_RELEASE=$(curl -sX GET "https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]')
mkdir libjpeg-turbo
curl -Ls "https://github.com/libjpeg-turbo/libjpeg-turbo/archive/${JPEG_TURBO_RELEASE}.tar.gz" | \
tar xzvf - -C libjpeg-turbo/ --strip-components=1
cd libjpeg-turbo
}
source_dir=$(dirname "$0")
. "$source_dir/common.sh"
install_build_dependencies
prepare_libjpeg_source
build_and_install

23
builder/scripts/build-webp Executable file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
webp_tar_url=https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-1.2.4.tar.gz
prepare_source() {
cd /tmp
wget "$webp_tar_url"
tar -xzf /tmp/libwebp-*
rm /tmp/libwebp-*.tar.gz
cd /tmp/libwebp-*
}
build_and_install() {
export MAKEFLAGS=-j`nproc`
./configure --enable-static --disable-shared
make
make install
}
prepare_source
build_and_install

34
builder/scripts/common.sh Normal file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
detect_distro() {
if [ -f /etc/centos-release ]; then
DISTRO=centos
elif [ -f /etc/oracle-release ]; then
DISTRO=oracle
elif [ -f /etc/fedora-release ]; then
DISTRO=fedora
elif [ -f /usr/bin/zypper ]; then
DISTRO=opensuse
elif [ -f /etc/alpine-release ]; then
DISTRO=alpine
else
DISTRO=debian
fi
}
install_packages() {
local install_cmd=no-command-defined
case "$DISTRO" in
centos) install_cmd="yum install -y" ;;
oracle) install_cmd="dnf install -y" ;;
fedora) install_cmd="dnf install -y" ;;
opensuse) install_cmd="zypper install -y" ;;
alpine) install_cmd="apk add" ;;
*) install_cmd="apt-get update && apt-get install -y"
esac
eval "$install_cmd $*"
}
detect_distro

View File

@@ -3,6 +3,7 @@
set -e
cd "$(dirname "$0")/.."
. ./builder/process_test_options.sh
. ./builder/os_ver_cli.sh
. ./builder/common.sh
@@ -11,8 +12,11 @@ docker build --build-arg KASMVNC_PACKAGE_DIR="builder/build/${os_codename}" \
--build-arg BUILD_DEBIAN_REVISION="$build_debian_revision" \
-t "$tester_image" \
-f "builder/dockerfile.${os}_${os_codename}${build_tag}.deb.test" .
docker run -it -p "443:$VNC_PORT" --rm \
-e KASMVNC_VERBOSE_LOGGING=$KASMVNC_VERBOSE_LOGGING \
-e "VNC_USER=foo" -e "VNC_PW=foobar" \
-e "VNC_PORT=$VNC_PORT" \
"$tester_image"
$entrypoint_executable \
"$tester_image" \
$entrypoint_args

View File

@@ -3,6 +3,7 @@
set -e
cd "$(dirname "$0")/.."
. ./builder/process_test_options.sh
. ./builder/common.sh
os="${1:-debian}"
os_codename="${2:-buster}"
@@ -13,4 +14,6 @@ docker build --build-arg KASMVNC_PACKAGE_DIR="builder/build/${os_codename}" \
echo
docker run -it -p "443:$VNC_PORT" --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \
-e "VNC_PORT=$VNC_PORT" \
kasmvnctester_barebones_${os}:$os_codename
$entrypoint_executable \
kasmvnctester_barebones_${os}:$os_codename \
$entrypoint_args

View File

@@ -3,6 +3,7 @@
set -e
cd "$(dirname "$0")/.."
. ./builder/process_test_options.sh
. ./builder/os_ver_cli.sh
. ./builder/common.sh
@@ -16,4 +17,6 @@ docker run -it -p "443:$VNC_PORT" --rm \
-e KASMVNC_VERBOSE_LOGGING=$KASMVNC_VERBOSE_LOGGING \
-e "VNC_USER=foo" -e "VNC_PW=foobar" \
-e "VNC_PORT=$VNC_PORT" \
kasmvnctester_${os}:$os_codename
$entrypoint_executable \
kasmvnctester_${os}:$os_codename \
$entrypoint_args

View File

@@ -3,6 +3,7 @@
set -e
cd "$(dirname "$0")"
. ./process_test_options.sh
. ./common.sh
os="${1:-centos}"
os_codename="${2:-core}"
@@ -12,4 +13,6 @@ docker build --build-arg KASMVNC_PACKAGE_DIR="build/${os}_${os_codename}" \
-f dockerfile.${os}_${os_codename}.barebones.rpm.test .
docker run -it -p "443:$VNC_PORT" --rm -e "VNC_USER=foo" -e "VNC_PW=foobar" \
-e "VNC_PORT=$VNC_PORT" \
kasmvnctester_barebones_${os}:$os_codename
$entrypoint_executable \
kasmvnctester_barebones_${os}:$os_codename \
$entrypoint_args

View File

@@ -1,5 +1,5 @@
Name: kasmvncserver
Version: 1.0.0
Version: 1.1.0
Release: 1%{?dist}
Summary: VNC server accessible from a web browser
@@ -11,14 +11,14 @@ Requires: xorg-x11-xauth, xorg-x11-xkb-utils, xkeyboard-config, xorg-x11-server-
Conflicts: tigervnc-server, tigervnc-server-minimal
%description
KasmVNC provides remote web-based access to a Desktop or application.
While VNC is in the name, KasmVNC differs from other VNC variants such
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
specification which defines VNC, in order to support modern technologies
and increase security. KasmVNC is accessed by users from any modern
browser and does not support legacy VNC viewer applications. KasmVNC
uses a modern YAML based configuration at the server and user level,
allowing for ease of management. KasmVNC is maintained by Kasm
KasmVNC provides remote web-based access to a Desktop or application.
While VNC is in the name, KasmVNC differs from other VNC variants such
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
specification which defines VNC, in order to support modern technologies
and increase security. KasmVNC is accessed by users from any modern
browser and does not support legacy VNC viewer applications. KasmVNC
uses a modern YAML based configuration at the server and user level,
allowing for ease of management. KasmVNC is maintained by Kasm
Technologies Corp, www.kasmweb.com.
WARNING: this package requires EPEL.
@@ -52,7 +52,7 @@ cp $SRC_BIN/kasmxproxy $DESTDIR/usr/bin;
cp -r $SRC/lib/kasmvnc/ $DESTDIR/usr/lib/kasmvncserver
cd $DESTDIR/usr/bin && ln -s kasmvncpasswd vncpasswd;
cp -r $SRC/share/doc/kasmvnc*/* $DESTDIR/usr/share/doc/kasmvncserver/
rsync -r --exclude '.git*' --exclude po2js --exclude xgettext-html \
rsync -r --links --safe-links --exclude '.git*' --exclude po2js --exclude xgettext-html \
--exclude www/utils/ --exclude .eslintrc --exclude configure \
$SRC/share/kasmvnc $DESTDIR/usr/share
@@ -83,6 +83,8 @@ cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
%doc /usr/share/doc/kasmvncserver/README.md
%changelog
* Wed Apr 05 2023 KasmTech <info@kasmweb.com> - 1.1.0-1
- Upstream release
* Tue Nov 29 2022 KasmTech <info@kasmweb.com> - 1.0.0-1
- WebRTC UDP transit support with support of STUN servers
- Lossless compression using multi-threaded WASM QOI decoder client side

View File

@@ -66,6 +66,7 @@ namespace network {
void netResetFrameStatsCall();
uint8_t netServerFrameStatsReady();
void netUdpUpgrade(void *client, uint32_t ip);
void netClearClipboard();
enum USER_ACTION {
NONE,
@@ -73,7 +74,8 @@ namespace network {
WANT_FRAME_STATS_ALL,
WANT_FRAME_STATS_OWNER,
WANT_FRAME_STATS_SPECIFIC,
UDP_UPGRADE
UDP_UPGRADE,
CLEAR_CLIPBOARD,
};
uint8_t netRequestFrameStats(USER_ACTION what, const char *client);

View File

@@ -806,3 +806,16 @@ void GetAPIMessager::netUdpUpgrade(void *client, uint32_t ip) {
pthread_mutex_unlock(&userMutex);
}
void GetAPIMessager::netClearClipboard() {
action_data act;
act.action = CLEAR_CLIPBOARD;
// Send it in
if (pthread_mutex_lock(&userMutex))
return;
actionQueue.push_back(act);
pthread_mutex_unlock(&userMutex);
}

View File

@@ -545,6 +545,12 @@ static uint8_t serverFrameStatsReadyCb(void *messager)
return msgr->netServerFrameStatsReady();
}
static void clearClipboardCb(void *messager)
{
GetAPIMessager *msgr = (GetAPIMessager *) messager;
msgr->netClearClipboard();
}
#if OPENSSL_VERSION_NUMBER < 0x1010000f
static pthread_mutex_t *sslmutex;
@@ -693,6 +699,8 @@ WebsocketListener::WebsocketListener(const struct sockaddr *listenaddr,
settings.getClientFrameStatsNumCb = getClientFrameStatsNumCb;
settings.serverFrameStatsReadyCb = serverFrameStatsReadyCb;
settings.clearClipboardCb = clearClipboardCb;
openssl_threads();
pthread_t tid;

View File

@@ -1596,6 +1596,22 @@ static uint8_t ownerapi(ws_ctx_t *ws_ctx, const char *in, const char * const use
ws_send(ws_ctx, buf, strlen(buf));
weblog(200, wsthread_handler_id, 0, origip, ip, user, 1, origpath, strlen(buf));
ret = 1;
} else entry("/api/clear_clipboard") {
settings.clearClipboardCb(settings.messager);
write(wakeuppipe[1], "", 1);
sprintf(buf, "HTTP/1.1 200 OK\r\n"
"Server: KasmVNC/4.0\r\n"
"Connection: close\r\n"
"Content-type: text/plain\r\n"
"Content-length: 6\r\n"
"%s"
"\r\n"
"200 OK", extra_headers ? extra_headers : "");
ws_send(ws_ctx, buf, strlen(buf));
weblog(200, wsthread_handler_id, 0, origip, ip, user, 1, origpath, strlen(buf));
ret = 1;
}

View File

@@ -105,6 +105,8 @@ typedef struct {
void (*getUsersCb)(void *messager, const char **buf);
uint8_t (*getClientFrameStatsNumCb)(void *messager);
uint8_t (*serverFrameStatsReadyCb)(void *messager);
void (*clearClipboardCb)(void *messager);
} settings_t;
#ifdef __cplusplus

View File

@@ -1,4 +1,4 @@
include_directories(${CMAKE_SOURCE_DIR}/common ${JPEG_INCLUDE_DIR}
include_directories(${CMAKE_SOURCE_DIR}/common ${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR}
${CMAKE_SOURCE_DIR}/unix/kasmvncpasswd)
set(RFB_SOURCES
@@ -65,6 +65,7 @@ set(RFB_SOURCES
VNCServerST.cxx
ZRLEEncoder.cxx
ZRLEDecoder.cxx
Watermark.cxx
cpuid.cxx
encodings.cxx
util.cxx
@@ -79,7 +80,7 @@ if(WIN32)
set(RFB_SOURCES ${RFB_SOURCES} WinPasswdValidator.cxx)
endif(WIN32)
set(RFB_LIBRARIES ${JPEG_LIBRARIES} os rdr Xregion)
set(RFB_LIBRARIES ${JPEG_LIBRARIES} ${PNG_LIBRARIES} os rdr Xregion)
if(HAVE_PAM)
set(RFB_SOURCES ${RFB_SOURCES} UnixPasswordValidator.cxx

View File

@@ -285,6 +285,8 @@ void ConnParams::setEncodings(int nEncodings, const rdr::S32* encodings)
// QOI-specific overrides
if (supportsQOI)
useCopyRect = false;
if (Server::DLP_WatermarkImage[0])
useCopyRect = false;
}
void ConnParams::setLEDState(unsigned int state)

View File

@@ -34,6 +34,7 @@
#include <rfb/UpdateTracker.h>
#include <rfb/LogWriter.h>
#include <rfb/Exception.h>
#include <rfb/Watermark.h>
#include <rfb/RawEncoder.h>
#include <rfb/RREEncoder.h>
@@ -162,6 +163,7 @@ static void updateMaxVideoRes(uint16_t *x, uint16_t *y) {
EncodeManager::EncodeManager(SConnection* conn_, EncCache *encCache_) : conn(conn_),
dynamicQualityMin(-1), dynamicQualityOff(-1),
areaCur(0), videoDetected(false), videoTimer(this),
watermarkStats(0),
maxEncodingTime(0), framesSinceEncPrint(0),
encCache(encCache_)
{
@@ -299,6 +301,11 @@ void EncodeManager::logStats()
vlog.info(" Total: %s, %s", a, b);
iecPrefix(bytes, "B", a, sizeof(a));
vlog.info(" %s (1:%g ratio)", a, ratio);
if (watermarkData) {
siPrefix(watermarkStats, "B", a, sizeof(a));
vlog.info(" Watermark data sent: %s", a);
}
}
bool EncodeManager::supported(int encoding)
@@ -408,8 +415,14 @@ void EncodeManager::doUpdate(bool allowLossy, const Region& changed_,
nRects += copypassed.size();
nRects += computeNumRects(changed);
nRects += computeNumRects(cursorRegion);
if (watermarkData)
nRects++;
}
if (watermarkData)
packWatermark(changed);
conn->writer()->writeFramebufferUpdateStart(nRects);
writeCopyRects(copied, copyDelta);
@@ -427,6 +440,23 @@ void EncodeManager::doUpdate(bool allowLossy, const Region& changed_,
if (!videoDetected) // In case detection happened between the calls
writeRects(cursorRegion, renderedCursor);
if (watermarkData) {
beforeLength = conn->getOutStream(conn->cp.supportsUdp)->length();
const Rect rect(0, 0, pb->width(), pb->height());
TightEncoder *encoder = ((TightEncoder *) encoders[encoderTight]);
conn->writer()->startRect(rect, encoder->encoding);
encoder->writeWatermarkRect(watermarkData, watermarkDataLen,
watermarkInfo.r,
watermarkInfo.g,
watermarkInfo.b,
watermarkInfo.a);
conn->writer()->endRect();
watermarkStats += conn->getOutStream(conn->cp.supportsUdp)->length() - beforeLength;
}
updateQualities();
conn->writer()->writeFramebufferUpdateEnd();

View File

@@ -193,6 +193,7 @@ namespace rfb {
unsigned updates;
EncoderStats copyStats;
StatsVector stats;
unsigned long long watermarkStats;
int activeType;
int beforeLength;
size_t curMaxUpdateSize;

View File

@@ -239,3 +239,8 @@ void rfb::Region::debug_print(const char* prefix) const
xrgn->rects[i].y2-xrgn->rects[i].y1);
}
}
bool rfb::Region::contains(int x, int y) const
{
return XPointInRegion(xrgn, x, y);
}

View File

@@ -73,6 +73,8 @@ namespace rfb {
void debug_print(const char *prefix) const;
bool contains(int x, int y) const;
protected:
struct _XRegion* xrgn;

View File

@@ -86,6 +86,8 @@ namespace rfb {
virtual void handleClipboardAnnounceBinary(const unsigned __unused_attr num,
const char __unused_attr mimes[][32]) {}
virtual void clearLocalClipboards() {}
protected:
virtual ~SDesktop() {}
};

View File

@@ -185,6 +185,23 @@ rfb::BoolParameter rfb::Server::DLP_RegionAllowRelease
"Allow click releases inside the blacked-out region",
true);
rfb::IntParameter rfb::Server::DLP_WatermarkRepeatSpace
("DLP_WatermarkRepeatSpace",
"Number of pixels between repeats of the watermark",
0, 0, 4096);
rfb::StringParameter rfb::Server::DLP_WatermarkImage
("DLP_WatermarkImage",
"PNG file to use as a watermark",
"");
rfb::StringParameter rfb::Server::DLP_WatermarkLocation
("DLP_WatermarkLocation",
"Place the watermark at this position from the corner.",
"");
rfb::StringParameter rfb::Server::DLP_WatermarkTint
("DLP_WatermarkTint",
"Tint the greyscale watermark by this color.",
"255,255,255,255");
rfb::StringParameter rfb::Server::maxVideoResolution
("MaxVideoResolution",
"When in video mode, downscale the screen to max this size.",

View File

@@ -48,9 +48,13 @@ namespace rfb {
static IntParameter DLP_ClipAcceptMax;
static IntParameter DLP_ClipDelay;
static IntParameter DLP_KeyRateLimit;
static IntParameter DLP_WatermarkRepeatSpace;
static StringParameter DLP_ClipLog;
static StringParameter DLP_Region;
static StringParameter DLP_Clip_Types;
static StringParameter DLP_WatermarkImage;
static StringParameter DLP_WatermarkLocation;
static StringParameter DLP_WatermarkTint;
static BoolParameter DLP_RegionAllowClick;
static BoolParameter DLP_RegionAllowRelease;
static IntParameter jpegVideoQuality;

View File

@@ -25,7 +25,8 @@ namespace rfb {
const unsigned int tightPng = 0x0a;
const unsigned int tightWebp = 0x0b;
const unsigned int tightQoi = 0x0c;
const unsigned int tightMaxSubencoding = 0x0c;
const unsigned int tightIT = 0x0d;
const unsigned int tightMaxSubencoding = 0x0d;
// Filters to improve compression efficiency
const unsigned int tightFilterCopy = 0x00;

View File

@@ -277,6 +277,28 @@ void TightEncoder::resetZlib()
zlibNeedsReset = true;
}
void TightEncoder::writeWatermarkRect(const rdr::U8 *data, const unsigned len,
const rdr::U8 r,
const rdr::U8 g,
const rdr::U8 b,
const rdr::U8 a)
{
rdr::OutStream* os;
os = conn->getOutStream(conn->cp.supportsUdp);
os->writeU8(tightIT << 4);
writeCompact(os, len + 4);
os->writeU8(r);
os->writeU8(g);
os->writeU8(b);
os->writeU8(a);
os->writeBytes(data, len);
}
//
// Including BPP-dependent implementation of the encoder.
//

View File

@@ -39,6 +39,11 @@ namespace rfb {
virtual void writeSolidRect(int width, int height,
const PixelFormat& pf,
const rdr::U8* colour);
void writeWatermarkRect(const rdr::U8 *data, const unsigned len,
const rdr::U8 r,
const rdr::U8 g,
const rdr::U8 b,
const rdr::U8 a);
void resetZlib();
protected:

View File

@@ -64,7 +64,7 @@ VNCSConnectionST::VNCSConnectionST(VNCServerST* server_, network::Socket *s,
needsPermCheck(false), pointerEventTime(0),
clientHasCursor(false),
accessRights(AccessDefault), startTime(time(0)), frameTracking(false),
udpFramesSinceFull(0)
udpFramesSinceFull(0), complainedAboutNoViewRights(false)
{
setStreams(&sock->inStream(), &sock->outStream());
peerEndpoint.buf = sock->getPeerEndpoint();
@@ -1308,8 +1308,14 @@ void VNCSConnectionST::writeFramebufferUpdate()
}
}
if (!(accessRights & AccessView))
if (!(accessRights & AccessView)) {
if (!complainedAboutNoViewRights) {
complainedAboutNoViewRights = true;
vlog.error("User %s has no read permissions. If this is not intended, grant them permissions with kasmvncpasswd or via the API",
user);
}
return;
}
// Updates often consists of many small writes, and in continuous
// mode, we will also have small fence messages around the update. We
@@ -1777,6 +1783,9 @@ void VNCSConnectionST::udpDowngrade(const bool byServer)
cp.useCopyRect = true;
encodeManager.resetZlib();
if (Server::DLP_WatermarkImage[0])
cp.useCopyRect = false;
vlog.info("Client %s downgrading from udp by %s", sock->getPeerAddress(),
byServer ? "the server" : "its own request");
}

View File

@@ -324,6 +324,7 @@ namespace rfb {
bool frameTracking;
uint32_t udpFramesSinceFull;
bool complainedAboutNoViewRights;
};
}
#endif

View File

@@ -62,6 +62,7 @@
#include <rfb/ServerCore.h>
#include <rfb/VNCServerST.h>
#include <rfb/VNCSConnectionST.h>
#include <rfb/Watermark.h>
#include <rfb/util.h>
#include <rfb/ledStates.h>
@@ -832,9 +833,8 @@ static void upgradeClientToUdp(const network::GetAPIMessager::action_data &act,
}
}
static void checkAPIMessages(network::GetAPIMessager *apimessager,
rdr::U8 &trackingFrameStats, char trackingClient[],
std::list<VNCSConnectionST*> &clients)
void VNCServerST::checkAPIMessages(network::GetAPIMessager *apimessager,
rdr::U8 &trackingFrameStats, char trackingClient[])
{
if (pthread_mutex_lock(&apimessager->userMutex))
return;
@@ -866,6 +866,15 @@ static void checkAPIMessages(network::GetAPIMessager *apimessager,
case network::GetAPIMessager::UDP_UPGRADE:
upgradeClientToUdp(act, clients);
break;
case network::GetAPIMessager::CLEAR_CLIPBOARD:
clearBinaryClipboardData();
clipboardClient = NULL;
desktop->handleClipboardAnnounceBinary(0, NULL);
sendBinaryClipboardData("text/plain", NULL, 0);
desktop->clearLocalClipboards();
break;
}
}
@@ -1031,7 +1040,7 @@ void VNCServerST::writeUpdate()
shottime = msSince(&shotstart);
trackingFrameStats = 0;
checkAPIMessages(apimessager, trackingFrameStats, trackingClient, clients);
checkAPIMessages(apimessager, trackingFrameStats, trackingClient);
}
const rdr::U8 origtrackingFrameStats = trackingFrameStats;
@@ -1040,6 +1049,9 @@ void VNCServerST::writeUpdate()
memset(&jpegstats, 0, sizeof(EncodeManager::codecstats_t));
memset(&webpstats, 0, sizeof(EncodeManager::codecstats_t));
if (watermarkData)
updateWatermark();
for (ci = clients.begin(); ci != clients.end(); ci = ci_next) {
ci_next = ci; ci_next++;

View File

@@ -256,6 +256,8 @@ namespace rfb {
bool getComparerState();
void updateWatermark();
QueryConnectionHandler* queryConnectionHandler;
KeyRemapper* keyRemapper;
@@ -284,6 +286,9 @@ namespace rfb {
void translateDLPRegion(rdr::U16 &x1, rdr::U16 &y1, rdr::U16 &x2, rdr::U16 &y2) const;
rdr::U32 clipboardId;
void checkAPIMessages(network::GetAPIMessager *apimessager,
rdr::U8 &trackingFrameStats, char trackingClient[]);
};
};

248
common/rfb/Watermark.cxx Normal file
View File

@@ -0,0 +1,248 @@
/* Copyright (C) 2023 Kasm
*
* This 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 software 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 software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#include <png.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <zlib.h>
#include <rfb/LogWriter.h>
#include <rfb/ServerCore.h>
#include <rfb/VNCServerST.h>
#include "Watermark.h"
using namespace rfb;
static LogWriter vlog("watermark");
watermarkInfo_t watermarkInfo;
uint8_t *watermarkData, *watermarkUnpacked, *watermarkTmp;
uint32_t watermarkDataLen;
static uint16_t rw, rh;
#define MAXW 4096
#define MAXH 4096
static bool loadimage(const char path[]) {
FILE *f = fopen(path, "r");
if (!f) {
vlog.error("Can't open %s", path);
return false;
}
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING,NULL,NULL,NULL);
if (!png_ptr) return false;
png_infop info = png_create_info_struct(png_ptr);
if (!info) return false;
if (setjmp(png_jmpbuf(png_ptr))) return false;
png_init_io(png_ptr, f);
png_read_png(png_ptr, info,
PNG_TRANSFORM_PACKING |
PNG_TRANSFORM_STRIP_16 |
PNG_TRANSFORM_STRIP_ALPHA |
PNG_TRANSFORM_EXPAND, NULL);
uint8_t **rows = png_get_rows(png_ptr, info);
const unsigned imgw = png_get_image_width(png_ptr, info);
const unsigned imgh = png_get_image_height(png_ptr, info);
watermarkInfo.w = imgw;
watermarkInfo.h = imgh;
watermarkInfo.src = (uint8_t *) calloc(imgw, imgh);
unsigned x, y;
for (y = 0; y < imgh; y++) {
for (x = 0; x < imgw; x++) {
const uint8_t r = rows[y][x * 3 + 0];
const uint8_t g = rows[y][x * 3 + 1];
const uint8_t b = rows[y][x * 3 + 2];
const uint8_t grey = r * .2126f +
g * .7152f +
b * .0722f;
const uint8_t out = (grey + 8) >> 4;
watermarkInfo.src[y * imgw + x] = out < 16 ? out : 15;
}
}
fclose(f);
png_destroy_info_struct(png_ptr, &info);
png_destroy_read_struct(&png_ptr, NULL, NULL);
return true;
}
bool watermarkInit() {
memset(&watermarkInfo, 0, sizeof(watermarkInfo_t));
watermarkData = watermarkUnpacked = watermarkTmp = NULL;
rw = rh = 0;
if (!Server::DLP_WatermarkImage[0])
return true;
if (!loadimage(Server::DLP_WatermarkImage))
return false;
if (Server::DLP_WatermarkRepeatSpace && Server::DLP_WatermarkLocation[0]) {
vlog.error("Repeat and location can't be used together");
return false;
}
if (sscanf(Server::DLP_WatermarkTint, "%hhu,%hhu,%hhu,%hhu",
&watermarkInfo.r,
&watermarkInfo.g,
&watermarkInfo.b,
&watermarkInfo.a) != 4) {
vlog.error("Invalid tint");
return false;
}
watermarkInfo.repeat = Server::DLP_WatermarkRepeatSpace;
if (Server::DLP_WatermarkLocation[0]) {
if (sscanf(Server::DLP_WatermarkLocation, "%hd,%hd",
&watermarkInfo.x,
&watermarkInfo.y) != 2) {
vlog.error("Invalid location");
return false;
}
}
watermarkUnpacked = (uint8_t *) calloc(MAXW, MAXH);
watermarkTmp = (uint8_t *) calloc(MAXW, MAXH / 2);
watermarkData = (uint8_t *) calloc(MAXW, MAXH / 2);
return true;
}
// update the screen-size rendered watermark whenever the screen is resized
void VNCServerST::updateWatermark() {
if (rw == pb->width() &&
rh == pb->height())
return;
rw = pb->width();
rh = pb->height();
memset(watermarkUnpacked, 0, rw * rh);
uint16_t x, y, srcy;
if (watermarkInfo.repeat) {
for (y = 0, srcy = 0; y < rh; y++) {
for (x = 0; x < rw;) {
if (x + watermarkInfo.w < rw)
memcpy(&watermarkUnpacked[y * rw + x],
&watermarkInfo.src[srcy * watermarkInfo.w],
watermarkInfo.w);
else
memcpy(&watermarkUnpacked[y * rw + x],
&watermarkInfo.src[srcy * watermarkInfo.w],
rw - x);
x += watermarkInfo.w + watermarkInfo.repeat;
}
srcy++;
if (srcy == watermarkInfo.h) {
srcy = 0;
y += watermarkInfo.repeat;
}
}
} else {
int16_t sx, sy;
if (!watermarkInfo.x)
sx = (rw - watermarkInfo.w) / 2;
else if (watermarkInfo.x > 0)
sx = watermarkInfo.x;
else
sx = rw - watermarkInfo.w + watermarkInfo.x;
if (sx < 0)
sx = 0;
if (!watermarkInfo.y)
sy = (rh - watermarkInfo.h) / 2;
else if (watermarkInfo.y > 0)
sy = watermarkInfo.y;
else
sy = rh - watermarkInfo.h + watermarkInfo.y;
if (sy < 0)
sy = 0;
for (y = 0; y < watermarkInfo.h; y++) {
if (sx + watermarkInfo.w < rw)
memcpy(&watermarkUnpacked[(sy + y) * rw + sx],
&watermarkInfo.src[y * watermarkInfo.w],
watermarkInfo.w);
else
memcpy(&watermarkUnpacked[(sy + y) * rw + sx],
&watermarkInfo.src[y * watermarkInfo.w],
rw - sx);
}
}
}
void packWatermark(const Region &changed) {
// Take the expanded 4-bit data, filter it by the changed rects, pack
// to shared bytes, and compress with zlib
uint16_t x, y;
uint8_t pix[2], cur = 0;
uint8_t *dst = watermarkTmp;
const Rect &bounding = changed.get_bounding_rect();
for (y = 0; y < rh; y++) {
// Is the entire line outside the changed area?
if (bounding.tl.y > y || bounding.br.y < y) {
for (x = 0; x < rw; x++) {
pix[cur] = 0;
if (cur || (y == rh - 1 && x == rw - 1))
*dst++ = pix[0] | (pix[1] << 4);
cur ^= 1;
}
} else {
for (x = 0; x < rw; x++) {
pix[cur] = 0;
if (bounding.contains(Point(x, y)) && changed.contains(x, y))
pix[cur] = watermarkUnpacked[y * rw + x];
if (cur || (y == rh - 1 && x == rw - 1))
*dst++ = pix[0] | (pix[1] << 4);
cur ^= 1;
}
}
}
uLong destLen = MAXW * MAXH / 2;
if (compress2(watermarkData, &destLen, watermarkTmp, rw * rh / 2 + 1, 1) != Z_OK)
vlog.error("Zlib compression error");
watermarkDataLen = destLen;
}

43
common/rfb/Watermark.h Normal file
View File

@@ -0,0 +1,43 @@
/* Copyright (C) 2023 Kasm
*
* This 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 software 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 software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifndef WATERMARK_H
#define WATERMARK_H
#include <stdint.h>
#include <rfb/Region.h>
struct watermarkInfo_t {
uint8_t *src;
uint16_t w, h;
int16_t x, y;
uint16_t repeat;
uint8_t r, g, b, a;
};
extern watermarkInfo_t watermarkInfo;
bool watermarkInit();
void packWatermark(const rfb::Region &changed); // filter and pack the watermark for sending
extern uint8_t *watermarkData;
extern uint32_t watermarkDataLen;
#endif

View File

@@ -22,8 +22,8 @@ install: unpack_tarball
cp $(SRC_BIN)/kasmxproxy $(DESTDIR)/usr/bin/
cp -r $(SRC)/lib/kasmvnc/ $(DESTDIR)/usr/lib/kasmvncserver
cp -r $(SRC)/share/doc/kasmvnc*/* $(DESTDIR)/usr/share/doc/kasmvncserver/
rsync -r --exclude '.git*' --exclude po2js --exclude xgettext-html \
--exclude www/utils/ --exclude .eslintrc \
rsync -r --links --safe-links --exclude '.git*' --exclude po2js \
--exclude xgettext-html --exclude www/utils/ --exclude .eslintrc \
$(SRC)/share/kasmvnc $(DESTDIR)/usr/share
sed -e 's/^\([^#]\)/# \1/' $(SRC)/share/kasmvnc/kasmvnc_defaults.yaml > \
$(DESTDIR)/etc/kasmvnc/kasmvnc.yaml

6
debian/changelog vendored
View File

@@ -1,3 +1,9 @@
kasmvnc (1.1.0-1) unstable; urgency=medium
* New upstream release.
-- Kasm Technologies LLC <info@kasmweb.com> Tue, 04 Apr 2023 13:52:14 +0000
kasmvnc (1.0.0-1) unstable; urgency=medium
* WebRTC UDP transit support with support of STUN servers

22
debian/control vendored
View File

@@ -3,7 +3,7 @@ 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, libsm6, libxext-dev, libxrandr-dev, libxtst-dev, libxcursor-dev, libunwind8
libtiff-dev, libgif-dev, libavcodec-dev, libssl-dev, libgl1, libxfont2, libsm6, libxext-dev, libxrandr-dev, libxtst-dev, libxcursor-dev, libunwind8, libgbm-dev
Standards-Version: 4.1.3
Homepage: https://github.com/kasmtech/KasmVNC
#Vcs-Browser: https://salsa.debian.org/debian/kasmvnc
@@ -14,14 +14,14 @@ Architecture: amd64 arm64
Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, ssl-cert, xauth,
x11-xkb-utils, xkb-data, procps, libswitch-perl, libyaml-tiny-perl,
libhash-merge-simple-perl, libscalar-list-utils-perl, liblist-moreutils-perl,
libtry-tiny-perl
libtry-tiny-perl, libgbm1
Provides: vnc-server
Description: KasmVNC provides remote web-based access to a Desktop or application.
While VNC is in the name, KasmVNC differs from other VNC variants such
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
specification which defines VNC, in order to support modern technologies
and increase security. KasmVNC is accessed by users from any modern
browser and does not support legacy VNC viewer applications. KasmVNC
uses a modern YAML based configuration at the server and user level,
allowing for ease of management. KasmVNC is maintained by Kasm
Technologies Corp, www.kasmweb.com.
Description: KasmVNC provides remote web-based access to a Desktop or application.
While VNC is in the name, KasmVNC differs from other VNC variants such
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
specification which defines VNC, in order to support modern technologies
and increase security. KasmVNC is accessed by users from any modern
browser and does not support legacy VNC viewer applications. KasmVNC
uses a modern YAML based configuration at the server and user level,
allowing for ease of management. KasmVNC is maintained by Kasm
Technologies Corp, www.kasmweb.com.

126
fedora/kasmvncserver.spec Normal file
View File

@@ -0,0 +1,126 @@
Name: kasmvncserver
Version: 1.1.0
Release: 1%{?dist}
Summary: VNC server accessible from a web browser
License: GPLv2+
URL: https://github.com/kasmtech/KasmVNC
BuildRequires: rsync
Requires: xorg-x11-xauth, xkeyboard-config, xkbcomp, openssl, perl, perl-Switch, perl-YAML-Tiny, perl-Hash-Merge-Simple, perl-Scalar-List-Utils, perl-List-MoreUtils, perl-Try-Tiny, mesa-libgbm, libxshmfence
Conflicts: tigervnc-server, tigervnc-server-minimal
%description
KasmVNC provides remote web-based access to a Desktop or application.
While VNC is in the name, KasmVNC differs from other VNC variants such
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
specification which defines VNC, in order to support modern technologies
and increase security. KasmVNC is accessed by users from any modern
browser and does not support legacy VNC viewer applications. KasmVNC
uses a modern YAML based configuration at the server and user level,
allowing for ease of management. KasmVNC is maintained by Kasm
Technologies Corp, www.kasmweb.com.
WARNING: this package requires EPEL.
%prep
%install
rm -rf $RPM_BUILD_ROOT
TARGET_OS=$(lsb_release -is | tr '[:upper:]' '[:lower:]')
TARGET_OS_CODENAME=$(lsb_release -cs | tr '[:upper:]' '[:lower:]')
TARBALL=$RPM_SOURCE_DIR/kasmvnc.${TARGET_OS}_${TARGET_OS_CODENAME}.tar.gz
TAR_DATA=$(mktemp -d)
tar -xzf "$TARBALL" -C "$TAR_DATA"
SRC=$TAR_DATA/usr/local
SRC_BIN=$SRC/bin
DESTDIR=$RPM_BUILD_ROOT
DST_MAN=$DESTDIR/usr/share/man/man1
mkdir -p $DESTDIR/usr/bin $DESTDIR/usr/share/man/man1 \
$DESTDIR/usr/share/doc/kasmvncserver $DESTDIR/usr/lib \
$DESTDIR/usr/share/perl5 $DESTDIR/etc/kasmvnc
cp $SRC_BIN/Xvnc $DESTDIR/usr/bin;
cp $SRC_BIN/vncserver $DESTDIR/usr/bin;
cp -a $SRC_BIN/KasmVNC $DESTDIR/usr/share/perl5/
cp $SRC_BIN/vncconfig $DESTDIR/usr/bin;
cp $SRC_BIN/kasmvncpasswd $DESTDIR/usr/bin;
cp $SRC_BIN/kasmxproxy $DESTDIR/usr/bin;
cp -r $SRC/lib/kasmvnc/ $DESTDIR/usr/lib/kasmvncserver
cd $DESTDIR/usr/bin && ln -s kasmvncpasswd vncpasswd;
cp -r $SRC/share/doc/kasmvnc*/* $DESTDIR/usr/share/doc/kasmvncserver/
rsync -r --links --safe-links --exclude '.git*' --exclude po2js --exclude xgettext-html \
--exclude www/utils/ --exclude .eslintrc --exclude configure \
$SRC/share/kasmvnc $DESTDIR/usr/share
sed -i -e 's!pem_certificate: .\+$!pem_certificate: /etc/pki/tls/private/kasmvnc.pem!' \
$DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
sed -i -e 's!pem_key: .\+$!pem_key: /etc/pki/tls/private/kasmvnc.pem!' \
$DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
sed -e 's/^\([^#]\)/# \1/' $DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml > \
$DESTDIR/etc/kasmvnc/kasmvnc.yaml
cp $SRC/man/man1/Xvnc.1 $DESTDIR/usr/share/man/man1/;
cp $SRC/share/man/man1/vncserver.1 $DST_MAN;
cp $SRC/share/man/man1/vncconfig.1 $DST_MAN;
cp $SRC/share/man/man1/vncpasswd.1 $DST_MAN;
cp $SRC/share/man/man1/kasmxproxy.1 $DST_MAN;
cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
%files
%config(noreplace) /etc/kasmvnc
/usr/bin/*
/usr/lib/kasmvncserver
/usr/share/man/man1/*
/usr/share/perl5/KasmVNC
/usr/share/kasmvnc
%license /usr/share/doc/kasmvncserver/LICENSE.TXT
%doc /usr/share/doc/kasmvncserver/README.md
%changelog
* Wed Apr 05 2023 KasmTech <info@kasmweb.com> - 1.1.0-1
- Upstream release
* Tue Nov 29 2022 KasmTech <info@kasmweb.com> - 1.0.0-1
- WebRTC UDP transit support with support of STUN servers
- Lossless compression using multi-threaded WASM QOI decoder client side
- New yaml based configuration
- Significantly improved FPS through both client-side and server-side improvements.
- Support for the admin to define arbitrary http response headers for the built in web server
- Support for additional mouse buttons
- Refinement of vncserver checks and user prompts
- Added send_full_frame to developer API, forces full frame to be sent to all connected users that have at least read permission.
* Tue Mar 22 2022 KasmTech <info@kasmweb.com> - 0.9.3~beta-1
* Fri Feb 12 2021 KasmTech <info@kasmweb.com> - 0.9.1~beta-1
- Initial release of the rpm package.
%post
kasmvnc_group="kasmvnc-cert"
create_kasmvnc_group() {
if ! getent group "$kasmvnc_group" >/dev/null; then
groupadd --system "$kasmvnc_group"
fi
}
make_self_signed_certificate() {
local cert_file=/etc/pki/tls/private/kasmvnc.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 640 "$cert_file"
}
create_kasmvnc_group
make_self_signed_certificate
%postun
rm -f /etc/pki/tls/private/kasmvnc.pem

Submodule kasmweb updated: f223cfcafe...3873a59941

View File

@@ -1,5 +1,5 @@
Name: kasmvncserver
Version: 1.0.0
Version: 1.1.0
Release: leap15
Summary: VNC server accessible from a web browser
@@ -7,18 +7,18 @@ License: GPLv2+
URL: https://github.com/kasmtech/KasmVNC
BuildRequires: rsync
Requires: xauth, hostname, libxkbcommon-x11-0, xkeyboard-config, x11-tools, openssl, perl, libpixman-1-0, libjpeg8, libgomp1, libXfont2-2, libXdmcp6, libglvnd, xkbcomp, perl-Switch, perl-YAML-Tiny, perl-Hash-Merge-Simple, perl-Scalar-List-Utils, perl-List-MoreUtils, perl-Try-Tiny
Requires: xauth, hostname, libxkbcommon-x11-0, xkeyboard-config, x11-tools, openssl, perl, libpixman-1-0, libjpeg8, libgomp1, libXfont2-2, libXdmcp6, libglvnd, xkbcomp, perl-Switch, perl-YAML-Tiny, perl-Hash-Merge-Simple, perl-Scalar-List-Utils, perl-List-MoreUtils, perl-Try-Tiny, libgbm1, libxshmfence1
Conflicts: tigervnc, tigervnc-x11vnc
%description
KasmVNC provides remote web-based access to a Desktop or application.
While VNC is in the name, KasmVNC differs from other VNC variants such
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
specification which defines VNC, in order to support modern technologies
and increase security. KasmVNC is accessed by users from any modern
browser and does not support legacy VNC viewer applications. KasmVNC
uses a modern YAML based configuration at the server and user level,
allowing for ease of management. KasmVNC is maintained by Kasm
KasmVNC provides remote web-based access to a Desktop or application.
While VNC is in the name, KasmVNC differs from other VNC variants such
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
specification which defines VNC, in order to support modern technologies
and increase security. KasmVNC is accessed by users from any modern
browser and does not support legacy VNC viewer applications. KasmVNC
uses a modern YAML based configuration at the server and user level,
allowing for ease of management. KasmVNC is maintained by Kasm
Technologies Corp, www.kasmweb.com.
%prep
@@ -50,7 +50,7 @@ cp $SRC_BIN/kasmxproxy $DESTDIR/usr/bin;
cp -r $SRC/lib/kasmvnc/ $DESTDIR/usr/lib/kasmvncserver
cd $DESTDIR/usr/bin && ln -s kasmvncpasswd vncpasswd;
cp -r $SRC/share/doc/kasmvnc*/* $DESTDIR/usr/share/doc/kasmvncserver/
rsync -r --exclude '.git*' --exclude po2js --exclude xgettext-html \
rsync -r --links --safe-links --exclude '.git*' --exclude po2js --exclude xgettext-html \
--exclude www/utils/ --exclude .eslintrc --exclude configure \
$SRC/share/kasmvnc $DESTDIR/usr/share
@@ -81,6 +81,8 @@ cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
%doc /usr/share/doc/kasmvncserver/README.md
%changelog
* Wed Apr 05 2023 KasmTech <info@kasmweb.com> - 1.1.0-leap15
- Upstream release
* Tue Nov 29 2022 KasmTech <info@kasmweb.com> - 1.0.0-leap15
- WebRTC UDP transit support with support of STUN servers
- Lossless compression using multi-threaded WASM QOI decoder client side

View File

@@ -1,5 +1,5 @@
Name: kasmvncserver
Version: 1.0.0
Version: 1.1.0
Release: 1%{?dist}
Summary: VNC server accessible from a web browser
@@ -7,18 +7,18 @@ License: GPLv2+
URL: https://github.com/kasmtech/KasmVNC
BuildRequires: rsync
Requires: xorg-x11-xauth, xorg-x11-xkb-utils, xkeyboard-config, xorg-x11-server-utils, openssl, perl, perl-Switch, perl-YAML-Tiny, perl-Hash-Merge-Simple, perl-Scalar-List-Utils, perl-List-MoreUtils, perl-Try-Tiny, hostname
Requires: xorg-x11-xauth, xorg-x11-xkb-utils, xkeyboard-config, xorg-x11-server-utils, openssl, perl, perl-Switch, perl-YAML-Tiny, perl-Hash-Merge-Simple, perl-Scalar-List-Utils, perl-List-MoreUtils, perl-Try-Tiny, hostname, mesa-libgbm, libxshmfence
Conflicts: tigervnc-server, tigervnc-server-minimal
%description
KasmVNC provides remote web-based access to a Desktop or application.
While VNC is in the name, KasmVNC differs from other VNC variants such
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
specification which defines VNC, in order to support modern technologies
and increase security. KasmVNC is accessed by users from any modern
browser and does not support legacy VNC viewer applications. KasmVNC
uses a modern YAML based configuration at the server and user level,
allowing for ease of management. KasmVNC is maintained by Kasm
KasmVNC provides remote web-based access to a Desktop or application.
While VNC is in the name, KasmVNC differs from other VNC variants such
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
specification which defines VNC, in order to support modern technologies
and increase security. KasmVNC is accessed by users from any modern
browser and does not support legacy VNC viewer applications. KasmVNC
uses a modern YAML based configuration at the server and user level,
allowing for ease of management. KasmVNC is maintained by Kasm
Technologies Corp, www.kasmweb.com.
WARNING: this package requires EPEL and CodeReady builder.
@@ -51,7 +51,7 @@ cp $SRC_BIN/kasmxproxy $DESTDIR/usr/bin;
cp -r $SRC/lib/kasmvnc/ $DESTDIR/usr/lib/kasmvncserver
cd $DESTDIR/usr/bin && ln -s kasmvncpasswd vncpasswd;
cp -r $SRC/share/doc/kasmvnc*/* $DESTDIR/usr/share/doc/kasmvncserver/
rsync -r --exclude '.git*' --exclude po2js --exclude xgettext-html \
rsync -r --links --safe-links --exclude '.git*' --exclude po2js --exclude xgettext-html \
--exclude www/utils/ --exclude .eslintrc --exclude configure \
$SRC/share/kasmvnc $DESTDIR/usr/share
@@ -82,6 +82,8 @@ cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
%doc /usr/share/doc/kasmvncserver/README.md
%changelog
* Wed Apr 05 2023 KasmTech <info@kasmweb.com> - 1.1.0-1
- Upstream release
* Tue Nov 29 2022 KasmTech <info@kasmweb.com> - 1.0.0-1
- WebRTC UDP transit support with support of STUN servers
- Lossless compression using multi-threaded WASM QOI decoder client side

125
oracle/kasmvncserver9.spec Normal file
View File

@@ -0,0 +1,125 @@
Name: kasmvncserver
Version: 1.1.0
Release: 1%{?dist}
Summary: VNC server accessible from a web browser
License: GPLv2+
URL: https://github.com/kasmtech/KasmVNC
BuildRequires: rsync
Requires: xorg-x11-xauth, xkeyboard-config, xorg-x11-server-utils, xkbcomp, openssl, perl, perl-Switch, perl-YAML-Tiny, perl-Hash-Merge-Simple, perl-Scalar-List-Utils, perl-List-MoreUtils, perl-Try-Tiny, hostname, mesa-libgbm, libxshmfence
Conflicts: tigervnc-server, tigervnc-server-minimal
%description
KasmVNC provides remote web-based access to a Desktop or application.
While VNC is in the name, KasmVNC differs from other VNC variants such
as TigerVNC, RealVNC, and TurboVNC. KasmVNC has broken from the RFB
specification which defines VNC, in order to support modern technologies
and increase security. KasmVNC is accessed by users from any modern
browser and does not support legacy VNC viewer applications. KasmVNC
uses a modern YAML based configuration at the server and user level,
allowing for ease of management. KasmVNC is maintained by Kasm
Technologies Corp, www.kasmweb.com.
WARNING: this package requires EPEL and CodeReady builder.
%prep
%install
rm -rf $RPM_BUILD_ROOT
TARGET_OS=$KASMVNC_BUILD_OS
TARGET_OS_CODENAME=$KASMVNC_BUILD_OS_CODENAME
TARBALL=$RPM_SOURCE_DIR/kasmvnc.${TARGET_OS}_${TARGET_OS_CODENAME}.tar.gz
TAR_DATA=$(mktemp -d)
tar -xzf "$TARBALL" -C "$TAR_DATA"
SRC=$TAR_DATA/usr/local
SRC_BIN=$SRC/bin
DESTDIR=$RPM_BUILD_ROOT
DST_MAN=$DESTDIR/usr/share/man/man1
mkdir -p $DESTDIR/usr/bin $DESTDIR/usr/share/man/man1 \
$DESTDIR/usr/share/doc/kasmvncserver $DESTDIR/usr/lib \
$DESTDIR/usr/share/perl5 $DESTDIR/etc/kasmvnc
cp $SRC_BIN/Xvnc $DESTDIR/usr/bin;
cp $SRC_BIN/vncserver $DESTDIR/usr/bin;
cp -a $SRC_BIN/KasmVNC $DESTDIR/usr/share/perl5
cp $SRC_BIN/vncconfig $DESTDIR/usr/bin;
cp $SRC_BIN/kasmvncpasswd $DESTDIR/usr/bin;
cp $SRC_BIN/kasmxproxy $DESTDIR/usr/bin;
cp -r $SRC/lib/kasmvnc/ $DESTDIR/usr/lib/kasmvncserver
cd $DESTDIR/usr/bin && ln -s kasmvncpasswd vncpasswd;
cp -r $SRC/share/doc/kasmvnc*/* $DESTDIR/usr/share/doc/kasmvncserver/
rsync -r --links --safe-links --exclude '.git*' --exclude po2js --exclude xgettext-html \
--exclude www/utils/ --exclude .eslintrc --exclude configure \
$SRC/share/kasmvnc $DESTDIR/usr/share
sed -i -e 's!pem_certificate: .\+$!pem_certificate: /etc/pki/tls/private/kasmvnc.pem!' \
$DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
sed -i -e 's!pem_key: .\+$!pem_key: /etc/pki/tls/private/kasmvnc.pem!' \
$DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml
sed -e 's/^\([^#]\)/# \1/' $DESTDIR/usr/share/kasmvnc/kasmvnc_defaults.yaml > \
$DESTDIR/etc/kasmvnc/kasmvnc.yaml
cp $SRC/man/man1/Xvnc.1 $DESTDIR/usr/share/man/man1/;
cp $SRC/share/man/man1/vncserver.1 $DST_MAN;
cp $SRC/share/man/man1/vncconfig.1 $DST_MAN;
cp $SRC/share/man/man1/vncpasswd.1 $DST_MAN;
cp $SRC/share/man/man1/kasmxproxy.1 $DST_MAN;
cd $DST_MAN && ln -s vncpasswd.1 kasmvncpasswd.1;
%files
%config(noreplace) /etc/kasmvnc
/usr/bin/*
/usr/lib/kasmvncserver
/usr/share/man/man1/*
/usr/share/perl5/KasmVNC
/usr/share/kasmvnc
%license /usr/share/doc/kasmvncserver/LICENSE.TXT
%doc /usr/share/doc/kasmvncserver/README.md
%changelog
* Wed Apr 05 2023 KasmTech <info@kasmweb.com> - 1.1.0-1
- Upstream release
* Tue Nov 29 2022 KasmTech <info@kasmweb.com> - 1.0.0-1
- WebRTC UDP transit support with support of STUN servers
- Lossless compression using multi-threaded WASM QOI decoder client side
- New yaml based configuration
- Significantly improved FPS through both client-side and server-side improvements.
- Support for the admin to define arbitrary http response headers for the built in web server
- Support for additional mouse buttons
- Refinement of vncserver checks and user prompts
- Added send_full_frame to developer API, forces full frame to be sent to all connected users that have at least read permission.
* Tue Mar 22 2022 KasmTech <info@kasmweb.com> - 0.9.3~beta-1
* Fri Feb 12 2021 KasmTech <info@kasmweb.com> - 0.9.1~beta-1
- Initial release of the rpm package.
%post
kasmvnc_group="kasmvnc-cert"
create_kasmvnc_group() {
if ! getent group "$kasmvnc_group" >/dev/null; then
groupadd --system "$kasmvnc_group"
fi
}
make_self_signed_certificate() {
local cert_file=/etc/pki/tls/private/kasmvnc.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 640 "$cert_file"
}
create_kasmvnc_group
make_self_signed_certificate
%postun
rm -f /etc/pki/tls/private/kasmvnc.pem

View File

@@ -4,6 +4,9 @@ desktop:
height: 768
allow_resize: true
pixel_depth: 24
gpu:
hw3d: false
drinode: /dev/dri/renderD128
network:
protocol: http
@@ -42,6 +45,11 @@ data_loss_prevention:
keyboard:
enabled: true
rate_limit: unlimited
watermark:
# image: /etc/kasmvnc/picture.png
# location: 10,10
# tint: 255,20,20,128
# repeat_spacing: 10
logging:
level: off

View File

@@ -8,6 +8,8 @@ use Data::Dumper;
use Hash::Merge::Simple;
use KasmVNC::Utils;
our $logger;
sub merge {
my @configsToMerge = map { $_->{data} } @_;
my $mergedConfig = Hash::Merge::Simple::merge(@configsToMerge) // {};
@@ -31,7 +33,13 @@ sub load {
failIfConfigNotReadable($self->{filename});
$self->{data} = YAML::Tiny->read($self->{filename})->[0];
$logger->debug("Loading config " . $self->{filename});
my $yamlDocuments = YAML::Tiny->read($self->{filename});
unless (defined $yamlDocuments) {
die "Couldn't load config: $self->{filename}. Probable reason: No newline at end of file\n";
}
$self->{data} = $yamlDocuments->[0];
}
sub get {

View File

@@ -8,9 +8,18 @@ use Data::Dumper;
sub new {
my ($class, $args) = @_;
my $self = bless {
level => $args->{level} // "warn"
}, $class;
}
sub debug {
my $self = shift;
return unless ($self->{level} eq "debug");
say { *STDERR } @_;
}
sub warn {
my $self = shift;

View File

@@ -5,6 +5,9 @@ desktop:
height: 768
allow_resize: true
pixel_depth: 24
gpu:
hw3d: false
drinode: /dev/dri/renderD128
network:
protocol: http
@@ -84,9 +87,13 @@ data_loss_prevention:
keyboard:
enabled: true
rate_limit: unlimited
# "verbose" SETTING LOGS YOUR PRIVATE INFORMATION. Keypresses and clipboard
# content.
watermark:
# image: /etc/kasmvnc/picture.png
# location: 10,10
# tint: 255,20,20,128
# repeat_spacing: 10
logging:
# "verbose" SETTING LOGS YOUR PRIVATE INFORMATION. Keypresses and clipboard content
level: off
encoding:

View File

@@ -1171,6 +1171,7 @@ sub DefineFilePathsAndStuff {
$KasmVNC::Users::vncPasswdBin = $exedir . "kasmvncpasswd";
$KasmVNC::Users::logger = $logger;
$KasmVNC::Config::logger = $logger;
$vncSystemConfigDir = "/etc/kasmvnc";
if ($ENV{KASMVNC_DEVELOPMENT}) {
@@ -1720,6 +1721,50 @@ sub DefineConfigToCLIConversion {
$value;
}
}),
KasmVNC::CliOption->new({
name => 'DLP_WatermarkImage',
configKeys => [
KasmVNC::ConfigKey->new({
name => "data_loss_prevention.watermark.image",
type => KasmVNC::ConfigKey::ANY
})
]
}),
KasmVNC::CliOption->new({
name => 'DLP_WatermarkLocation',
configKeys => [
KasmVNC::ConfigKey->new({
name => "data_loss_prevention.watermark.location",
type => KasmVNC::ConfigKey::ANY,
validator => KasmVNC::PatternValidator->new({
pattern => qr/^\d+,\d+$/,
errorMessage => "Must be an x and y offset separated by a comma: 10,10"
})
})
]
}),
KasmVNC::CliOption->new({
name => 'DLP_WatermarkTint',
configKeys => [
KasmVNC::ConfigKey->new({
name => "data_loss_prevention.watermark.tint",
type => KasmVNC::ConfigKey::ANY,
validator => KasmVNC::PatternValidator->new({
pattern => qr/^\d{1,3},\d{1,3},\d{1,3},\d{1,3}$/,
errorMessage => "Must be RBGA formatted: 255,255,255,128"
})
})
]
}),
KasmVNC::CliOption->new({
name => 'DLP_WatermarkRepeatSpace',
configKeys => [
KasmVNC::ConfigKey->new({
name => "data_loss_prevention.watermark.repeat_spacing",
type => KasmVNC::ConfigKey::INT
})
]
}),
KasmVNC::CliOption->new({
name => 'DLP_Log',
configKeys => [
@@ -1979,7 +2024,7 @@ sub DefineConfigToCLIConversion {
$self = shift;
my @values = @{ listify($self->configValues()) };
my $valuesStr = "";
foreach $value (@values) {
$valuesStr = $valuesStr . "-http-header '$value' "
@@ -2242,6 +2287,39 @@ sub DefineConfigToCLIConversion {
isPresent($value) && $value ne 'auto';
}
}),
KasmVNC::CliOption->new({
name => 'hw3d',
configKeys => [
KasmVNC::ConfigKey->new({
name => "desktop.gpu.hw3d",
type => KasmVNC::ConfigKey::BOOLEAN
})
],
toStringSub => sub {
$self = shift;
my $value = $self->configValue();
switch($value) {
case 'true' {
$valuesStr = '-hw3d ';
}
case 'false' {
$valuesStr = ' ';
}
}
return $valuesStr;
}
}),
KasmVNC::CliOption->new({
name => 'drinode',
configKeys => [
KasmVNC::ConfigKey->new({
name => "desktop.gpu.drinode",
type => KasmVNC::ConfigKey::ANY
})
]
}),
);
%cliArgMap = map { ("-" . $_->{name}) => $_ } @xvncOptions;
@@ -2754,5 +2832,6 @@ sub SetAppSettingsFromConfigAndCli {
}
sub InitLogger {
$logger = KasmVNC::Logger->new();
my $debugEnabled = any { $_ eq "-debug" } @ARGV;
$logger = KasmVNC::Logger->new({ level => $debugEnabled ? "debug" : "warn" });
}

4
unix/xserver/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/*
!/hw
/hw/*
!/hw/vnc

View File

@@ -30,10 +30,14 @@ bin_PROGRAMS = Xvnc
man1_MANS = Xvnc.man
Xvnc_SOURCES = xvnc.c \
Xvnc_SOURCES = xvnc.c dri3.c \
$(top_srcdir)/Xi/stubs.c $(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/fb/fbcmap_mi.c buildtime.c
if DRI3
XVNC_SYS_LIBS += -lgbm
endif
# Xvnc contains no C++ sources so automake doesn't understand that we
# need to use the C++ compiler to link things. This is the upstream
# recommendation for coaxing automake.
@@ -44,7 +48,8 @@ Xvnc_CPPFLAGS = $(XVNC_CPPFLAGS) -DKASMVNC -DNO_MODULE_EXTS \
-DXVNCEXTRAVERSION="\".$(KASMVNC_COMMIT_ID)\"" \
-DXFree86Server -DVENDOR_RELEASE="$(VENDOR_RELEASE)" \
-DVENDOR_STRING="\"$(VENDOR_STRING)\"" -I$(KASMVNC_SRCDIR)/common -I$(KASMVNC_SRCDIR)/unix/common \
-I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir)
-I$(top_srcdir)/include ${XSERVERLIBS_CFLAGS} -I$(includedir) \
-I$(top_srcdir)/dri3 @LIBDRM_CFLAGS@
Xvnc_LDADD = $(XVNC_LIBS) libvnccommon.la $(COMMON_LIBS) \
$(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XVNC_SYS_LIBS) -lX11 -lwebp -lssl -lcrypto -lcrypt

View File

@@ -182,6 +182,11 @@ XserverDesktop::queryConnection(network::Socket* sock,
return rfb::VNCServerST::PENDING;
}
void XserverDesktop::clearLocalClipboards()
{
vncClearLocalClipboards();
}
void XserverDesktop::announceClipboard(bool available)
{
try {

View File

@@ -61,6 +61,7 @@ public:
void setFramebuffer(int w, int h, void* fbptr, int stride);
void refreshScreenLayout();
void requestClipboard();
void clearLocalClipboards();
void announceClipboard(bool available);
void clearBinaryClipboardData();
void sendBinaryClipboardData(const char* mime, const unsigned char *data,

View File

@@ -281,6 +281,15 @@ be either \fB0\fP (off), \fB1\fP (always) or \fB2\fP (auto). Default is
\fB2\fP.
.
.TP
.B \-hw3d
Enable hardware 3d acceleration. Default is software (llvmpipe usually).
.
.TP
.B \-drinode \fIpath\fP
Use another path instead of /dev/dri/renderD128. You may need this if you have
more than one GPU.
.
.TP
.B \-ZlibLevel \fIlevel\fP
Zlib compression level for ZRLE encoding (it does not affect Tight encoding).
Acceptable values are between 0 and 9. Default is to use the standard
@@ -341,6 +350,28 @@ Log clipboard and keyboard actions. Info logs just clipboard direction and size,
verbose adds the contents for both.
.
.TP
.B \-DLP_WatermarkImage \fIpath/to/file.png\fP
Add a watermark. The PNG file should be greyscale, black is treated as transparent
and white as opaque.
.
.TP
.B \-DLP_WatermarkLocation \fIx,y\fP
Place the watermark at this position from the corner. Positive numbers are from top-left,
negative from bottom-right. Negative numbers count from the bottom-right edge of the image.
If not set, the watermark will be centered. Cannot be used together with repeat.
.
.TP
.B \-DLP_WatermarkRepeatSpace \fInum\fP
If set, repeat the watermark over the entire image, with \fBnum\fP pixels between
repetitions. Cannot be used together with location.
.
.TP
.B \-DLP_WatermarkTint \fIr,g,b,a\fP
Tint the greyscale watermark by this color. Default is 255,255,255,255 - full white.
The color components can be used to colorize the greyscale watermark, and the alpha
can be used to make it fainter.
.
.TP
.B \-selfBench
Run a set of self-benchmarks and exit.
.

279
unix/xserver/hw/vnc/dri3.c Normal file
View File

@@ -0,0 +1,279 @@
/* Copyright (c) 2023 Kasm
*
* This 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 software 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 software; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
* USA.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifdef DRI3
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <X11/X.h>
#include <X11/Xmd.h>
#include <dri3.h>
#include <drm_fourcc.h>
#include <fb.h>
#include <gcstruct.h>
#include <gbm.h>
extern const char *driNode;
static struct priv_t {
struct gbm_device *gbm;
int fd;
} priv;
struct gbm_pixmap {
struct gbm_bo *bo;
};
typedef struct gbm_pixmap gbm_pixmap;
static DevPrivateKeyRec dri3_pixmap_private_key;
static struct timeval start;
static int
xvnc_dri3_open_client(ClientPtr client,
ScreenPtr screen,
RRProviderPtr provider,
int *pfd)
{
int fd = open(driNode, O_RDWR | O_CLOEXEC);
if (fd < 0)
return BadAlloc;
*pfd = fd;
return Success;
}
static uint32_t
gbm_format_for_depth(CARD8 depth)
{
switch (depth) {
case 16:
return GBM_FORMAT_RGB565;
case 24:
return GBM_FORMAT_XRGB8888;
case 30:
return GBM_FORMAT_ARGB2101010;
default:
ErrorF("unexpected depth: %d\n", depth);
/* fallthrough */
case 32:
return GBM_FORMAT_ARGB8888;
}
}
static void dri3_pixmap_set_private(PixmapPtr pixmap, gbm_pixmap *gp)
{
dixSetPrivate(&pixmap->devPrivates, &dri3_pixmap_private_key, gp);
}
static gbm_pixmap *gbm_pixmap_get(PixmapPtr pixmap)
{
return dixLookupPrivate(&pixmap->devPrivates, &dri3_pixmap_private_key);
}
static PixmapPtr
create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo, CARD8 depth)
{
PixmapPtr pixmap;
gbm_pixmap *gp = calloc(1, sizeof(gbm_pixmap));
if (!gp)
return NULL;
pixmap = screen->CreatePixmap(screen, gbm_bo_get_width(bo), gbm_bo_get_height(bo),
depth, CREATE_PIXMAP_USAGE_SCRATCH);
if (!pixmap)
return NULL;
gp->bo = bo;
dri3_pixmap_set_private(pixmap, gp);
return pixmap;
}
static PixmapPtr
xvnc_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
CARD16 width, CARD16 height,
const CARD32 *strides, const CARD32 *offsets,
CARD8 depth, CARD8 bpp, uint64_t modifier)
{
struct gbm_bo *bo = NULL;
PixmapPtr pixmap;
if (width == 0 || height == 0 || num_fds == 0 ||
depth < 15 || bpp != BitsPerPixel(depth) ||
strides[0] < width * bpp / 8)
return NULL;
if (num_fds == 1) {
struct gbm_import_fd_data data;
data.fd = fds[0];
data.width = width;
data.height = height;
data.stride = strides[0];
data.format = gbm_format_for_depth(depth);
bo = gbm_bo_import(priv.gbm, GBM_BO_IMPORT_FD, &data,
GBM_BO_USE_RENDERING);
if (!bo)
return NULL;
} else {
return NULL;
}
pixmap = create_pixmap_for_bo(screen, bo, depth);
if (pixmap == NULL) {
gbm_bo_destroy(bo);
return NULL;
}
return pixmap;
}
static int
xvnc_fds_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, int *fds,
uint32_t *strides, uint32_t *offsets,
uint64_t *modifier)
{
gbm_pixmap *gp = gbm_pixmap_get(pixmap);
if (!gp)
return 0;
fds[0] = gbm_bo_get_fd(gp->bo);
strides[0] = gbm_bo_get_stride(gp->bo);
offsets[0] = 0;
*modifier = DRM_FORMAT_MOD_INVALID;
return 1;
}
static Bool
xvnc_get_formats(ScreenPtr screen,
CARD32 *num_formats, CARD32 **formats)
{
ErrorF("xvnc_get_formats\n");
return FALSE;
}
static Bool
xvnc_get_modifiers(ScreenPtr screen, uint32_t format,
uint32_t *num_modifiers, uint64_t **modifiers)
{
ErrorF("xvnc_get_modifiers\n");
return FALSE;
}
static Bool
xvnc_get_drawable_modifiers(DrawablePtr draw, uint32_t format,
uint32_t *num_modifiers, uint64_t **modifiers)
{
ErrorF("xvnc_get_drawable_modifiers\n");
return FALSE;
}
static const dri3_screen_info_rec xvnc_dri3_info = {
.version = 2,
.open = NULL,
.pixmap_from_fds = xvnc_pixmap_from_fds,
.fds_from_pixmap = xvnc_fds_from_pixmap,
.open_client = xvnc_dri3_open_client,
.get_formats = xvnc_get_formats,
.get_modifiers = xvnc_get_modifiers,
.get_drawable_modifiers = xvnc_get_drawable_modifiers,
};
void xvnc_sync_dri3_pixmap(PixmapPtr pixmap)
{
// There doesn't seem to be a good hook or sync point, so we do it manually
// here, right before Present copies from the pixmap
DrawablePtr pDraw;
GCPtr gc;
void *ptr;
uint32_t stride, w, h;
void *opaque = NULL;
// We may not be running on hw if there's a compositor using PRESENT on llvmpipe
if (!driNode)
return;
gbm_pixmap *gp = gbm_pixmap_get(pixmap);
if (!gp) {
//ErrorF("Present tried to copy from a non-dri3 pixmap\n");
return;
}
w = gbm_bo_get_width(gp->bo);
h = gbm_bo_get_height(gp->bo);
ptr = gbm_bo_map(gp->bo, 0, 0, w, h,
GBM_BO_TRANSFER_READ, &stride, &opaque);
if (!ptr) {
ErrorF("gbm map failed, errno %d\n", errno);
return;
}
pDraw = &pixmap->drawable;
if ((gc = GetScratchGC(pDraw->depth, pDraw->pScreen))) {
ValidateGC(pDraw, gc);
//gc->ops->PutImage(pDraw, gc, pDraw->depth, 0, 0, w, h, 0, ZPixmap, data);
fbPutZImage(pDraw, fbGetCompositeClip(gc), gc->alu, fbGetGCPrivate(gc)->pm,
0, 0, w, h, ptr, stride / sizeof(FbStip));
FreeScratchGC(gc);
}
gbm_bo_unmap(gp->bo, opaque);
}
void xvnc_init_dri3(void)
{
memset(&priv, 0, sizeof(priv));
gettimeofday(&start, NULL);
if (!dixRegisterPrivateKey(&dri3_pixmap_private_key, PRIVATE_PIXMAP, 0))
FatalError("dix\n");
if (!driNode)
driNode = "/dev/dri/renderD128";
priv.fd = open(driNode, O_RDWR | O_CLOEXEC);
if (!priv.fd)
FatalError("Failed to open %s\n", driNode);
priv.gbm = gbm_create_device(priv.fd);
if (!priv.gbm)
FatalError("Failed to create gbm\n");
if (!dri3_screen_init(screenInfo.screens[0], &xvnc_dri3_info))
FatalError("Couldn't init dri3\n");
}
#endif // DRI3

View File

@@ -37,6 +37,7 @@
#include <rfb/Hostname.h>
#include <rfb/Region.h>
#include <rfb/ledStates.h>
#include <rfb/Watermark.h>
#include <network/iceip.h>
#include <network/TcpSocket.h>
#include <network/UnixSocket.h>
@@ -232,6 +233,9 @@ void vncExtensionInit(void)
dummyY < 16)
vncFatalError("Invalid value to %s", Server::maxVideoResolution.getName());
if (!watermarkInit())
vncFatalError("Invalid watermark params");
pipe(wakeuppipe);
const int flags = fcntl(wakeuppipe[0], F_GETFL, 0);
fcntl(wakeuppipe[0], F_SETFL, flags | O_NONBLOCK);

View File

@@ -49,7 +49,7 @@ struct dlp_mimetype_t {
char mime[32];
};
unsigned dlp_num_mimetypes();
unsigned dlp_num_mimetypes(void);
const char *dlp_get_mimetype(const unsigned i);
extern int vncInetdSock;
@@ -68,7 +68,7 @@ int vncGetSendPrimary(void);
void vncUpdateDesktopName(void);
void vncAnnounceClipboard(int available);
void vncClearBinaryClipboardData();
void vncClearBinaryClipboardData(void);
void vncSendBinaryClipboardData(const char* mime, const unsigned char *data,
const unsigned len);
void vncGetBinaryClipboardData(const char *mime, const unsigned char **ptr,

View File

@@ -763,3 +763,42 @@ static void vncClientStateCallback(CallbackListPtr * l,
}
}
}
static void vncClearLocalClipboard(Atom selection)
{
SelectionInfoRec info;
Selection *pSel;
int rc;
rc = dixLookupSelection(&pSel, selection, serverClient, DixSetAttrAccess);
if (rc != Success)
return;
if (pSel->client && (pSel->client != serverClient)) {
xEvent event = {
.u.selectionClear.time = currentTime.milliseconds,
.u.selectionClear.window = pSel->window,
.u.selectionClear.atom = pSel->selection
};
event.u.u.type = SelectionClear;
WriteEventsToClient(pSel->client, 1, &event);
}
pSel->lastTimeChanged = currentTime;
pSel->window = None;
pSel->pWin = NULL;
pSel->client = NullClient;
LOG_DEBUG("Cleared %s selection", NameForAtom(selection));
info.selection = pSel;
info.client = serverClient;
info.kind = SelectionSetOwner;
CallCallbacks(&SelectionCallback, &info);
}
void vncClearLocalClipboards()
{
vncClearLocalClipboard(xaPRIMARY);
vncClearLocalClipboard(xaCLIPBOARD);
}

View File

@@ -26,6 +26,7 @@ void vncSelectionInit(void);
void vncHandleClipboardAnnounce(int available);
void vncHandleClipboardAnnounceBinary(const unsigned num, const char mimes[][32]);
void vncClearLocalClipboards();
#ifdef __cplusplus
}

Some files were not shown because too many files have changed in this diff Show More