2021-10-12 18:45:00 +00:00
|
|
|
# VNC
|
|
|
|
|
2023-08-12 04:33:43 +00:00
|
|
|
As an alternative to the web interface, a regular VNC client can be used to access to the PiKVM.
|
|
|
|
The main advantage of VNC over the browser is the ability to expand the image to the full screen,
|
|
|
|
as well as complete interception of all keyboard keys. In some cases, VNC will be more responsive
|
|
|
|
than the browser, especially on weak client computers.
|
2021-10-12 18:45:00 +00:00
|
|
|
|
|
|
|
!!! warning
|
2023-08-12 04:33:43 +00:00
|
|
|
Don't use VNC without X.509 or TLS encryption on untrusted networks!
|
|
|
|
Otherwise your password will be transmitted over the network in plain text.
|
|
|
|
Unfortunately, this is the reality of the VNC protocol.
|
2022-07-31 19:46:33 +00:00
|
|
|
|
2023-08-12 04:33:43 +00:00
|
|
|
!!! note
|
|
|
|
The performance of VNC on PiKVM does not make sense to compare with regular VNC servers
|
|
|
|
or a similar remote access tool at the OS level.
|
|
|
|
PiKVM will run a little slower due to the fact that access is done at the hardware level.
|
|
|
|
|
|
|
|
A typical video processing chain looks like this:
|
2022-12-28 01:44:49 +00:00
|
|
|
|
2023-08-12 04:33:43 +00:00
|
|
|
* Regular VNC/RDP/TeamViewer/Etc: `OS -> Remote access server -> Network -> Client`.
|
|
|
|
* PiKVM: `OS -> Video card -> PiKVM video capture -> PiKVM server -> Network -> Client`.
|
2021-10-12 18:45:00 +00:00
|
|
|
|
|
|
|
|
2023-08-12 04:33:43 +00:00
|
|
|
-----
|
2021-10-12 18:45:00 +00:00
|
|
|
## Enabling VNC on the PiKVM side
|
|
|
|
|
2023-08-14 12:37:22 +00:00
|
|
|
1. The recommended client is [TigerVNC](https://github.com/TigerVNC/tigervnc/releases).
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-14 12:37:22 +00:00
|
|
|
2. Switch the PiKVM filesystem to read-write mode using command `rw`.
|
|
|
|
|
|
|
|
3. ??? tip "Optional for *non-TigerVNC* clients: Change the keybobard layout for non-US keyboard"
|
|
|
|
|
2023-08-14 12:52:25 +00:00
|
|
|
This step is nessessory if you're using a client that does not support
|
|
|
|
the direct keyboard access.
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-14 12:52:25 +00:00
|
|
|
In this case you can force the client layout in `/etc/kvmd/override.yaml`:
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-14 12:44:51 +00:00
|
|
|
```yaml
|
|
|
|
vnc:
|
|
|
|
keymap: /usr/share/kvmd/keymaps/ru
|
|
|
|
```
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-14 12:44:51 +00:00
|
|
|
All available keymaps are located in `/usr/share/kvmd/keymaps`:
|
|
|
|
|
|
|
|
<img src="keymaps.png" />
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-14 12:37:22 +00:00
|
|
|
4. ??? warning "Optional for *non-TigerVNC* and NOT RECOMMENDED: Enable VNCAuth method"
|
|
|
|
|
2023-08-14 12:52:25 +00:00
|
|
|
This step is nessessory if you're using a client that does not support the user/password
|
|
|
|
auth method like TightVNC (don't confuse it with TigerVNC).
|
2023-08-14 12:44:51 +00:00
|
|
|
|
2023-08-14 12:52:25 +00:00
|
|
|
In this case you can enable VNCAuth passphrases mode in `/etc/kvmd/override.yaml`:
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-14 12:44:51 +00:00
|
|
|
```yaml
|
|
|
|
vnc:
|
|
|
|
auth:
|
|
|
|
vncauth:
|
|
|
|
enabled: true
|
|
|
|
```
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-14 12:44:51 +00:00
|
|
|
To set passphrases edit the file `/etc/kvmd/vncpasswd`.
|
2023-08-14 12:19:26 +00:00
|
|
|
|
2023-08-14 12:52:25 +00:00
|
|
|
**But once again: THIS IS AN UNSAFE AUTHORIZATION METHOD and it is better to use TigerVNC.**
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-14 12:37:22 +00:00
|
|
|
5. Enable `kvmd-vnc` daemon. VNC will be available on the port 5900: `systemctl enable --now kvmd-vnc`.
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-14 12:37:22 +00:00
|
|
|
6. Switch filesystem back to read-only: `ro`.
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-01-23 12:44:49 +00:00
|
|
|
!!! note
|
2023-08-12 04:33:43 +00:00
|
|
|
With enabled [2FA](auth.md#two-factor-authentication), you will need to append the one-time code
|
|
|
|
to the password without spaces. That is, if the password is `foobar` and the code is `123456`,
|
|
|
|
then the string `foobar123456` should be used as a password.
|
|
|
|
|
|
|
|
Also note that `vncauth` (step 3) will not work with 2FA.
|
2023-01-23 12:44:49 +00:00
|
|
|
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-12 04:33:43 +00:00
|
|
|
-----
|
2021-10-12 18:45:00 +00:00
|
|
|
## Configuring the client
|
|
|
|
|
2023-08-14 12:37:22 +00:00
|
|
|
We recommend [TigerVNC](https://tigervnc.org) for a better experience on a desktop.
|
2021-10-12 18:45:00 +00:00
|
|
|
|
2023-08-12 04:33:43 +00:00
|
|
|
If you're using PiKVM V3+ or DIY based on CSI bridge, you can try
|
|
|
|
the [latest version (>= 1.13.0) of TigerVNC with H.264 support](https://github.com/TigerVNC/tigervnc/releases).
|
|
|
|
It will improve performance and save traffic.
|
2022-12-28 02:14:10 +00:00
|
|
|
|
2023-08-12 04:33:43 +00:00
|
|
|
H.264 video mode is available in binary builds for Windows, for other OS it needs to be compiled manually
|
|
|
|
(`ffmpeg` libraries required to build).
|
2022-12-28 01:59:40 +00:00
|
|
|
|
2021-10-12 18:45:00 +00:00
|
|
|
Here are our recommended settings for TigerVNC:
|
|
|
|
|
2022-12-28 01:59:40 +00:00
|
|
|
| Compression tab | Security tab |
|
|
|
|
|-----------------|--------------|
|
2022-12-28 02:01:28 +00:00
|
|
|
| <img src="tigervnc_compression.png" width="300" /> | <img src="tigervnc_security.png" width="300" /> |
|
2022-12-28 01:59:40 +00:00
|
|
|
| If your client does not support H.264, choose **Tight** | |
|
2021-10-12 18:45:00 +00:00
|
|
|
|
|
|
|
For iOS and Android the recommended application is bVNC:
|
|
|
|
|
|
|
|
* [Google Play](https://play.google.com/store/apps/details?id=com.iiordanov.bVNC)
|
|
|
|
* [App Store](https://apps.apple.com/us/app/bvnc-pro/id1506461202)
|
|
|
|
|
|
|
|
|
2023-08-12 04:33:43 +00:00
|
|
|
-----
|
2021-10-12 18:45:00 +00:00
|
|
|
## Unsupported clients
|
|
|
|
|
|
|
|
* **RealVNC** - Does not support most widely used open VNC protocol extensions.
|
2022-12-28 01:59:40 +00:00
|
|
|
* **Remmina** - Slightly imperfect algorithms for matching settings with the server, we are working on it.
|
2021-10-12 18:45:00 +00:00
|
|
|
* **Guacamole** - Incorrectly implements vencrypt, no JPEG compression.
|
2022-12-28 01:59:40 +00:00
|
|
|
* **Vinagre** - Incorrectly implements vencrypt, dead.
|