ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

How to Use VNC Viewer in Ubuntu

Updated on November 25, 2012

VNC (Virtual Network Computing), is a free downloadable tool that allows you to remotely access another PC, and when connected appears as if you're on the remote PC itself. You can even use VNC to go back and forth between Ubuntu (linux) and Windows Operating Systems!

For example, from my Windows 7 laptop, I can open my VNC viewer (by double clicking a desktop icon), and remotely connect to my Ubuntu 12.4 desktop. Once connected, it's as if I'm on the Ubuntu desktop itself.

Basically there are two components, a VNC server, and a VNC client (viewer) which connects to the server.

In this article, I'll walk you through two different ways to install VNC in Ubuntu. The first is through the Ubuntu Software Center or "USC". (Similar to Droid "Market").

The second method is by using the Terminal Window. My thoughts are, If you going to learn to use something new, such as Ubuntu, you may as well get your hands in the linux terminal, but both methods work just fine. Grab that energy drink and let's get started!

Ubuntu 12.4 LTS vs. 12.10

In my article, "How to Install Windows Programs in Ubuntu", I discussed the differences between Ubuntu 12.4 LTS ( Long Term Release), and the newest version 12.10. I also inroduced the "Ubuntu Software Center", USC, (similar to Droid "market"). If you unfamiliar with the newest versions of Ubuntu (which are FREE), you may want to check that hub out first. I'm still using 12.4 and so the USC is still very much the same.

Downloading and Installing VNC with the Ubuntu Software Center

In Ubuntu 12.4, you'll see the "Launcher" to the left hand side of the desktop, (Very Similar to the taskbar in Windows 7). Simply click on an icon to open that application. The 7th Icon down by default, (the one that looks like a shopping bag), is the Ubuntu Software Center (USC). Click on that Icon and you'll be brought to the homepage.

Search for "VNC" in the top right corner and you'll find several good applications to choose from. One of the easiest to start with, and the one I'll install in Ubuntu is the X11VNC Server application.

Simply click to highlight the app and then click "Install" on the far right.

Once you click "Install", you'll be prompted to "Authenticate". Just use the password you used to login. Then, very similar to the Droid "Market", the application will install itself.

Once complete, click on the "dashboard" (Top Icon in the launcher bar), and type in "VNC".

Under "Applications", click the VNC program you just installed and you'll be prompted with a configuration window.

TIP - Leave the port at 5900 to start off with. I'll explain later why, but If your familiar with port settings, then I will say this. (And you can read this right from this prompt as well), If you leave it at 5900 then the address to connect will look like 192.168.1.200:0 , and If you were to make it 5901, it would look like 192.168.1.200:1 ---- (the IP is random in my example, the important part is is the colon and the 0 or 1.

Don't worry, I'll go over this again when we connect from the Windows machine!

On the next screen there are just a couple of important settings to note here:

  1. Make sure to check "Accept Connections".
  2. Make sure "Serve Java Viewer Applet" is UNCHECKED, or your Windows PC will not be able to connect.
  3. Make sure to enter a password,
  4. And for the "ViewOnly" password, make that password something completely different. Having the same password can muck things up.

Hit apply and OK and your Ubuntu VNC Server is ready to go. Now lets connect from a Windows PC.

Installing the VNC client on the Windows PC

You can google "Download VNC" and come across a few really good applications. I chose Ultra VNC for it's simplicity.

TIP -- I recommend choosing "Save" when downloading the file, this way you have a copy on hand If you ever need to reinstall. Once Saved to your PC, click "Open Folder" and double click the .exe.

On the next screen of the VNC client install, you'll be prompted to "Select Components".

In English, this means, "Do you want this PC to be a VNC server (allowing connections to it, as well as a viewer used to connect to other machines (i.e...Ubuntu)?

NOTE - For This hub, we just want the VNC viewer on the Windows PC. We could have installed everything on the Windows PC, and then installed a viewer in Ubuntu, but for the sake of this hub (and simplicity), we just want the VNC viewer on the Windows PC and the VNC Server on the Ubuntu desktop.

Click Next and finish the setup (check or don't check desktop Icon etc), and once installed, double click the VNC viewer icon:

See the address at the top? That's the IP address of my Ubuntu Server on my home network. If you unsure as how to find IP addresses on your home network, you can refer to my hub "How to Check a Computer IP Address".

TIP -- to check the address from within Ubuntu, open the Terminal Window by pressing "ctrl" + "T". Then type ifconfig.

TIP - (ipconfig in Windows, ......... ifconfig in Ubuntu)

The important thing to note in the picture above is the :0 following the address.... remember when we set the X11Server in Ubuntu to 5900? This is where we specify that port - by using :0


Source

There we go, all set to camp out on the couch now with my Windows laptop. I have my Ubuntu desktop at my fingertips anytime I want, all I have to do is double click the VNC icon and go! (PS, the IP address will get saved for you).

Installing VNC with the Ubuntu Terminal

  1. Open the Terminal window from the desktop -- "Ctrl" + "T"
  2. sudo apt-get install x11vnc vnc-java (to install the X11Package)
  3. x11vnc -storepasswd password (to set the password needed to connect) , default is ~/.vnc/password
  4. x11vnc -forever -usepw -httpdir /usr/share/vnc-java/ -httpport 5900 (sets the port, flags "use password", gives path to the vnc app, but the coolest part, the -forever switch will set the VNC server so that you don't have to restart the VNC server every time you reboot your Ubuntu machine.
  5. x11vnc -rfbauth /path/to/passfile/, if left at default x11vnc -rfbauth ~/.vnc/password

Just a thought about Ubuntu

Just like the "Droid Market" , (now Google Play), many very cool apps are FREE and easily downloaded and installed for you!

So To Summarize: Free Operating System that's easy to install, Free Apps that are easy to Install, and once you get VNC installed, you have a new toy on your hands.

You could set up a file server for example, or a media PC attached to your TV via HDMI. You could then use a free media player on Ubuntu to run movies in high def, all accessible via VNC from the laptop on your couch :).

Free things ROCK, and Ubuntu and all of the apps in the Ubuntu Software Center make it worth your while to check this OS out.

~Credits~

  • All pictures were screenshots taken by Jeff Boettner (howlermunkey)
  • All borders were created by Jeff Boettner (howlermunkey)


Comments

    0 of 8192 characters used
    Post Comment

    • Suzie HQ profile image

      Suzanne Ridgeway 4 years ago from Dublin, Ireland

      Hi Jeff,

      What a fantastic hub with crystal clear screenshots and step by step instructions for using the VNC Viewer. Whilst I am not the most technically savy bunny in the park when it comes to pc operating systems and lingo, this is a fantastic article for those who are! Loved your layout and your cool line dividers which all made this an engaging info packed hub - great job!

      Voted Up, Useful, Awesome and Interesting and shared!

    • howlermunkey profile image
      Author

      Jeff Boettner 4 years ago from Tampa, FL

      Thanks Suzie :), it's very nice to come home after a LONG monday and find such wonderful comments!

    • jimagain profile image

      jimagain 4 years ago from Hattiesburg, Mississippi

      Oh yeah. I want to try this. I have some Windows programs I want to try out. I also have Bluestacks on my laptop so I can run some of my Android apps.

    • howlermunkey profile image
      Author

      Jeff Boettner 4 years ago from Tampa, FL

      Heya jimagain :), thanks for the droid heads up, I'll be checkin that out. Yep, VNC is super easy to setup, on any platform, and with vnc, you could have, say, a media player connected with hdmi to your TV. Then just remote control when needed from your laptop. Thanks for stopping by!

    Click to Rate This Article