{"id":4289,"date":"2013-01-25T00:09:44","date_gmt":"2013-01-24T16:09:44","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=4289"},"modified":"2023-04-28T09:48:57","modified_gmt":"2023-04-28T09:48:57","slug":"how-to-setup-vnc-server-on-centos-6-3","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-setup-vnc-server-on-centos-6-3\/","title":{"rendered":"How to Setup VNC Server on CentOS 6.3"},"content":{"rendered":"<p><img decoding=\"async\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-1024x369.png\" alt=\"VNC Server on CentOS\" width=\"1024\" height=\"369\" class=\"img-fluid alignnone size-large wp-image-13566 lazyload\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-1024x369.png 1024w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-300x108.png 300w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-128x46.png 128w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-420x151.png 420w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-540x195.png 540w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-720x259.png 720w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-960x346.png 960w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-1140x411.png 1140w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-1320x476.png 1320w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS-1280x461.png 1280w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/VNC-Server-on-CentOS.png 1404w\" data-sizes=\"(max-width: 1024px) 100vw, 1024px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 1024px; --smush-placeholder-aspect-ratio: 1024\/369;\" \/><\/p>\n<p>VNC is a protocol that is used to display an X windows session running on another computer over the network. VNC server must be install at the target(destination) workstation and source or client will access the target workstatio using VNC client. In this post, it was assumed that the VNC server will be install on CentOS 6.3 and will be access by Win XP client using portable VNC client(VNC viewer). Meaning to say that the desktop on CentOS will be shared with others. If you are running CentOS 5 and below, yum command install will recognize vnc-server. But in CentOS 6, If you are running CentOS 6, the server is: tigervnc-server not: vnc-server will be replace with tigervnc-server not.<\/p>\n<p>1. Install VNC server on CentOS 6.3 using yum command :<\/p>\n<pre>[root@CentOS6 ~]# yum install tigervnc-server -y<\/pre>\n<p>2. As a root, create the user that will use VNC user accounts :<\/p>\n<pre>[root@CentOS6 ~]# useradd ehowstuff\r\n[root@CentOS6 ~]# useradd mhstar\r\n[root@CentOS6 ~]# passwd ehowstuff\r\n[root@CentOS6 ~]# passwd mhstar<\/pre>\n<p>3. Edit \/etc\/sysconfig\/vncservers, and add the following :<\/p>\n<pre>VNCSERVERS=\"1:ehowstuff 2:mhstar\"\r\nVNCSERVERARGS[1]=\"-geometry 800x600\"\r\nVNCSERVERARGS[2]=\"-geometry 640x480\"<\/pre>\n<p>ehowstuff will have an 800 by 600 screen and mhstar will have a 640&#215;480 screen.<\/p>\n<p>4. Set VNC passwords for each users :<\/p>\n<pre>[root@CentOS6 ~]# su - ehowstuff\r\n[ehowstuff@CentOS6 ~]$ vncpasswd\r\nPassword:\r\nVerify:\r\n[ehowstuff@CentOS6 ~]$ cd .vnc\r\n[ehowstuff@CentOS6 .vnc]$ ls\r\npasswd\r\n[ehowstuff@CentOS6 .vnc]$ exit\r\nlogout<\/pre>\n<pre>[root@CentOS6 ~]# su - mhstar\r\n[mhstar@CentOS6 ~]$ vncpasswd\r\nPassword:\r\nVerify:\r\n[mhstar@CentOS6 ~]$ cd .vnc\r\n[mhstar@CentOS6 .vnc]$ ls\r\npasswd\r\n[mhstar@CentOS6 .vnc]$ exit\r\nlogout<\/pre>\n<p>Switch user into the account for each user. Run vncpasswd will create the ~\/.vnc directory.<\/p>\n<p>5. Start vncserver as a root :<\/p>\n<pre>[root@CentOS6 ~]# service vncserver start\r\nStarting VNC server: 1:ehowstuff xauth:  creating new authority file \/home\/ehowstuff\/.Xauthority\r\nxauth: (stdin):1:  bad display name \"CentOS6.3:1\" in \"add\" command\r\n\r\nNew 'CentOS6.3:1 (ehowstuff)' desktop is CentOS6.3:1\r\n\r\nCreating default startup script \/home\/ehowstuff\/.vnc\/xstartup\r\nStarting applications specified in \/home\/ehowstuff\/.vnc\/xstartup\r\nLog file is \/home\/ehowstuff\/.vnc\/CentOS6.3:1.log\r\n\r\n2:mhstar xauth:  creating new authority file \/home\/mhstar\/.Xauthority\r\nxauth: (stdin):1:  bad display name \"CentOS6.3:2\" in \"add\" command\r\n\r\nNew 'CentOS6.3:2 (mhstar)' desktop is CentOS6.3:2\r\n\r\nCreating default startup script \/home\/mhstar\/.vnc\/xstartup\r\nStarting applications specified in \/home\/mhstar\/.vnc\/xstartup\r\nLog file is \/home\/mhstar\/.vnc\/CentOS6.3:2.log\r\n\r\n                                                           [  OK  ]<\/pre>\n<p>6. Stopping the vncserver as root :<\/p>\n<pre>[root@CentOS6 ~]# service vncserver stop\r\nShutting down VNC server: 1:ehowstuff 2:mhstar             [  OK  ]<\/pre>\n<p>7. Set the VNC service to be automatically start at boot :<\/p>\n<pre>[root@CentOS6 ~]# chkconfig vncserver on<\/pre>\n<p>8. Use VNC viewer to connect VNC server :<\/p>\n<p><img decoding=\"async\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/1.png\" alt=\"1\" width=\"374\" height=\"370\" class=\"img-fluid alignnone size-full wp-image-13564 lazyload\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/1.png 374w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/1-300x297.png 300w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/1-128x127.png 128w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/1-120x120.png 120w\" data-sizes=\"(max-width: 374px) 100vw, 374px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 374px; --smush-placeholder-aspect-ratio: 374\/370;\" \/><\/p>\n<p>Example :<\/p>\n<p><img decoding=\"async\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/2.png\" alt=\"2\" width=\"808\" height=\"662\" class=\"img-fluid alignnone size-full wp-image-13565 lazyload\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/2.png 808w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/2-300x246.png 300w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/2-128x105.png 128w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/2-420x344.png 420w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/2-540x442.png 540w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2013\/01\/2-720x590.png 720w\" data-sizes=\"(max-width: 808px) 100vw, 808px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 808px; --smush-placeholder-aspect-ratio: 808\/662;\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>VNC is a protocol that is used to display an X windows session running on another computer over the network. VNC server must be install at the target(destination) workstation and&#8230;<\/p>\n","protected":false},"author":6,"featured_media":13566,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2055,1086],"tags":[1244,1254,1536,1900],"class_list":["post-4289","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-vnc","tag-centos","tag-centos-6-3","tag-linux","tag-vnc"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4289","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=4289"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4289\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/13566"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=4289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=4289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=4289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}