Open Suika opened 1 month ago
Trying to connect via VNC with encryption results in:
kvmd-vnc[47420]: Traceback (most recent call last):
kvmd-vnc[47420]: File "/usr/lib/python3/dist-packages/kvmd/apps/vnc/rfb/__init__.py", line 118, in __wrapper
kvmd-vnc[47420]: await coro
kvmd-vnc[47420]: File "/usr/lib/python3/dist-packages/kvmd/apps/vnc/rfb/__init__.py", line 132, in __main_task_loop
kvmd-vnc[47420]: await self.__handshake_security()
kvmd-vnc[47420]: File "/usr/lib/python3/dist-packages/kvmd/apps/vnc/rfb/__init__.py", line 272, in __handshake_security
kvmd-vnc[47420]: await handler()
kvmd-vnc[47420]: File "/usr/lib/python3/dist-packages/kvmd/apps/vnc/rfb/__init__.py", line 325, in __handshake_security_vencrypt
kvmd-vnc[47420]: ssl_context.load_cert_chain(self.__x509_cert_path, (self.__x509_key_path or None))
kvmd-vnc[47420]: PermissionError: [Errno 13] Permission denied
Easy fix, since it's all about vnc server certificate access problems: chown kvmd-vnc:kvmd-vnc -R /etc/kvmd/vnc
Does this actually work @Suika ? If so, then I can add those commands to the install as long as you request a PR.
#!/bin/bash
### Written by @srepac 09-06-2024
# https://github.com/srepac/kvmd-armbian/issues/3
# Address missing ustreamer python package for kvmd-vnc
###
build-vnc-support() {
apt install python3-build -y
cd /tmp; rm -rf ustreamer/
git clone --depth=1 https://github.com/pikvm/ustreamer
cd ustreamer/python
make
### copy the created ustreamer dir and *.so file into correct location to support VNC ###
cd root/usr/local/lib/python3.10/dist-packages/
tar cf - * | ( cd /usr/lib/python3/dist-packages/; tar xf - )
### set proper ownership of /etc/kvmd/vnc directory and files/dirs within it
chown kvmd-vnc:kvmd-vnc -R /etc/kvmd/vnc
} # end build-vnc-support
### MAIN STARTS HERE ###
systemctl stop kvmd
build-vnc-support
systemctl daemon-reload
systemctl enable kvmd-vnc
systemctl restart kvmd-vnc kvmd
To me it does with https://tigervnc.org/. Currently the remote system is off.
The mentioned build and chown commands is how I got it running. Didn't touch any other parts.
systemctl enable --now kvmd-vnc
leads to:The
build-ustreamer()
needs to be extended to also build the python package: