{"id":437,"date":"2022-09-14T20:00:00","date_gmt":"2022-09-14T11:00:00","guid":{"rendered":"https:\/\/python-academia.com\/en\/?p=437"},"modified":"2022-09-07T23:27:45","modified_gmt":"2022-09-07T14:27:45","slug":"raspberrypi-vnc-erorr","status":"publish","type":"post","link":"https:\/\/python-academia.com\/en\/raspberrypi-vnc-erorr\/","title":{"rendered":"What to do when Raspberry Pi has a VNC connection error"},"content":{"rendered":"\n<p><a href=\"https:\/\/python-academia.com\/en\/raspberrypi-remote\/\">In this article<\/a>, I showed how to remotely control a Raspberry Pi from a Windows PC.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>However, when I turned off Raspberry Pi and tried to connect remotely again, I could no longer connect to Raspberry Pi.<\/p>\n\n\n\n<p>I show <span class=\"st-mymarker-s\">what I did to resolve the VNC connection error<\/span>.<\/p>\n\n\n\n<div class=\"wp-block-st-blocks-midashi-box freebox has-title\" style=\"background-color:#eceff1;border-color:#263238;border-radius:0 5px 5px 5px\"><p class=\"p-free\" style=\"border-color:#263238;font-weight:bold\"><span class=\"p-entry-f\" style=\"color:#ffffff;font-weight:bold;background-color:#263238;border-radius:0 0 5px 0\"><i class=\"st-fa st-svg-file-text-o st-css-no\" aria-hidden=\"\"><\/i>Contents<\/span><\/p><div class=\"free-inbox\">\n<p><\/p>\n\n\n\n<ul><li>Error details<\/li><li>How to switch to boot a Raspberry Pi in desktop mode<\/li><li>How to display in HDMI mode<\/li><\/ul>\n\n\n\n<p><\/p>\n<\/div><\/div>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Error details : &#8220;Cannot currently show the desktop&#8221;<\/h2>\n\n\n\n<p>In the beginning, I show error dedails.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>When I tried to connect remotely to the Raspberry Pi using VNC viewer, this screen appeared and I could not connect.<\/p>\n\n\n<div class=\"wp-block-image is-style-st-photo-shadow\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"561\" height=\"380\" src=\"https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror1.jpg\" alt=\"\" class=\"wp-image-459\" srcset=\"https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror1.jpg 561w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror1-300x203.jpg 300w\" sizes=\"(max-width: 561px) 100vw, 561px\" \/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>To connect remotely to Raspberry Pi, I did two things.<\/p>\n\n\n\n<p>I will show them in order.<\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"color:#666;margin-bottom:5px;\">\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af<\/p>\n\n<table>\n<tbody>\n<tr>\n<td>\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6354467409705666\"\n     crossorigin=\"anonymous\"><\/script>\n<!-- py-article-doubleA -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:336px;height:300px\"\n     data-ad-client=\"ca-pub-6354467409705666\"\n     data-ad-slot=\"1820454727\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n<\/td>\n\n<td>\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6354467409705666\"\n     crossorigin=\"anonymous\"><\/script>\n<!-- py-article-doubleB -->\n<ins class=\"adsbygoogle\"\n     style=\"display:inline-block;width:336px;height:300px\"\n     data-ad-client=\"ca-pub-6354467409705666\"\n     data-ad-slot=\"3395043238\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">How to switch to boot a Raspberry Pi in desktop mode<\/h2>\n\n\n\n<p>To display the Raspberry Pi screen using VNC connection, <span class=\"st-mymarker-s\">the Raspberry Pi must be booted in desktop mode.<\/span><\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>To boot Raspberry Pi in desktop mode, Change settings by using the Configuration Tool.<\/p>\n\n\n\n<p>Enter the following command in the terminal.<\/p>\n\n\n\n<pre class=\"wp-block-code line-numbers\"><code>$ sudo raspi-config<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Select &#8220;System Options&#8221;.<\/p>\n\n\n<div class=\"wp-block-image is-style-st-photo-shadow\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror3-1024x473.jpg\" alt=\"\" class=\"wp-image-479\" width=\"768\" height=\"355\" srcset=\"https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror3-1024x473.jpg 1024w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror3-300x139.jpg 300w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror3-768x355.jpg 768w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror3.jpg 1098w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Next, select &#8220;Boot \/ Auto Login&#8221;.<\/p>\n\n\n<div class=\"wp-block-image is-style-st-photo-shadow\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror4-1024x475.jpg\" alt=\"\" class=\"wp-image-482\" width=\"768\" height=\"356\" srcset=\"https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror4-1024x475.jpg 1024w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror4-300x139.jpg 300w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror4-768x356.jpg 768w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror4.jpg 1093w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Select &#8220;Desktop&#8221;.<\/p>\n\n\n<div class=\"wp-block-image is-style-st-photo-shadow\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror6-1024x466.jpg\" alt=\"\" class=\"wp-image-485\" width=\"768\" height=\"350\" srcset=\"https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror6-1024x466.jpg 1024w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror6-300x136.jpg 300w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror6-768x349.jpg 768w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror6.jpg 1093w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Reboot Raspberry Pi.<\/p>\n\n\n\n<pre class=\"wp-block-code line-numbers\"><code>$ sudo reboot<\/code><\/pre>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"color:#666;margin-bottom:5px;\">\u30b9\u30dd\u30f3\u30b5\u30fc\u30ea\u30f3\u30af<\/p>\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6354467409705666\"\n     crossorigin=\"anonymous\"><\/script>\n<!-- py-article-display -->\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-ad-client=\"ca-pub-6354467409705666\"\n     data-ad-slot=\"6239864271\"\n     data-ad-format=\"auto\"\n     data-full-width-responsive=\"true\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n\n\n\n<h2 class=\"wp-block-heading\">How to display in HDMI mode<\/h2>\n\n\n\n<p>If the aforementioned method does not work, try this one.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><span class=\"st-mymarker-s\">This setting allows you to force output in HDMI mode even if no HDMI cable is plugged in<\/span>.<\/p>\n\n\n\n<p>In the author&#8217;s environment, VNC connection is now possible with this setting.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Rewrite the configuration file &#8220;config.txt&#8221;.<\/p>\n\n\n\n<p>Enter the following command in the terminal.<\/p>\n\n\n\n<pre class=\"wp-block-code line-numbers\"><code>$ sudo nano \/boot\/config.txt<\/code><\/pre>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>In &#8220;config.txt&#8221;, find the following description and uncomment it.<\/p>\n\n\n\n<p>&#8220;# hdmi_force_hotplug=1&#8221;<\/p>\n\n\n<div class=\"wp-block-image is-style-st-photo-shadow\">\n<figure class=\"aligncenter size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror2-1024x604.jpg\" alt=\"\" class=\"wp-image-499\" width=\"768\" height=\"453\" srcset=\"https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror2-1024x604.jpg 1024w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror2-300x177.jpg 300w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror2-768x453.jpg 768w, https:\/\/python-academia.com\/en\/wp-content\/uploads\/sites\/2\/2022\/08\/VNCerror2.jpg 1031w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Overwrite and save the modified &#8220;config.txt&#8221;.<\/p>\n\n\n\n<p>Overwrite and save : \u300cctrl\u300d+\u300co\u300d<br>End : \u300cctrl\u300d+\u300cx\u300d<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Reboot Raspberry Pi.<\/p>\n\n\n\n<pre class=\"wp-block-code line-numbers\"><code>$ sudo reboot<\/code><\/pre>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">summary<\/h2>\n\n\n\n<p>I showed you what I did to resolve the VNC connection error.<\/p>\n\n\n\n<p>I hope this article will be helpful to those who have similar problems.<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Related articles<\/p>\n\n\n\n<p class=\"is-style-st-paragraph-memo\"><a href=\"https:\/\/python-academia.com\/en\/raspberrypi-remote\/\">How to remote-control Raspberry Pi from Windows PC<\/a><br><br><a href=\"https:\/\/python-academia.com\/en\/raspberrypi-static-ipaddress\/\">How to set a static IP address for RaspberryPi<\/a><\/p>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"color:#666;margin-bottom:5px;\">sponsored link<\/p>\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6354467409705666\"\n     crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\"\n     style=\"display:block\"\n     data-matched-content-rows-num=\"4,2\"\n     data-matched-content-columns-num=\"1,4\"\n     data-matched-content-ui-type=\"image_stacked,image_stacked\"\n     data-ad-format=\"autorelaxed\"\n     data-ad-client=\"ca-pub-6354467409705666\"\n     data-ad-slot=\"2243394422\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>In this article, I showed how to remotely control a Raspberry Pi from a Windows PC. However, when I  &#8230; <\/p>\n","protected":false},"author":1,"featured_media":510,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[24],"_links":{"self":[{"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/posts\/437"}],"collection":[{"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/comments?post=437"}],"version-history":[{"count":61,"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/posts\/437\/revisions"}],"predecessor-version":[{"id":508,"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/posts\/437\/revisions\/508"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/media\/510"}],"wp:attachment":[{"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/media?parent=437"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/categories?post=437"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/python-academia.com\/en\/wp-json\/wp\/v2\/tags?post=437"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}