I have tried x11vnc with noVNC.
Now I can connect the rpi desktop with a vnc client (realvnc client does also work).
Or I can connect the rpi desktop with a browser.
http://openplotter.local:6080/vnc.html
Copy and paste does work with both. In the browser is a menu on the middle left side with a clipboard.
(When you use tightvnc you can't get the rpi desktop
My configuration starts on every boot. The disadvantage is the unencrypted data.
Installation:
1. Uninstall realVNC and old websockify
Quote:sudo apt purge -y realvnc-vnc-server websockify websockify-common python-websockify
2. Install x11vnc
Quote:sudo apt-get install -y x11vnc
sudo x11vnc -storepasswd /etc/x11vnc.pass
create file "sudo nano /lib/systemd/system/x11vnc.service" with
Code:
[Unit]
Description="Start X11VNC"
Requires=display-manager.service
After=display-manager.service
[Service]
ExecStart=/usr/bin/x11vnc -display :0 -auth guess -forever -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared
ExecStop=/usr/bin/x11vnc -R stop
Restart=on-failure
Restart-sec=2
[Install]
WantedBy=multi-user.target
activate load on boot
Quote:sudo systemctl enable x11vnc.service
3. install novnc
Quote:git clone https://github.com/novnc/websockify.git
cd websockify
sudo python setup.py install
cd ..
git clone https://github.com/novnc/noVNC
create file "sudo nano /etc/systemd/system/novnc.service" with
Quote:[Unit]
Description = start noVNC service
After=syslog.target network.target
[Service]
Type=simple
User=pi
ExecStart=/usr/local/bin/websockify --web /home/pi/noVNC/ 6080 localhost:5900
ExecStop=/usr/bin/killall websockify
[Install]
WantedBy=multi-user.target
activate load on boot
Quote:sudo systemctl enable novnc
4. test
start services
Quote:sudo systemctl daemon-reload
sudo systemctl start x11vnc.service
sudo systemctl start novnc.service
Open realvnc client and connect as done before to test if vnc server works.
Open
http://openplotter.local:6080/vnc.html (or [ip-address]:6080/vnc.html) in the browser to test if both work.
reboot and check again
5. Resolution
If you doesn't connect a monitor to rpi4. You can't connect. Solution: Use sudo raspi-config to set a resolution.