VNC připojení na RPi

VNC připojení na RPi
« kdy: 01. 09. 2020, 01:50:57 »
Zdravim,
Mam problem s VNC na RPI. Ak mam VNC spustene nasledovne potom sa na neho neviem pripojit

Kód: [Vybrat]
pi@rpi-home:~ $ sudo systemctl status vncserver-x11-serviced.service
● vncserver-x11-serviced.service - VNC Server in Service Mode daemon
   Loaded: loaded (/usr/lib/systemd/system/vncserver-x11-serviced.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Tue 2020-09-01 01:39:11 CEST; 2s ago
  Process: 24968 ExecStart=/usr/bin/vncserver-x11-serviced -fg (code=exited, status=0/SUCCESS)
 Main PID: 24968 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 1475)
   Memory: 15.0M
   CGroup: /system.slice/vncserver-x11-serviced.service

Sep 01 01:38:46 rpi-home systemd[1]: Started VNC Server in Service Mode daemon.
Sep 01 01:38:46 rpi-home vncserver-x11[24971]: ServerManager: Server started
Sep 01 01:38:46 rpi-home vncserver-x11[24971]: ConsoleDisplay: Found running X server (pid=478, binary=/usr/lib/xorg/Xorg)
Sep 01 01:39:11 rpi-home systemd[1]: Stopping VNC Server in Service Mode daemon...
Sep 01 01:39:11 rpi-home vncserver-x11[24971]: ServerManager: Server stopped
Sep 01 01:39:11 rpi-home systemd[1]: vncserver-x11-serviced.service: Succeeded.
Sep 01 01:39:11 rpi-home systemd[1]: Stopped VNC Server in Service Mode daemon.
pi@rpi-home:~ $ sudo netstat -pevanut | grep vnc
pi@rpi-home:~ $ sudo systemctl start vncserver-x11-serviced.service
pi@rpi-home:~ $ sudo netstat -pevanut | grep vnc
tcp        0      0 0.0.0.0:5900            0.0.0.0:*               LISTEN      0          6047607    25054/vncserver-x11
tcp        0      0 127.0.0.1:42437         127.0.0.1:56548         ESTABLISHED 1000       6050226    25067/vncserverui
tcp        0      0 127.0.0.1:56548         127.0.0.1:42437         ESTABLISHED 0          6047655    25054/vncserver-x11
tcp6       0      0 :::5900                 :::*                    LISTEN      0          6047606    25054/vncserver-x11

Pri neuspesnom pripajani dostavam hlasky typu:

Kód: [Vybrat]
wakatana@ubuntu:~$ vncviewer 192.168.3.108:0
Connected to RFB server, using protocol version 3.3
No configured security type is supported by 3.3 VNC Viewer
wakatana@ubuntu:~$ vncviewer 192.168.3.108:1
vncviewer: ConnectToTcpAddr: connect: Connection refused
Unable to connect to VNC server

Ak mam VNC spustene nasledovne potom sa pripojim avsak kazde okno ktore otvorim po chvilke zmizne

Kód: [Vybrat]
pi@rpi-home:~ $ vncserver-virtual -Encryption PreferOn -Authentication VncAuth
VNC(R) Server 6.7.1 (r42348) ARMv6 (Jan 30 2020 15:13:47)
Copyright (C) 2002-2020 RealVNC Ltd.
RealVNC and VNC are trademarks of RealVNC Ltd and are protected by trademark
registrations and/or pending trademark applications in the European Union,
United States of America and other jurisdictions.
Protected by UK patent 2481870; US patent 8760366; EU patent 2652951.
See https://www.realvnc.com for information on VNC.
For third party acknowledgements see:
https://www.realvnc.com/docs/6/foss.html
OS: Raspbian GNU/Linux 10, Linux 4.19.97, armv7l

On some distributions (in particular Red Hat), you may get a better experience
by running vncserver-virtual in conjunction with the system Xorg server, rather
than the old version built-in to Xvnc. More desktop environments and
applications will likely be compatible. For more information on this alternative
implementation, please see: https://www.realvnc.com/doclink/kb-546

Running applications in /etc/vnc/xstartup

VNC Server catchphrase: "Flame monster buffalo. Demo Ralph bazaar."
             signature: f1-37-1f-cc-c4-19-1b-82

Log file is /home/pi/.vnc/rpi-home:1.log
New desktop is rpi-home:1 (192.168.3.108:1)
pi@rpi-home:~ $ sudo netstat -pevanut | grep vnc
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN      1000       6051865    25139/Xvnc-core
tcp        0      0 0.0.0.0:6001            0.0.0.0:*               LISTEN      1000       6050967    25139/Xvnc-core
tcp        0      0 127.0.0.1:58600         127.0.0.1:37497         ESTABLISHED 1000       6050458    25139/Xvnc-core
tcp        0      0 127.0.0.1:37497         127.0.0.1:58600         ESTABLISHED 1000       6051935    25183/vncserverui
tcp6       0      0 :::5901                 :::*                    LISTEN      1000       6051864    25139/Xvnc-core
tcp6       0      0 :::6001                 :::*                    LISTEN      1000       6050966    25139/Xvnc-core
pi@rpi-home:~ $

Pripajam sa  nasleovne:

Kód: [Vybrat]
vncviewer 192.168.3.108:1
resp
vncviewer 192.168.3.108:0
« Poslední změna: 01. 09. 2020, 07:22:33 od Petr Krčmář »


_Jenda

  • *****
  • 502
    • Zobrazit profil
    • https://jenda.hrach.eu/
    • E-mail
Re:VNC pripojenie na RPI
« Odpověď #1 kdy: 01. 09. 2020, 02:06:59 »
systemctl cat vncserver-x11-serviced.service, protože v debianím repu to není a jinde ten soubor hledat nebudeme.

Nápady: spouští se to pod rootem vs. pod uživatelem a je tam jiná konfigurace nebo environment (DISPLAY, XAUTHORITY). Služba je typu notify, ale nenotifikuje se a umře. Jo a ještě journalctl -u vncserver-x11-serviced by mohlo vypsat víc logů.

ajne

Re:VNC připojení na RPi
« Odpověď #2 kdy: 01. 09. 2020, 08:24:57 »
Já jel při konfigurování VNC na RPi 4 (Raspian Buster) podle tohoto návodu:

https://pimylifeup.com/raspberry-pi-screen-sharing/

Funguje bezvadně.

Re:VNC připojení na RPi
« Odpověď #3 kdy: 01. 09. 2020, 12:17:17 »
Dakujem za rady, ked spravne chapem tak podla vypisu nizsie sluzba nieje typu notify. Ake by mali byt spravne nastavenia pre pouzivatela, DISPLAY a XAUTHORITY? Dakujem.

Kód: [Vybrat]
pi@rpi-home:~ $ systemctl cat vncserver-x11-serviced.service
# /usr/lib/systemd/system/vncserver-x11-serviced.service
[Unit]
Description=VNC Server in Service Mode daemon
After=network.target

[Service]
ExecStart=/usr/bin/vncserver-x11-serviced -fg
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
KillMode=process

[Install]
WantedBy=multi-user.target

Kód: [Vybrat]
pi@rpi-home:~ $ journalctl -u vncserver-x11-serviced
-- Logs begin at Tue 2020-08-25 02:53:42 CEST, end at Tue 2020-09-01 12:09:49 CEST. --
Aug 30 21:04:16 rpi-home vncserver-x11[440]: Connections: connected: 192.168.3.107::56633 (TCP)
Aug 30 21:04:16 rpi-home vncserver-x11[440]: Connections: disconnected: 192.168.3.107::56633 (TCP) ([EndOfStream] Disconnection by client)
Sep 01 00:33:58 rpi-home vncserver-x11[440]: Connections: connected: 192.168.3.107::57234 (TCP)
Sep 01 00:33:58 rpi-home vncserver-x11[440]: Connections: disconnected: 192.168.3.107::57234 (TCP) ([ConnFailed] No configured security type is supported by 3.3 VNC Viewer)
Sep 01 01:14:12 rpi-home vncserver-x11[440]: Connections: connected: 192.168.3.107::58312 (TCP)
Sep 01 01:14:12 rpi-home vncserver-x11[440]: Connections: disconnected: 192.168.3.107::58312 (TCP) ([ConnFailed] No configured security type is supported by 3.3 VNC Viewer)
Sep 01 01:21:52 rpi-home vncserver-x11[440]: ServerManager: Server stopped
Sep 01 01:21:52 rpi-home systemd[1]: vncserver-x11-serviced.service: Succeeded.
Sep 01 01:37:02 rpi-home systemd[1]: Started VNC Server in Service Mode daemon.
Sep 01 01:37:02 rpi-home vncserver-x11[24847]: ServerManager: Server started
Sep 01 01:37:02 rpi-home vncserver-x11[24847]: ConsoleDisplay: Found running X server (pid=478, binary=/usr/lib/xorg/Xorg)
Sep 01 01:37:24 rpi-home systemd[1]: Stopping VNC Server in Service Mode daemon...
Sep 01 01:37:24 rpi-home vncserver-x11[24847]: ServerManager: Server stopped
Sep 01 01:37:24 rpi-home systemd[1]: vncserver-x11-serviced.service: Succeeded.
Sep 01 01:37:24 rpi-home systemd[1]: Stopped VNC Server in Service Mode daemon.
Sep 01 01:38:46 rpi-home systemd[1]: Started VNC Server in Service Mode daemon.
Sep 01 01:38:46 rpi-home vncserver-x11[24971]: ServerManager: Server started
Sep 01 01:38:46 rpi-home vncserver-x11[24971]: ConsoleDisplay: Found running X server (pid=478, binary=/usr/lib/xorg/Xorg)
Sep 01 01:39:11 rpi-home systemd[1]: Stopping VNC Server in Service Mode daemon...
Sep 01 01:39:11 rpi-home vncserver-x11[24971]: ServerManager: Server stopped
Sep 01 01:39:11 rpi-home systemd[1]: vncserver-x11-serviced.service: Succeeded.
Sep 01 01:39:11 rpi-home systemd[1]: Stopped VNC Server in Service Mode daemon.
Sep 01 01:39:22 rpi-home systemd[1]: Started VNC Server in Service Mode daemon.
Sep 01 01:39:22 rpi-home vncserver-x11[25054]: ServerManager: Server started
Sep 01 01:39:22 rpi-home vncserver-x11[25054]: ConsoleDisplay: Found running X server (pid=478, binary=/usr/lib/xorg/Xorg)
Sep 01 01:39:39 rpi-home vncserver-x11[25054]: Connections: connected: 192.168.3.107::58663 (TCP)
Sep 01 01:39:39 rpi-home vncserver-x11[25054]: Connections: disconnected: 192.168.3.107::58663 (TCP) ([ConnFailed] No configured security type is supported by 3.3 VNC Viewer)
Sep 01 01:40:06 rpi-home vncserver-x11[25054]: Connections: connected: 192.168.3.107::58691 (TCP)
Sep 01 01:40:06 rpi-home vncserver-x11[25054]: Connections: disconnected: 192.168.3.107::58691 (TCP) ([ConnFailed] No configured security type is supported by 3.3 VNC Viewer)
Sep 01 01:40:12 rpi-home vncserver-x11[25054]: Connections: connected: 192.168.3.107::58692 (TCP)
Sep 01 01:40:12 rpi-home vncserver-x11[25054]: Connections: disconnected: 192.168.3.107::58692 (TCP) ([ConnFailed] No configured security type is supported by 3.3 VNC Viewer)
Sep 01 01:40:41 rpi-home systemd[1]: Stopping VNC Server in Service Mode daemon...
Sep 01 01:40:41 rpi-home vncserver-x11[25054]: ServerManager: Server stopped
Sep 01 01:40:41 rpi-home systemd[1]: vncserver-x11-serviced.service: Succeeded.
Sep 01 01:40:41 rpi-home systemd[1]: Stopped VNC Server in Service Mode daemon.

bmn

Re:VNC připojení na RPi
« Odpověď #4 kdy: 14. 10. 2020, 11:59:48 »
Je k tomu RPi pripojeny monitor? Ked som testoval realvnc na rpi tak mi to fungovalo iba ak bol pripojeny monitor inak nie. Preto som presiel na tightvnc ktore mi funguje bez pripojeneho monitoru.


leten

Re:VNC připojení na RPi
« Odpověď #5 kdy: 15. 10. 2020, 10:19:20 »
Na RPi s Ubuntu MATE 16.04 používám vnc4server a připojuji se přes Remminu z Ubuntu 16.04 a funguje bez problému

Re:VNC připojení na RPi
« Odpověď #6 kdy: 15. 10. 2020, 10:52:02 »
Je k tomu RPi pripojeny monitor? Ked som testoval realvnc na rpi tak mi to fungovalo iba ak bol pripojeny monitor inak nie. Preto som presiel na tightvnc ktore mi funguje bez pripojeneho monitoru.
Nieje k nemu pripojeny monitor. Tiez som si vsimol nieco podobne ale nejako som to nijak nezreprodukoval, lebo sa stavalo ze to slo aj s odpojenym monitorom.

Re:VNC připojení na RPi
« Odpověď #7 kdy: 15. 10. 2020, 11:32:10 »
Je k tomu RPi pripojeny monitor? Ked som testoval realvnc na rpi tak mi to fungovalo iba ak bol pripojeny monitor inak nie. Preto som presiel na tightvnc ktore mi funguje bez pripojeneho monitoru.

Mne to funguje na RPi4 a RealVNC (server aj klient) aj bez monitoru.

Re:VNC připojení na RPi
« Odpověď #8 kdy: 15. 10. 2020, 12:05:12 »
Je k tomu RPi pripojeny monitor? Ked som testoval realvnc na rpi tak mi to fungovalo iba ak bol pripojeny monitor inak nie. Preto som presiel na tightvnc ktore mi funguje bez pripojeneho monitoru.

Mne to funguje na RPi4 a RealVNC (server aj klient) aj bez monitoru.

Ja vpodstate potrebujem VNC len na to aby som mohol pustit napr web browser a nechat nieco stahovat bez toho aby mi browser vyplo ked zavriem VNC okno. Session vo VNC nemusi byt nutne rovnaka session ako je session pre desktop (X11 alebo wayland alebo co to tam je)