{"id":7811,"date":"2021-06-28T03:24:27","date_gmt":"2021-06-28T03:24:27","guid":{"rendered":"https:\/\/linuxways.net\/?p=7811"},"modified":"2021-06-28T03:24:27","modified_gmt":"2021-06-28T03:24:27","slug":"how-to-install-vnc-server-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-vnc-server-on-ubuntu-20-04\/","title":{"rendered":"How to Install VNC Server on Ubuntu 20.04"},"content":{"rendered":"<h2>Introduction:<\/h2>\n<p>Virtual Network Computing (VNC) is a visual screen-sharing solution that lets you operate another device remotely using your touchpad. It is a fair and democratic replacement to Microsoft&#8217;s RDP (remote access protocol). TigerVNC, TightVNC, Vino, vnc4server, and far more applications are existing to remotely control Linux-based desktops. TigerVNC is a high-performance VNC server that may be used to remotely manage or view Linux-based desktops. It is fair and democratic. It is indeed a client\/server program that lets you communicate with graphical programs on other computers. In this tutorial, we will guide you to install and configure the TigerVNC server on your Ubuntu 20.04.<\/p>\n<h2>Update Ubuntu 20.04:<\/h2>\n<p>To get started with VNC Server, we need to first update our system and apt package. Open the terminal suing Ctrl+Alt+T, and write the below query in it for the update. It requires a sudo password to execute. Add root account password and tap Enter. It takes a little while to get completed.<\/p>\n<pre><strong>$ sudo apt update &amp;&amp; sudo apt upgrade<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"72\" class=\"wp-image-7812\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-894.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-894.png 662w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-894-300x33.png 300w\" sizes=\"auto, (max-width: 662px) 100vw, 662px\" \/><\/p>\n<h2>Configure Desktop Environment:<\/h2>\n<p>Let&#8217;s start by installing a Desktop Environment on our Linux platform, which isn&#8217;t included by default. There are several options, including GNOME, MATE, XFCE, and others. In this lesson, we&#8217;ll use the XFCE desktop environment. It is indeed a minimalistic desktop environment that aids in maintaining a reliable and seamless VNC connection. Try the stated query:<\/p>\n<pre><strong>$ sudo apt install xfce4 xfce4-goodies<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"532\" height=\"73\" class=\"wp-image-7813\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-895.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-895.png 532w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-895-300x41.png 300w\" sizes=\"auto, (max-width: 532px) 100vw, 532px\" \/><\/p>\n<p>Tap \u201cy\u201d to affirm the process of installation. Otherwise, press \u201cn\u201d to stop it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"73\" class=\"wp-image-7814\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-896.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-896.png 719w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-896-300x30.png 300w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p>Select Package configuration and hit the OK button.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"451\" class=\"wp-image-7815\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-897.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-897.png 700w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-897-300x193.png 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<h2>Install TightVNC Server:<\/h2>\n<p>Configure the TightVNC server modules after finishing the XFCE workspace deployment. Additional prominent VNC servers include TigerVNC as well as x11vnc. Use the apt query to install the packages listed underneath. Add the sudo password to continue the process.<\/p>\n<pre><strong>$ sudo apt install tightvncserver<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"496\" height=\"90\" class=\"wp-image-7816\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-898.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-898.png 496w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-898-300x54.png 300w\" sizes=\"auto, (max-width: 496px) 100vw, 496px\" \/><\/p>\n<h2>Launch VNC Server:<\/h2>\n<p>To enable or launch the VNC server we need a very simple below command to be executed in the shell as follows:<\/p>\n<pre><strong>$ vncserver<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"565\" height=\"113\" class=\"wp-image-7817\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-899.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-899.png 565w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-899-300x60.png 300w\" sizes=\"auto, (max-width: 565px) 100vw, 565px\" \/><\/p>\n<p>As we haven\u2019t given any password to our server, hence we need to the add-up password for our server. In this case, add the below password command in the shell to do so. It will ask you to enter the password and verify it by adding it again. After that, it will ask you if you want to add some view-only passwords. Press \u201cY\u201d to affirm, otherwise hit \u201cn\u201d to quit. You can see, as we have added \u201cy\u201d. Hence it asked for the password. Enter the password and then verify it by adding it again.<\/p>\n<pre><strong>$ vncpasswd<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"490\" height=\"130\" class=\"wp-image-7818\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-900.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-900.png 490w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-900-300x80.png 300w\" sizes=\"auto, (max-width: 490px) 100vw, 490px\" \/><\/p>\n<h2>Configure VNC Server:<\/h2>\n<p>Upon starting the server, it created a configuration file. It&#8217;s important to set up the VNC server to begin at the same time as the Ubuntu server. Furthermore, you must specify which User Interface the VNC server would join. Let&#8217;s start by terminating the existing VNC server instance at TCP port 5901:<\/p>\n<pre><strong>$ vncserver \u2013kill :1<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"369\" height=\"38\" class=\"wp-image-7819\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-901.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-901.png 369w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-901-300x31.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/p>\n<p>Now we need to create a backup of a configuration file i.e. xstartup. Hence try out the below \u201ccp\u201d query in the shell for backup.<\/p>\n<pre><strong>$ cp ~\/.vnc\/xstartup ~\/.vnc\/xstartup.bak<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"547\" height=\"22\" class=\"wp-image-7820\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-902.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-902.png 547w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-902-300x12.png 300w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/><\/p>\n<p>Now open the configuration file by any of your favorite editors. We have been using the GNU nano editor in our case to open it as below.<\/p>\n<pre><strong>$ nano ~\/.vnc\/xstartup <\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"386\" height=\"21\" class=\"wp-image-7821\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-903.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-903.png 386w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-903-300x16.png 300w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><\/p>\n<p>Now the file has been opened, update it with the below-presented code in the image. Save the file with Ctrl+S, and quit it via the Ctrl+X shortcut.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"508\" height=\"93\" class=\"wp-image-7822\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-904.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-904.png 508w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-904-300x55.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-904-501x93.png 501w\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" \/><\/p>\n<p>Restart your VNC Server once again using the query below.<\/p>\n<pre><strong>$ vncserver -localhost<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"587\" height=\"114\" class=\"wp-image-7823\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-905.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-905.png 587w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-905-300x58.png 300w\" sizes=\"auto, (max-width: 587px) 100vw, 587px\" \/><\/p>\n<h2>Connect Server:<\/h2>\n<p>The last but most important part is to connect with the server. Make sure you have the \u201cSSH\u201d package installed. Let\u2019s first check the local servers.<\/p>\n<pre><strong>$ ss -ltn<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"704\" height=\"257\" class=\"wp-image-7824\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-906.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-906.png 704w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-906-300x110.png 300w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/p>\n<p>Navigate towards the system folder via the below \u201ccd\u201d command. After that, use any of the editor to create and open the vncserver@.service file.<\/p>\n<pre><strong>$ cd \/etc\/system\/system<\/strong><\/pre>\n<pre><strong>$ vim vncserver@.service<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"564\" height=\"40\" class=\"wp-image-7825\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-907.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-907.png 564w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-907-300x21.png 300w\" sizes=\"auto, (max-width: 564px) 100vw, 564px\" \/><\/p>\n<p>Update the file with the below code and quit.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"614\" height=\"303\" class=\"wp-image-7826\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-908.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-908.png 614w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-908-300x148.png 300w\" sizes=\"auto, (max-width: 614px) 100vw, 614px\" \/><\/p>\n<p>Now add the below command to connect with the SSH tunnel locally. You can see that the process is successful after adding answers to some affirmations.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"704\" height=\"146\" class=\"wp-image-7827\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-909.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-909.png 704w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/06\/word-image-909-300x62.png 300w\" sizes=\"auto, (max-width: 704px) 100vw, 704px\" \/><\/p>\n<h2>Conclusion:<\/h2>\n<p>We have seen how to install and configure VNC Server on Ubuntu 20.04. Along with that we have also seen, how to create a password on the server as well as how to connect with it.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction: Virtual Network Computing (VNC) is a visual screen-sharing solution that lets you operate another device remotely using your touchpad. It is a fair and democratic replacement to&hellip;<\/p>","protected":false},"author":1,"featured_media":7842,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[100,395],"class_list":["post-7811","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-ubuntu-20-04","tag-vnc-server"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/7811","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=7811"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/7811\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/7842"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=7811"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=7811"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=7811"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}