Remotely Control Ubuntu using your IPhone (VNC Setup)

Step I: Setup VNC in Ubuntu:

VNC (Virtual Network Computer) can be setup in Ubuntu in the following four easy steps:

  1. Install VNC package using following command in terminal: sudo apt-get install x11vnc vnc-java
  2. Password Setup command in terminal: x11vnc -storepasswd
  3. Make sure ports 5800 and 5900 are open on your system firewall. You should not bother to do anything in this step however since Ubuntu by default does not firewall anything and once a service is set to listen on a port, there is no further configuration needed. Refer this post if you need further information about opening a port.
  4. Run below command in terminal to launch VNC:
  5. x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5800

  6. Add it for auto-starting in future sessions. Go to System–> Preferences –> Startup Applications. Click on Add button and enter the command in Step 4. This will make sure you have the VNC service up and running after system restarts.

Step II: Setup VNC in IPhone (though the steps should be pretty much the same for any mobile/system):

  1. Install a VNC client from the Apple Store. I use “Mocha VNC Lite” because of its simplicity and ease of configuration.
  2. Run the IPhone application and follow the instructions to connect your IPhone VNC client with the Ubuntu VNC server. Use command ifconfig to get the VNC Server IP on Ubuntu machine. Use 5900 as the default port. Enter the same password as setup in Step 2 above while installing VNC server on Ubuntu machine.

That’s it. Enjoy controlling your Ubuntu system remotely through your smart phone. Below are some screenshots previewing the same.



12 thoughts on “Remotely Control Ubuntu using your IPhone (VNC Setup)

  1. Does the Mocha VNC viewer really need/use the VNC java applet you have set up? I would guess it is standalone vncviewer..

    Also, is it possible to use the VNC java applet on the iphone? (i.e. w/o installing any VNC viewer app) Does the web browser work with the java applet as normal? That could be useful.



  2. Hi Karl,
    Thanks for reading my post and posting your queries.

    Yes, you are right. Mocha VNC viewer does not need or use an applet (its a standalone IPhone app). I installed the vnc-java package just because I wanted to enable the browser based (applet) interface also on my desktop.

    I have not yet tried logging through IPhone using the browser (applet)into my desktop. I will try that today and let you know about my findings.

  3. Pingback: Remotely Control Ubuntu using your NexusOne (VNC Setup) « Shwetabh’s Blog

  4. very nice post works like charm now i can watch my baby when shes in bed sleeping she 1 year old so its cool to know what shes doing in her sleeep.
    thanks.iam using it on the iphone

  5. nice…
    it works fine, just when I’m disconnecting using the disconnect option in Mocha VNC, I get logout from the linux.
    Any idea how can I avoid logout when I’m disconnecting?


  6. I’ve spent whole day with “vino remote desktop” finally I came across this post.
    All fixed in 10 mins. Nice work!!

  7. Pingback: Remotely Control Ubuntu using your NexusOne (VNC Setup) » inspiredbits inspiredbits

  8. Mocha VNC works fine on the iphone 3gs, and i did not install anything extra on ubuntu 10.04 just setup the remote desktop utility on ubuntu and bob’s your uncle 🙂


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s