{"id":1348,"date":"2023-04-01T04:42:42","date_gmt":"2023-04-01T04:42:42","guid":{"rendered":"http:\/\/tiemensfamily.com\/timoncs\/?p=1348"},"modified":"2023-04-01T04:42:42","modified_gmt":"2023-04-01T04:42:42","slug":"ubuntu-22-04-vnc-stops-working","status":"publish","type":"post","link":"https:\/\/tiemensfamily.com\/timoncs\/2023\/04\/01\/ubuntu-22-04-vnc-stops-working\/","title":{"rendered":"Ubuntu 22.04 VNC stops working"},"content":{"rendered":"\n<p>My Ubuntu 22.04 virtual machine has been constantly turning off (crashing?) the VNC server.  This is the VNC server that is built-in under Settings -> Sharing -> Remote Desktop -> Enable Legacy VNC Protocol.<\/p>\n\n\n\n<p>One way to restart the VNC server is to uncheck the box, then re-check the box.<\/p>\n\n\n\n<p>However, since that has to be done with a GUI, it is really annoying.<\/p>\n\n\n\n<p>So, here is the script that will stop and then restart the VNC server:<\/p>\n\n\n\n<code>#!\/bin\/env bash<br><br>grdctl vnc disable<br>sleep 5<br>grdctl vnc enable<\/code>\n\n\n\n<p><\/p>\n\n\n\n<p>Using this script, once your VNC server crashes, you can ssh into the machine, run the script from the command line, and then re-establish your VNC session.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Another tip:  be very careful when closing the &#8220;Remote Desktop&#8221; dialog, because the &#8220;X&#8221; to close that dialog is right over the red sliding &#8220;Sharing&#8221; on\/off control.  Be careful that you don&#8217;t accidentally click again, which will disable all Sharing when closing the &#8220;Remote Desktop&#8221; dialog.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My Ubuntu 22.04 virtual machine has been constantly turning off (crashing?) the VNC server. This is the VNC server that is built-in under Settings -> Sharing -> Remote Desktop -> Enable Legacy VNC Protocol. One way to restart the VNC &hellip; <a href=\"https:\/\/tiemensfamily.com\/timoncs\/2023\/04\/01\/ubuntu-22-04-vnc-stops-working\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"https:\/\/tiemensfamily.com\/timoncs\/wp-json\/wp\/v2\/posts\/1348"}],"collection":[{"href":"https:\/\/tiemensfamily.com\/timoncs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tiemensfamily.com\/timoncs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tiemensfamily.com\/timoncs\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/tiemensfamily.com\/timoncs\/wp-json\/wp\/v2\/comments?post=1348"}],"version-history":[{"count":4,"href":"https:\/\/tiemensfamily.com\/timoncs\/wp-json\/wp\/v2\/posts\/1348\/revisions"}],"predecessor-version":[{"id":1352,"href":"https:\/\/tiemensfamily.com\/timoncs\/wp-json\/wp\/v2\/posts\/1348\/revisions\/1352"}],"wp:attachment":[{"href":"https:\/\/tiemensfamily.com\/timoncs\/wp-json\/wp\/v2\/media?parent=1348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tiemensfamily.com\/timoncs\/wp-json\/wp\/v2\/categories?post=1348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tiemensfamily.com\/timoncs\/wp-json\/wp\/v2\/tags?post=1348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}