{"id":29,"date":"2014-11-24T04:09:00","date_gmt":"2014-11-24T04:09:00","guid":{"rendered":"http:\/\/www.asianux.org.vn\/index.php\/2014\/11\/24\/how-to-install-vnc-on-centos-6\/"},"modified":"2014-11-24T04:09:00","modified_gmt":"2014-11-24T04:09:00","slug":"how-to-install-vnc-on-centos-6","status":"publish","type":"post","link":"https:\/\/www.asianux.org.vn\/index.php\/2014\/11\/24\/how-to-install-vnc-on-centos-6\/","title":{"rendered":"How to install vnc on centos 6"},"content":{"rendered":"<h1 style=\"background-color: white; clear: both; color: #222222; font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 30px; font-weight: normal; height: auto; line-height: 31px; margin: 0px; padding: 0px; width: 614px;\">VNC server<\/h1>\n<h1 style=\"background-color: white; clear: both; color: #222222; font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 30px; font-weight: normal; height: auto; line-height: 31px; margin: 0px; padding: 0px; width: 614px;\"><span style=\"font-size: 16px; line-height: 30px;\">VNC is used to display X windows sessions on remote computers.In this tutorial, we can learn how to setup VNC server on centos 6. Desktop environment is required in order to enable VNC server on centos.<\/span><\/h1>\n<h1 style=\"background-color: white; clear: both; color: #222222; font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 30px; font-weight: normal; height: auto; line-height: 31px; margin: 0px; padding: 0px; width: 614px;\">Install VNC on Centos 6<\/h1>\n<div style=\"background-color: white; color: #222222; font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;\">Before installing VNC server, make sure you have installed any Desktop environment.<br \/><strong>Step 1 \u00bb<\/strong>&nbsp;Issue the below command to install gnome desktop environment.<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">[root@krizna ~]# yum groupinstall Desktop<\/code><br \/><strong>Step 2 \u00bb<\/strong>&nbsp;After installing gnome packages .Issue the below command to install VNC package along with dependencies.<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">[root@krizna ~]# yum -y install tigervnc-server pixman pixman-devel libXfont<\/code><br \/><strong>Step 3 \u00bb<\/strong>&nbsp;Create user name and password.<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">[root@krizna ~]# adduser user1<br \/>[root@krizna ~]# adduser user2<br \/>[root@krizna ~]# passwd user1<br \/>[root@krizna ~]# passwd user2<\/code><br \/><strong>Step 4 \u00bb<\/strong>&nbsp;Create VNC passwords for the Users created.<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">[root@krizna ~]# su - user1<br \/>[user1@krizna ~]$ vncpasswd<br \/>Password:<br \/>Verify:<br \/>[user1@krizna ~]$ logout<br \/>[root@krizna ~]# su - user2<br \/>[user2@krizna ~]$ vncpasswd<br \/>Password:<br \/>Verify:<br \/>[user2@krizna ~]$ logout<\/code><br \/><strong>Step 5 \u00bb<\/strong>&nbsp;Now open&nbsp;<strong>\/etc\/sysconfig\/vncservers<\/strong>&nbsp;file and add the following lines at the end of the file( Edit as per your usernames ).<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">VNCSERVERS=\"1:user1 2:user2\"<br \/>VNCSERVERARGS[1]=\"-geometry 640x480\"<br \/>VNCSERVERARGS[2]=\"-geometry 800x600\"<\/code><br \/>Here we have configured session 1 with 640\u00d7480 resolution for the user \u201cuser1\u2033 and session 2 with 800\u00d7600 resolution for the user \u201cuser2\u2033.<br \/><strong>Step 6 \u00bb<\/strong>&nbsp;Start vnc service<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">[root@krizna ~]# service vncserver start<\/code><br \/>and issue this command to start vnc service automatically during startup.<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">[root@krizna ~]# chkconfig --levels 235 vncsever on<\/code><br \/><strong>Step 7 \u00bb<\/strong>&nbsp;Now in remote machine, start vncviewer type the IP and session as below to view their respective sessions.<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">192.168.1.10:1 for user1<br \/>192.168.1.10:2 for user2<\/code><br \/><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/11\/361x205xinstall-vnc-server-centos6-1.jpg.pagespeed.ic_.Jal_nhTiNC.jpg\" style=\"color: #0f4884; text-decoration: none;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" alt=\"install vnc on centos 6\" class=\"aligncenter size-full wp-image-1351\" height=\"205\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/11\/361x205xinstall-vnc-server-centos6-1.jpg.pagespeed.ic_.Jal_nhTiNC-300x170.jpg\" style=\"border: 1px solid rgb(230, 230, 230); clear: both; display: block; margin: 10px auto; max-width: 100%; padding: 5px;\" width=\"361\" title=\"\"><\/a><br \/><strong>Users sessions<\/strong>.<br \/><a href=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/11\/600x533xinstall-vnc-server-centos6.jpg.pagespeed.ic_.i7TKEEzAEA.jpg\" style=\"color: #0f4884; text-decoration: none;\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" alt=\"install vnc server centos 6\" class=\"aligncenter size-full wp-image-1352\" height=\"533\" src=\"http:\/\/onlinelab.info\/wp-content\/uploads\/2014\/11\/600x533xinstall-vnc-server-centos6.jpg.pagespeed.ic_.i7TKEEzAEA-300x267.jpg\" style=\"border: 1px solid rgb(230, 230, 230); clear: both; display: block; margin: 10px auto; max-width: 100%; padding: 5px;\" width=\"600\" title=\"\"><\/a><\/div>\n<h1 style=\"background-color: white; clear: both; color: #222222; font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 30px; font-weight: normal; height: auto; line-height: 31px; margin: 0px; padding: 0px; width: 614px;\">Troubleshooting<\/h1>\n<div style=\"background-color: white; color: #222222; font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;\">\u00bb Check the iptables in the server, if you are not able to connect the sessions.<br \/>Issue the below command to stop iptables service.<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">[root@krizna ~]# service iptables stop<\/code><br \/>try again.<br \/>\u00bb you might receive the below error while starting the vnc service.<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">\/usr\/bin\/Xvnc: symbol lookup error: \/usr\/bin\/Xvnc: undefined symbol: pixman_composite_trapezoids<br \/>\/usr\/bin\/Xvnc: symbol lookup error: \/usr\/bin\/Xvnc: undefined symbol: pixman_composite_trapezoids<\/code><\/div>\n<div style=\"background-color: white; color: #222222; font-family: Trebuchet, 'Trebuchet MS', Arial, Verdana, sans-serif; font-size: 16px; line-height: 30px;\"><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">[FAILED]<\/code><br \/>Issue the below command to install pixman,pixman-devel and libXfont packages.<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px; padding: 4px;\">[root@krizna ~]# yum -y pixman pixman-devel libXfont<\/code><br \/>[or]<br \/>This command will update everything .<br \/><code style=\"background-color: #0e0e0e; border-radius: 5px; color: white; display: block; font-family: Verdana, 'MS Sans Serif', sans-serif, serif; font-size: 14px; line-height: 25px;\n padding: 4px;\">[root@krizna ~]# yum update<\/code><br \/>and restart the VNC service and try again.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>VNC server VNC is used to display X windows sessions on remote computers.In this tutorial, we can learn how to setup VNC server on centos 6. Desktop environment is required in order to enable VNC&hellip;<\/p>\n","protected":false},"author":1,"featured_media":75,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,8],"tags":[],"class_list":["post-29","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-monitoring"],"_links":{"self":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/29","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/comments?post=29"}],"version-history":[{"count":0,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/posts\/29\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/media?parent=29"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/categories?post=29"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.asianux.org.vn\/index.php\/wp-json\/wp\/v2\/tags?post=29"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}