{"id":177,"date":"2015-04-27T13:21:19","date_gmt":"2015-04-27T13:21:19","guid":{"rendered":"http:\/\/betakb.veeble.org\/?p=177"},"modified":"2025-03-13T11:59:46","modified_gmt":"2025-03-13T06:29:46","slug":"vnc-server","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/vnc-server\/","title":{"rendered":"Installation and configuration of the VNC server"},"content":{"rendered":"\n<p>VNC (Virtual Network Computing) is a graphical desktop-sharing system that can be used to control a remote computer. It transmits mouse and keyboard events from one node to another on a network and updates the graphical screen on the other end of the network. Virtual Network Computing is platform-independent. This server makes use of the RFB (<a href=\"https:\/\/en.wikipedia.org\/wiki\/RFB_(protocol)\" target=\"_blank\" rel=\"noopener\">Remote Frame Buffer<\/a>) protocol.<\/p>\n\n\n\n<p>Virtual Network Computing depends on two modules:<\/p>\n\n\n\n<p>VNC server<\/p>\n\n\n\n<p>and<\/p>\n\n\n\n<p>VNC client<\/p>\n\n\n\n<p>This server listens to the incoming connections from the client. VNC can be used to work on the GUI of your VPS.<\/p>\n\n\n\n<p><\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"please-note-that-veeble-servers-have-vnc-preinstalled\"><strong>Please note that Veeble servers have VNC pre-installed.<\/strong><\/h3>\n\n\n<p>1. First check whether vncserver is installed on the server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">yum list vnc-server. \n<\/pre>\n\n\n\n<p>If not, you can install the package using yum install vnc-server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">yum install vnc-server\n<\/pre>\n\n\n\n<p>2. Set up a vnc password.<\/p>\n\n\n\n<p>Type the &#8221; vncpasswd &#8221; command in the shell. This prompts you to enter the password. You can use a strong password. By default, this is saved in \/root\/.vnc\/passwd<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vncpasswd\n<\/pre>\n\n\n\n<p>3. Open the file \/etc\/sysconfig\/vncservers to set up in session.<\/p>\n\n\n\n<p>At the bottom add the following lines.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">VNCSERVERS=\"1:root\"\nVNCSERVERARGS[1]=\"-geometry 1024x768 -depth 16\"\n \n<\/pre>\n\n\n\n<p>Here 1 means the session number.<\/p>\n\n\n\n<p>4. Install kde and gnome environments.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">yum install kde*\nyum install gnome*\n<\/pre>\n\n\n\n<p>5. Setting up vnc startup script.<\/p>\n\n\n\n<p>Open the file \/root\/.vnc\/xstartup and add the following lines to get a KDE desktop.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#!\/bin\/sh\n# Uncomment the following two lines for normal desktop:\nunset SESSION_MANAGER\nstartkde &amp;\n<\/pre>\n\n\n\n<p>You can comment on the previous entries.<\/p>\n\n\n\n<p>6. start vnc session<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vncserver&nbsp;:1 \n<\/pre>\n\n\n\n<p>and check whether you are able to telnet to port 5901<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">root@proxy:~# telnet 123.45.2.6 5901\nTrying 123.45.2.6...\nConnected to 123.45.2.6.\nEscape character is '^]'.\nRFB 003.008\n<\/pre>\n\n\n\n<p>If you are not able to connect, make sure that port 5901 is open.<\/p>\n\n\n\n<p>8. Testing vnc.<\/p>\n\n\n\n<p>You can download the VNC client from <a class=\"external text\" href=\"http:\/\/www.realvnc.com\/cgi-bin\/download.cgi\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a><\/p>\n\n\n\n<p>After downloading and extracting the VNC client in your Windows machine, open vnc client. In the server field, enter the following details.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">serverip:1\n<\/pre>\n\n\n\n<p>This prompts you to enter the vnc password. If everything goes well, you will be able to see the KDE desktop.<\/p>\n\n\n\n<p>7. To kill a vnc session, use<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vncserver -kill&nbsp;:1\n<\/pre>\n\n\n<h4 class=\"wp-block-heading\" id=\"or\"><span id=\"OR\" class=\"mw-headline\">OR<\/span><\/h4>\n\n\n<p>Download the GNOME Desktop environment to your server:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">yum groupinstall \"Desktop\"\n<\/pre>\n\n\n\n<p>After installing the GNOME Desktop environment then start to install the TigerVNC server<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">yum install tigervnc-server xorg-x11-fonts-Type1\n<\/pre>\n\n\n\n<p>Now your VNC is installed on your CentOS 6.<\/p>\n\n\n\n<p>Start the VNC server.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vncserver\n<\/pre>\n\n\n\n<p>This asks you to enter the password now.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"vnc-client\"><span id=\"VNC_Client\" class=\"mw-headline\">VNC Client<\/span><\/h2>\n\n\n<p>Now time to connect to your VNC Server:<\/p>\n\n\n\n<p>First download the appropriate VNC client from <a class=\"external text\" href=\"http:\/\/www.realvnc.com\/cgi-bin\/download.cgi\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a><\/p>\n\n\n\n<p>Then use it to connect to your server.<\/p>\n\n\n\n<p>Use the following entry as the VNC address:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">IP:1\n<\/pre>\n\n\n\n<p>Enjoy your VNC Server<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-01577cce wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Managed AWS Hosting Services | Scalable &amp; Reliable Solutions<\/h3><p class=\"uagb-cta__desc\">Veeble\u2019s Managed AWS Hosting ensures 99.9% uptime, proactive security, and seamless scalability. Let our experts handle server optimization, monitoring, and backups while you focus on growing your business. Start now!<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/managed-aws-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">See Our Pricing<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>VNC (Virtual Network Computing) is a graphical desktop-sharing system that can be used to control a remote computer. It transmits mouse and keyboard events [&hellip;]<\/p>\n","protected":false},"author":10,"featured_media":7782,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[3],"tags":[],"class_list":["post-177","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-installation"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Installation-and-configuration-of-the-VNC-server.jpg",1366,768,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Installation-and-configuration-of-the-VNC-server-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Installation-and-configuration-of-the-VNC-server-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Installation-and-configuration-of-the-VNC-server-768x432.jpg",768,432,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Installation-and-configuration-of-the-VNC-server-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Installation-and-configuration-of-the-VNC-server.jpg",1366,768,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/Installation-and-configuration-of-the-VNC-server.jpg",1366,768,false]},"uagb_author_info":{"display_name":"Vipin Raj","author_link":"https:\/\/www.veeble.com\/kb\/author\/vipin\/"},"uagb_comment_info":0,"uagb_excerpt":"VNC (Virtual Network Computing) is a graphical desktop-sharing system that can be used to control a remote computer. It transmits mouse and keyboard events [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=177"}],"version-history":[{"count":8,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/177\/revisions"}],"predecessor-version":[{"id":8041,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/177\/revisions\/8041"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/7782"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}