RaspberryPi

What to do when Raspberry Pi has a VNC connection error

In this article, I showed how to remotely control a Raspberry Pi from a Windows PC.

However, when I turned off Raspberry Pi and tried to connect remotely again, I could no longer connect to Raspberry Pi.

I show what I did to resolve the VNC connection error.

Contents

  • Error details
  • How to switch to boot a Raspberry Pi in desktop mode
  • How to display in HDMI mode

sponsored link

Error details : "Cannot currently show the desktop"

In the beginning, I show error dedails.

When I tried to connect remotely to the Raspberry Pi using VNC viewer, this screen appeared and I could not connect.

To connect remotely to Raspberry Pi, I did two things.

I will show them in order.

スポンサーリンク

How to switch to boot a Raspberry Pi in desktop mode

To display the Raspberry Pi screen using VNC connection, the Raspberry Pi must be booted in desktop mode.

To boot Raspberry Pi in desktop mode, Change settings by using the Configuration Tool.

Enter the following command in the terminal.

$ sudo raspi-config

Select "System Options".

Next, select "Boot / Auto Login".

Select "Desktop".

Reboot Raspberry Pi.

$ sudo reboot

スポンサーリンク

How to display in HDMI mode

If the aforementioned method does not work, try this one.

This setting allows you to force output in HDMI mode even if no HDMI cable is plugged in.

In the author's environment, VNC connection is now possible with this setting.

Rewrite the configuration file "config.txt".

Enter the following command in the terminal.

$ sudo nano /boot/config.txt

In "config.txt", find the following description and uncomment it.

"# hdmi_force_hotplug=1"

Overwrite and save the modified "config.txt".

Overwrite and save : 「ctrl」+「o」
End : 「ctrl」+「x」

Reboot Raspberry Pi.

$ sudo reboot

summary

I showed you what I did to resolve the VNC connection error.

I hope this article will be helpful to those who have similar problems.

Related articles

How to remote-control Raspberry Pi from Windows PC

How to set a static IP address for RaspberryPi

sponsored link

-RaspberryPi
-