2019-12-31 10:50:02 +00:00
|
|
|
# wayvnc
|
2019-12-25 11:25:09 +00:00
|
|
|
|
|
|
|
## Introduction
|
2020-01-17 07:58:16 +00:00
|
|
|
This is a VNC server for wlroots based Wayland compositors. It attaches to a
|
|
|
|
running Wayland session, creates virtual input devices and exposes a single
|
|
|
|
display via the RFB protocol. The Wayland session may be a headless one, so it
|
|
|
|
is also possible to run wayvnc without a physical display attached.
|
2019-12-25 11:25:09 +00:00
|
|
|
|
2020-02-18 22:16:03 +00:00
|
|
|
Please check the [FAQ](FAQ.md) for answers to common questions. For further
|
|
|
|
support, join the #wayvnc IRC channel on freenode.
|
2020-01-25 20:40:43 +00:00
|
|
|
|
2020-03-21 16:43:02 +00:00
|
|
|
## Installing
|
|
|
|
### archlinux
|
|
|
|
```
|
|
|
|
git clone https://aur.archlinux.org/neatvnc.git
|
|
|
|
cd neatvnc
|
|
|
|
makepkg -si
|
|
|
|
cd -
|
|
|
|
|
|
|
|
git clone https://aur.archlinux.org/wayvnc.git
|
|
|
|
cd wayvnc
|
|
|
|
makepkg -si
|
|
|
|
cd -
|
|
|
|
```
|
|
|
|
|
2020-04-10 12:48:04 +00:00
|
|
|
### FreeBSD
|
|
|
|
```
|
|
|
|
pkg install wayvnc
|
|
|
|
```
|
|
|
|
|
2019-12-25 11:25:09 +00:00
|
|
|
## Building
|
|
|
|
### Runtime Dependencies
|
2020-03-21 16:56:30 +00:00
|
|
|
* aml
|
2019-12-25 11:25:09 +00:00
|
|
|
* EGL
|
|
|
|
* libxkbcommon
|
|
|
|
* neatvnc
|
|
|
|
* OpenGL ES V2.0
|
|
|
|
* pixman
|
|
|
|
|
|
|
|
### Build Dependencies
|
|
|
|
* GCC
|
|
|
|
* meson
|
|
|
|
* ninja
|
|
|
|
* pkg-config
|
|
|
|
|
2020-03-21 16:38:34 +00:00
|
|
|
#### For archlinux
|
|
|
|
```
|
2020-03-21 16:56:30 +00:00
|
|
|
pacman -S base-devel libglvnd libxkbcommon pixman gnutls
|
2020-03-21 16:38:34 +00:00
|
|
|
```
|
|
|
|
|
2020-03-15 18:28:05 +00:00
|
|
|
#### For fedora 31
|
|
|
|
```
|
2020-03-21 16:31:55 +00:00
|
|
|
dnf install -y meson gcc ninja-build pkg-config egl-wayland egl-wayland-devel \
|
|
|
|
mesa-libEGL-devel mesa-libEGL libwayland-egl libglvnd-devel \
|
|
|
|
libglvnd-core-devel libglvnd mesa-libGLES-devel mesa-libGLES \
|
2020-03-21 16:38:34 +00:00
|
|
|
libxkbcommon-devel libxkbcommon libwayland-client libwayland \
|
2020-03-21 16:31:55 +00:00
|
|
|
wayland-devel gnutls-devel
|
2020-03-15 18:28:05 +00:00
|
|
|
```
|
|
|
|
|
2020-03-21 16:56:30 +00:00
|
|
|
The easiest way to satisfy the neatvnc and aml dependencies is to link to them
|
|
|
|
in the subprojects directory:
|
2019-12-25 11:25:09 +00:00
|
|
|
```
|
2020-03-21 16:56:30 +00:00
|
|
|
git clone https://github.com/any1/wayvnc.git
|
|
|
|
git clone https://github.com/any1/neatvnc.git
|
|
|
|
git clone https://github.com/any1/aml.git
|
|
|
|
|
|
|
|
mkdir wayvnc/subprojects
|
|
|
|
cd wayvnc/subprojects
|
|
|
|
ln -s ../../neatvnc .
|
|
|
|
ln -s ../../aml .
|
|
|
|
cd -
|
|
|
|
|
|
|
|
mkdir neatvnc/subprojects
|
|
|
|
cd neatvnc/subprojects
|
|
|
|
ln -s ../../aml .
|
|
|
|
cd -
|
2019-12-25 11:25:09 +00:00
|
|
|
|
2020-04-17 23:30:29 +00:00
|
|
|
meson build
|
2019-12-25 11:25:09 +00:00
|
|
|
ninja -C build
|
|
|
|
```
|
|
|
|
|
2019-12-31 10:50:02 +00:00
|
|
|
## Running
|
2019-12-25 11:25:09 +00:00
|
|
|
Wayvnc can be run from the build directory like so:
|
|
|
|
```
|
|
|
|
./build/wayvnc
|
|
|
|
```
|
2019-12-31 10:50:02 +00:00
|
|
|
|
|
|
|
:radioactive: The server only accepts connections from localhost by default. To
|
|
|
|
accept connections via any interface, set the address to `0.0.0.0` like this:
|
|
|
|
```
|
|
|
|
./build/wayvnc 0.0.0.0
|
|
|
|
```
|
|
|
|
|
2020-01-18 20:48:46 +00:00
|
|
|
:warning: Do not do this on a public network or the internet without
|
|
|
|
user authentication enabled. The best way to protect your VNC connection is to
|
|
|
|
use SSH tunneling while listening on localhost, but users can also be
|
|
|
|
authenticated when connecting to Wayvnc.
|
|
|
|
|
2020-01-29 21:20:14 +00:00
|
|
|
### Encryption & Authentication
|
2020-01-18 20:48:46 +00:00
|
|
|
You'll need a private X509 key and a certificate. A self signed key with a
|
|
|
|
certificate can be generated like so:
|
|
|
|
```
|
|
|
|
openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes \
|
|
|
|
-keyout key.pem -out cert.pem -subj /CN=localhost \
|
|
|
|
-addext subjectAltName=DNS:localhost,DNS:localhost,IP:127.0.0.1
|
|
|
|
```
|
|
|
|
Replace `localhost` and `127.0.0.1` in the command above with your public facing
|
|
|
|
host name and IP address, respectively, or just keep them as is if you're
|
|
|
|
testing locally.
|
|
|
|
|
|
|
|
Create a config with the authentication info and load it using the `--config`
|
|
|
|
command line option or place it at the default location
|
|
|
|
`$HOME/.config/wayvnc/config`.
|
|
|
|
```
|
|
|
|
address=0.0.0.0
|
|
|
|
enable_auth=true
|
|
|
|
username=luser
|
|
|
|
password=p455w0rd
|
|
|
|
private_key_file=/path/to/key.pem
|
|
|
|
certificate_file=/path/to/cert.pem
|
|
|
|
```
|
2020-01-25 20:29:42 +00:00
|
|
|
|
|
|
|
## Compatible Software
|
|
|
|
See https://github.com/any1/neatvnc#client-compatibility
|