Control Another Computer Over A Network In Linux

Posted by Ruhaan Ahmed 14 August, 2008

Ever wanted to get help from your friends or wanted to help some friend in doing some specific task, and you wished you could do that using a remote desktop connection but you don’t know how to remotely control a PC, doing so is very easy in Linux I will show you how to do that in this tutorial

We will use two programs for this purpose the first is called KRFB which allows you to create a VNC server so that others can control your computer remotely and the other one is called KRDC which is a VNC client which allows you to control someone’s computer remotely. Both KRFB and KRDC are easily found in the repositories of almost all Linux distro’s so installing them isn’t too much of a hassle

Now if you want someone to control your computer remotely start up krfb and you will get a windows similar to this:

snapshot3

There are two ways in which you can assign a remote desktop session to a person the first is that you click on New Personal Invitation and KRFB will generate a random password and assign a random port and then you can email this info to the person who needs to access your computer remotely. If you don’t want to go through the hassle of having to remember a random password and port you can assign a permanent password and port so that you don’t need to create invitations every time. To do that click on configure and you will get a dialogue box similar to this:

snapshot4

Click on Security and you will get this window:

snapshot6

check allow uninvited connections and the password field will be now writable. Type the password you would like for this demo I am using “mushroomhead” as the password. Click OK and your done, now anyone with your can connect to your computer with any VNC client software they like as long as they have your IP address, port and the password you set.

That’s it you are done with this part now off to controlling someone else’s PC

Now if you want to control another computer remotely you can use KRDC as mentioned earlier when you open up KRDC you will get a windows similar to this:

snapshot7

To connect to a VNC server click on “Connect to a VNC Remote Desktop” and then in the address bar at the top enter the IP followed by the port of the computer you want to control remotely in the following way

192.168.15.248:5900

On pressing enter you will prompted to select the type of connection you are doing the VNC session over.

snapshot8

Select the one you think is correct. Once you click OK you will be asked to enter the password of the VNC server we set this earlier as “mushroomhead”

snapshot9

Once you enter the correct password you will be authenticated and will be able to control the other computer remotely.

Remember: If you are behind a firewall or a router you need to forward the designated port in your firewall/router so that other people can connect to you, You can find easy to follow guides on how to forward ports on PortForward.com

If you enjoyed this post, make sure you subscribe to my RSS Feed
Share and Enjoy:
  • Digg
  • del.icio.us
  • StumbleUpon
  • TwitThis
  • Reddit
  • Facebook
  • Technorati
  • E-mail this story to a friend!
Categories : Linux Tags : , , ,

Trackbacks & Pingbacks
Comments
August 16, 2008

Handy tutorial, but what about when both parties are behind home firewalls and across the city or country? How does one connect to his mother with this setup?

The answer is of course with port forwarding and one party (probably you, not the mother) setting up the firewall to let the connection through — but that part would be a great addition to your tutorial.

Posted by lefty.crupps
August 17, 2008

@lefty.crupps - Yeah lefty.crupps that’s a pretty important thing in such posts, my friend (the writer) forgot to write that, thanks for reminding
Keep Visiting!

Posted by Saad Ibrahim
August 17, 2008

@lefty.crupps ur correct in that write that in my article that ports have to be forwarded

but now at least most people who will be using linux will atleast know how to forward ports on their routers/modems

so i did not think it necessary to include it in the article

Posted by Ruhaan Ahmed
November 15, 2008

What a silly comment!

The value in this guide is lost without the complete tutorial!

In fact, this is worse! Because those who know how to do this sort of thing through MS-Windows on somethng like GoToMyPC, will believe from the title that this will get them the same result.

After investing in the time to go through the process the end result is “no workie!”

The one who posts a simple solution for remote desktop control without the need for IT know-how and details will win-over users to Linux.  Until it is a full solution… it is not a solution!

Port forwarding?  PLEASE!
“…at least most people who will be using linux will atleast know how to forward ports on their routers….”

Let me get this straight…  the guide starts off with “ever wanted to get help from your friend…?”  and it is written under an expectation that even though you need help you know the inner workings of port-forwarding on both ends of the connection!

Come on?!?!

zeddock
PS. No flames necessary.  I hope this perspective might help those of you who know how to do such things, to realize a weakness in an otherwise great OS.  Stop assuming users know… or should be made to learn!  The computer is a tool, not a lifestyle, religion or hobby, for most.

Posted by zeddock
Leave a comment

(required)

(required)