Sunday, August 24, 2008

How to enable remote desktop connection in linux server and VPS

yum -y groupinstall "KDE (K Desktop Environment)
yum -y install vnc vnc-server firefox x11-xorg
Now, you'll see VNC server is running by executing: "ps -ef |grep vncserver" -- good. Now kill the VNC process like so: "pkill -9 vnc" and then delete the temp sockets by: "rm -rf /tmp/.X1*" -- be careful when running rm -rf as root, you could have a typo and do rm -rf / by accident and destroy your VPS!

At this point you have to go into the /.vnc directory, edit the xstartup file and delete the last line (usually has twm & or something), and replace it with: "startkde &" (without the quotes) -- this tells VNC to startup KDE instead of the default window manager, twm (or whatever the last line was).

Your pretty much done at this point, go ahead and execute the command 'vncserver' again, and VNC will startup, using the password specified earlier and create a default VNC instance on VNC port 1.

Give it a few minutes, depending on your VPS specs, to let KDE start up for the first time. Start up your RealVNC client on your PC, and put in :1, and it should ask for your password that you put in earlier. If you dont see the KDE desktop, check your xstartup file again in /.vnc and make sure the last line is 'startkde &'.



Cheers!!!

No comments: