Linux Containers Authors: Liz McMillan, Yeshim Deniz, Elizabeth White, Pat Romanski, Zakia Bouachraoui

Related Topics: Linux Containers

Linux Containers: Article

TightVNC: Remote X the secure, fast & easy way

Joe Barr takes remote control of his home desktop with TightVNC

(LinuxWorld) — My dear friend Susan is happily running Red Hat 8.0 on my Sony Vaio laptop in her new home while she waits for me to build her a real desktop machine. I set up an account for myself on the laptop so that when I visit her I can get online and check my e-mail. We both connect to the Internet using Time-Warner's Road Runner cable service.

Sometimes I forget to shut down Evolution on my own desktop before I leave home. As a result, every ten minutes it retrieves my e-mail and deletes it from the various servers where I have an account. Then, when I check it from Susan's house, there's nothing there. I needed a better solution. Discussing the problem on the #linuxhelp channel on the irc.freenode.net network, I was told that VNC (Virtual Network Computing) might be the answer. More specifically, I was told to give TightVNC a try.

The original VNC was created at the Olivetti and Oracle Research Labs in Cambridge, England. The software allowed a desktop on one computer to be used by others, usually providing Windows-users with access to applications running on Unix machines — a panacea for those cross-platform blues. VNC became so popular that Olivetti released it as free software licensed under the GPL. When ATT acquired Olivetti in 1999, the name of the labs was changed to the ATT Laboratories at Cambridge.

Constantin Kaplinski, a Russian teaching assistant at Tomsk Polytechnic Institute in Russia, and his team of TightVNC developers have enhanced the original VNC in a number of ways to make it faster, more flexible, and more secure. There are full versions of TightVNC for both Windows and Unix. If you're using a Mac, you can try the Java version, but only the viewer (client) is available in Java. TightVNC is licensed under the GPL, and the source code is available for download from the Web site.

I was a little hesitant to try TightVNC — not just because I had never used VNC, but also because I was pretty sure that the installation and configuration was going to be a real chore. Not to worry; that definitely is not the case. If you're running Red Hat 7.x or later, there are RPMS available to make installation a breeze. All in all, TightVNC was as easy to configure and use as it was to install, even when I opted for extra privacy by using a secure tunnel between Susan's machine and mine. Here's how I did it.

First, you make a roux

After downloading tightvnc-1.2.8-1.i386.rpm and tightvnc-server-1.2.8-1.i386.rpm from the tightVNC Web site, I quickly installed them by starting a terminal window, entering su and the root password to get superuser privileges, then entering the following command:

rpm -Uvh tightvnc*

After the client and server were installed, I decided to also install both on Susan's machine so I could test how it worked from home. Susan had previously determined her IP address (using ifconfig), so I entered ssh xxx.xxx.xxx.xxx from the command prompt to get a secure connection to her computer.

Once there, I attempted to ftp to my own machine from Susan's. Silly me. My firewall blocks ftp. I clicked on the Red Hat, then on Server Settings, then on Services. After providing the root password, I got a window listing all server services. I right-clicked on iptables and stopped it. Then I went back to my ssh session on Susan's machine, where I tried again to ftp the two tightVNC RPMS from my box. Now it worked. Of course, I remembered to restart iptables after I finished my ftp session.

I installed the RPMS on her computer just as I had done on mine, then started the tightVNC server by entering vncserver :1 at the command prompt. Nothing happened for a second, then the following lines appeared in the terminal window:

New 'X' desktop is palace:1

Starting applications specified in /home/warthawg/.vnc/xstartup
Log file is /home/warthawg/.vnc/palace:1.log

The Electric Kool-Aid Acid Test

Now it was time to give it a try. In a terminal window on my own desktop, I entered vncviewer -via xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx:1, where the xxx's represent Susan's IP address in both instances. The -via option directs tightVNC to use ssh for a secure tunnel through which to operate.

About a second later, I was prompted for my user-account password on Susan's machine. That logged me on to ssh. A second after that, I was asked for my password again to connect to the tightVNC server. Another second later, I had a new, windowed version of my Red Hat 8 desktop at Susan's house on my desktop. I was impressed but uncertain how well it would work.

The first thing I did was fire up Galeon. It took about 15 seconds to appear, but once it did, performance seemed to be only slightly slower than normal. The image below shows what the remote desktop and browser looked like on my machine.

TightVNC remote X session
Editor's note: The above image is reduced in size to allow it to display on this page. Click on this image to see the original.

I called Susan and asked her to load a CD with images from a digital camera in the laptop. She did, and I fired up GQView on the remote desktop. I would describe the performance as slightly sluggish — perfectly acceptable for the kind of use I intend, and, in fact, a little better than I'd expected. Naturally, your own mileage will vary depending on what sort of demands you put on the connection and the power of the machine the server is running on. Susan could notice a slowdown in her desktop as well.

Still not wanting to stop experimenting, I called Susan again and asked her to plug in the USB IBM PC Camera. She did, and I started xawtv running. Some strange error messages and password warnings showed up in the terminal window from which I started it, but the xawtv window appeared a second later, and I could see her typing away at the keyboard. Too cool! As you can see from the image below, Susan demanded I blank her face, but otherwise the image is just as she captured using the GIMP.

Local Web cam over tightVNC
Editor's note: The above image is reduced in size to allow it to display on this page. Click on this image to see the original.

The video from the cam became distorted when Susan moved, but it quickly snapped back into focus when she stopped. My only purpose for setting all this up is to get access to my own desktop from her place so that I can keep up with e-mail. It will serve that purpose splendidly.

To end my remote session completely, I clicked on the X in the upper right corner of the session window. Then, in the terminal window on which I had started vncserver on Susan's machine, I entered vncserver -kill :1. When I terminated the ssh connection, it was as if I had never been on Susan's machine, at least in terms of memory- and processor-usage.

There are many ways to keep up with the changing dynamic-IP addresses that Road Runner assigns. For Windows users, there is a program called BubbleIP that will do it for you. For everyone else, there are sites on the Web that will do the DNS for you so that you can run a server from a non-static address. For my usage, that would be a bit of overkill; a simple script is all I think I am going to need. In the meantime, while I am locating one, running ifconfig when I leave home works just fine.

Kaplinsky told me via e-mail that he had begun working on tightVNC in July of 2000. Release 1.2.0 was released in August of 2001. He says he's been working on the project fairly regularly ever since. Noticing the Pay Pal and Donate buttons on the tightVNC Web site, I asked him if the project was getting user support. He replied:

Yes, people are helping, but not much. That definitely does not compensate the development efforts even at 20%. From my experience, people just don't pay for free software, even for new features ("why should I pay if others will then use it for free?" -- it's a normal psychology of a healthy mind). That's why Cosource.com, SourceXchange.com etc. all have silently died.

In my case, there were a few companies and individuals that offered me interested VNC-related contracted work from time to time, and sponsored particular improvements for the public version of TightVNC. But obviously, they all were much more interested in additions useful for their particular environments.

The possibility to get good contracts and amounts of donations depend on the popularity of the software (especially, the popularity between Win32 users). I guess TightVNC simply has not reached its intended popularity level yet. ;-)

He's probably right. I made a small donation, and I know I will get more than my money's worth from TightVNC.

More Stories By Joe Barr

Joe Barr is a freelance journalist covering Linux, open source and network security. His 'Version Control' column has been a regular feature of Linux.SYS-CON.com since its inception. As far as we know, he is the only living journalist whose works have appeared both in phrack, the legendary underground zine, and IBM Personal Systems Magazine.

Comments (1) View Comments

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

Most Recent Comments
Jay 10/06/03 03:00:44 PM EDT

Your help page is good, but you are not clear about the ips to use to login.
vncviewer -via xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx:1
The first ip is the WANip and the second ip is the network card ip. This took me a long time to figure out. It would be nice to include that information. It would save lots of work for newbies.
I have noticed most help topics are missing very common and needed information. It is a common pattern in the linux community. Too sad.

IoT & Smart Cities Stories
Cloud computing delivers on-demand resources that provide businesses with flexibility and cost-savings. The challenge in moving workloads to the cloud has been the cost and complexity of ensuring the initial and ongoing security and regulatory (PCI, HIPAA, FFIEC) compliance across private and public clouds. Manual security compliance is slow, prone to human error, and represents over 50% of the cost of managing cloud applications. Determining how to automate cloud security compliance is critical...
Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities - ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups.
"MobiDev is a Ukraine-based software development company. We do mobile development, and we're specialists in that. But we do full stack software development for entrepreneurs, for emerging companies, and for enterprise ventures," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 20th Cloud Expo, held June 6-8, 2017, at the Javits Center in New York City, NY.
Recently, REAN Cloud built a digital concierge for a North Carolina hospital that had observed that most patient call button questions were repetitive. In addition, the paper-based process used to measure patient health metrics was laborious, not in real-time and sometimes error-prone. In their session at 21st Cloud Expo, Sean Finnerty, Executive Director, Practice Lead, Health Care & Life Science at REAN Cloud, and Dr. S.P.T. Krishnan, Principal Architect at REAN Cloud, discussed how they built...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things'). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing. IoT is not about the devices, its about the data consumed and generated. The devices are tools, mechanisms, conduits. This paper discusses the considerations when dealing with the...
Bill Schmarzo, author of "Big Data: Understanding How Data Powers Big Business" and "Big Data MBA: Driving Business Strategies with Data Science," is responsible for setting the strategy and defining the Big Data service offerings and capabilities for EMC Global Services Big Data Practice. As the CTO for the Big Data Practice, he is responsible for working with organizations to help them identify where and how to start their big data journeys. He's written several white papers, is an avid blogge...
Business professionals no longer wonder if they'll migrate to the cloud; it's now a matter of when. The cloud environment has proved to be a major force in transitioning to an agile business model that enables quick decisions and fast implementation that solidify customer relationships. And when the cloud is combined with the power of cognitive computing, it drives innovation and transformation that achieves astounding competitive advantage.
Machine learning has taken residence at our cities' cores and now we can finally have "smart cities." Cities are a collection of buildings made to provide the structure and safety necessary for people to function, create and survive. Buildings are a pool of ever-changing performance data from large automated systems such as heating and cooling to the people that live and work within them. Through machine learning, buildings can optimize performance, reduce costs, and improve occupant comfort by ...
With 10 simultaneous tracks, keynotes, general sessions and targeted breakout classes, @CloudEXPO and DXWorldEXPO are two of the most important technology events of the year. Since its launch over eight years ago, @CloudEXPO and DXWorldEXPO have presented a rock star faculty as well as showcased hundreds of sponsors and exhibitors! In this blog post, we provide 7 tips on how, as part of our world-class faculty, you can deliver one of the most popular sessions at our events. But before reading...
René Bostic is the Technical VP of the IBM Cloud Unit in North America. Enjoying her career with IBM during the modern millennial technological era, she is an expert in cloud computing, DevOps and emerging cloud technologies such as Blockchain. Her strengths and core competencies include a proven record of accomplishments in consensus building at all levels to assess, plan, and implement enterprise and cloud computing solutions. René is a member of the Society of Women Engineers (SWE) and a m...