1

I am trying to establish a vnc from windows to raspi buster which does not work so far.

Status is as follows:

  • ssh with putty is up and running I have switched on vnc in sudo raspi-config
  • I have selected display resolution 85 in sudo raspi-config
  • I am using realvnc-vnc-server on the raspi I am using realvnc on windows
  • When I try to connect, I can enter user and password and the connection establishes, but the final result is "desktop cannot be shown".

I have tried different alternatives and packackes, but cannot get things running. Which is annoying, because vnc worked well a year ago (using tightvnc at that time, which does not work either at the moment).

I have also tried a route using xrdp but also without success.

What would be the standard route to access a display on a raspi running buster from a windows pc?

EDIT: If have now additionally set the boot option in sudo raspi config so that the desktop automatically starts, but requires a user login. While I still cannot log in due to missing credentials, this seems to be the correct path.

EDIT2: Something seems strange with my vncserver process. The command vncserver delivers no error and shows the IP to which I should connect. However vncserver -kill :1 does not work (XServer process cannot be terminated), and repeating the vncserver command does not count up the display numbers, but always hands back 192.168.178.49:1

EDIT3: (for buster on a Raspi 4)

systemctl status vncserver-x11-serviced.service

(after having startet vncserver which offers an IP address to connect to) shows the following:

* 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: active (running) since Thu 2019-08-08 07:54:44 CEST; 1h 11min ago
 Main PID: 516 (vncserver-x11-s)
    Tasks: 2 (limit: 1599)
   Memory: 8.2M
   CGroup: /system.slice/vncserver-x11-serviced.service
           |-516 /usr/bin/vncserver-x11-serviced -fg
           `-523 /usr/bin/vncserver-x11-core -service

Aug 08 07:54:44 raspberrypi systemd[1]: Started VNC Server in Service Mode daemon.
Aug 08 07:54:45 raspberrypi vncserver-x11[523]: ServerManager: Server started
Aug 08 07:54:45 raspberrypi vncserver-x11[523]: ConsoleDisplay: Cannot find a running X server on vt1

EDIT4: (for strech on a Raspi 3 B+) I have tried the same on a different Raspi under strech. The output is somewhat different, now there is an X Server running:

 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: active (running) since Wed 2019-08-07 21:46:58 CEST; 16s ago
 Main PID: 498 (vncserver-x11-s)
   CGroup: /system.slice/vncserver-x11-serviced.service
           ├─498 /usr/bin/vncserver-x11-serviced -fg
           └─510 /usr/bin/vncserver-x11-core -service

Aug 07 21:46:58 raspberrypi systemd[1]: Started VNC Server in Service Mode daemon.
Aug 07 21:46:59 raspberrypi vncserver-x11[510]: ServerManager: Server started
Aug 07 21:46:59 raspberrypi vncserver-x11[510]: ConsoleDisplay: Cannot find a running X server on vt1
Aug 07 21:46:59 raspberrypi vncserver-x11[510]: ConsoleDisplay: Found running X server (pid=531, binary=/usr/lib/xorg/Xorg)
Aug 07 21:46:59 raspberrypi vncserver-x11[510]: AgentInitCheck: agent comms failure
Aug 07 21:47:04 raspberrypi vncserver-x11[510]: ConsoleDisplay: Cannot find a running X server on vt7
Aug 07 21:47:04 raspberrypi vncserver-x11[510]: AgentInitCheck: no response from agent
Aug 07 21:47:09 raspberrypi vncserver-x11[510]: AgentInitCheck: agent comms failure

EDIT5: I have set up a raspi 3 with a clean strech image. The good news: The XServer is running:

 vncserver-x11-serviced.service - VNC Server in Service Mode daemon
   Loaded: loaded (/usr/lib/systemd/system/vncserver-x11-serviced.service; enabl
   Active: active (running) since Thu 2019-08-08 13:20:23 CEST; 8s ago
 Main PID: 5067 (vncserver-x11-s)
   CGroup: /system.slice/vncserver-x11-serviced.service
           |-5067 /usr/bin/vncserver-x11-serviced -fg
           |-5068 /usr/bin/vncserver-x11-core -service
           `-5078 /usr/bin/vncagent service 15

Aug 08 13:20:23 raspberrypi systemd[1]: Started VNC Server in Service Mode daemo
Aug 08 13:20:23 raspberrypi vncserver-x11[5068]: ServerManager: Server started
Aug 08 13:20:23 raspberrypi vncserver-x11[5068]: ConsoleDisplay: Found running X
~

The bad news: Wgen I try to connect with the realvnc viewer, I get a graphical login window, but after typing in user/password, the same window keeps popping up, no login possible.

11
  • I found realvnc to be too heavyweight for my liking. I wrote up detailed directions for using either tightvnc or tigervnc. If you're not adverse to working at the bash command line, these definitely work: github.com/gitbls/RPiVNCHowTo.
    – bls
    Aug 7, 2019 at 21:10
  • Does your Pi boot to the GUI?
    – Milliways
    Aug 7, 2019 at 22:29
  • I guess we should ask: What is your preferred solution? Connecting via VNC to your Pi console (which would be running the graphical desktop interface), or connecting to a new virtual desktop, independent of your console desktop?
    – bls
    Aug 8, 2019 at 0:10
  • 1
    What does systemctl status vncserver-x11-serviced.service show? (edit answer into your Question)
    – Milliways
    Aug 8, 2019 at 6:48
  • 1
    It "Cannot find a running X server" so there is NOTHING to connect TO. (Ignore the message on vt1 - there should be a "Found running X server" displayed after this). As we don't know what you have done (wrong) it is difficult to help. It works for the rest of us following the Foundation tutorial - I suggest you try with a clean installation.
    – Milliways
    Aug 8, 2019 at 7:30

2 Answers 2

1

The problem went away when I worked with a (full) buster image which included desktop functionality (but no additional software)

It seems that the lite images from buster and strech did not start the x server functionality properly, nor did the operations described in the links above.

0

The Foundation tutorial VNC (Virtual Network Computing) explains how to setup ReadVNC.

NOTE is there is no screen attached the display will be small, however you can set Default resolution in raspi-config

The tutorial includes instructions for Creating a virtual desktop for headless operation.

2
  • I have tried exactly this. I have set default resolution to 85. I have created a virtual desktop. I am using RealVNC VNC viewer, latest version. I have started vnc server and it shows the IP to which I should connect. However, when I try to connect to the virtual desktop created (192.168.178.49:1), I get a timeout, and when I try to connect to 192.168.178.49, I get a "desktop cannot be displayed". I have tried to switch on boot to display in raspi-config, makes no difference.
    – tfv
    Aug 8, 2019 at 5:33
  • Something seems strange with my vncserver process. The command vncserver delivers no error and shows the IP to which I should connect. However vncserver -kill :1 does not work (XServer process cannot be terminated), and repeating the vncserver command does not count up the display numbers, but always hands back 192.168.178.49:1 .
    – tfv
    Aug 8, 2019 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.