Welcome!

Linux Containers Authors: Liz McMillan, Pat Romanski, Elizabeth White, Yeshim Deniz, Roger Strukhoff

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.

@ThingsExpo Stories
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
SYS-CON Events announced today that Synametrics Technologies will exhibit at SYS-CON's 22nd International Cloud Expo®, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Synametrics Technologies is a privately held company based in Plainsboro, New Jersey that has been providing solutions for the developer community since 1997. Based on the success of its initial product offerings such as WinSQL, Xeams, SynaMan and Syncrify, Synametrics continues to create and hone inn...
"Evatronix provides design services to companies that need to integrate the IoT technology in their products but they don't necessarily have the expertise, knowledge and design team to do so," explained Adam Morawiec, VP of Business Development at Evatronix, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
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...
No hype cycles or predictions of a gazillion things here. IoT is here. You get it. You know your business and have great ideas for a business transformation strategy. What comes next? Time to make it happen. In his session at @ThingsExpo, Jay Mason, an Associate Partner of Analytics, IoT & Cybersecurity at M&S Consulting, presented a step-by-step plan to develop your technology implementation strategy. He also discussed the evaluation of communication standards and IoT messaging protocols, data...
With tough new regulations coming to Europe on data privacy in May 2018, Calligo will explain why in reality the effect is global and transforms how you consider critical data. EU GDPR fundamentally rewrites the rules for cloud, Big Data and IoT. In his session at 21st Cloud Expo, Adam Ryan, Vice President and General Manager EMEA at Calligo, examined the regulations and provided insight on how it affects technology, challenges the established rules and will usher in new levels of diligence arou...
Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, led attendees through the exciting evolution of the cloud. He looked at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering m...
In his session at 21st Cloud Expo, Raju Shreewastava, founder of Big Data Trunk, provided a fun and simple way to introduce Machine Leaning to anyone and everyone. He solved a machine learning problem and demonstrated an easy way to be able to do machine learning without even coding. Raju Shreewastava is the founder of Big Data Trunk (www.BigDataTrunk.com), a Big Data Training and consulting firm with offices in the United States. He previously led the data warehouse/business intelligence and B...
The 22nd International Cloud Expo | 1st DXWorld Expo has announced that its Call for Papers is open. Cloud Expo | DXWorld Expo, to be held June 5-7, 2018, at the Javits Center in New York, NY, brings together Cloud Computing, Digital Transformation, Big Data, Internet of Things, DevOps, Machine Learning and WebRTC to one location. With cloud computing driving a higher percentage of enterprise IT budgets every year, it becomes increasingly important to plant your flag in this fast-expanding busin...
Nordstrom is transforming the way that they do business and the cloud is the key to enabling speed and hyper personalized customer experiences. In his session at 21st Cloud Expo, Ken Schow, VP of Engineering at Nordstrom, discussed some of the key learnings and common pitfalls of large enterprises moving to the cloud. This includes strategies around choosing a cloud provider(s), architecture, and lessons learned. In addition, he covered some of the best practices for structured team migration an...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
22nd International Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, and co-located with the 1st DXWorld Expo will feature technical sessions from a rock star conference faculty and the leading industry players in the world. Cloud computing is now being embraced by a majority of enterprises of all sizes. Yesterday's debate about public vs. private has transformed into the reality of hybrid cloud: a recent survey shows that 74% of enterprises have a hybrid cloud ...
DevOps at Cloud Expo – being held June 5-7, 2018, at the Javits Center in New York, NY – announces that its Call for Papers is open. Born out of proven success in agile development, cloud computing, and process automation, DevOps is a macro trend you cannot afford to miss. From showcase success stories from early adopters and web-scale businesses, DevOps is expanding to organizations of all sizes, including the world's largest enterprises – and delivering real results. Among the proven benefits,...
@DevOpsSummit at Cloud Expo, taking place June 5-7, 2018, at the Javits Center in New York City, NY, is co-located with 22nd Cloud Expo | 1st DXWorld Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. The widespread success of cloud computing is driving the DevOps revolution in enterprise IT. Now as never before, development teams must communicate and collaborate in a dynamic, 24/7/365 environment. There is no time to wait...
Cloud Expo | DXWorld Expo have announced the conference tracks for Cloud Expo 2018. Cloud Expo will be held June 5-7, 2018, at the Javits Center in New York City, and November 6-8, 2018, at the Santa Clara Convention Center, Santa Clara, CA. Digital Transformation (DX) is a major focus with the introduction of DX Expo within the program. Successful transformation requires a laser focus on being data-driven and on using all the tools available that enable transformation if they plan to survive ov...
SYS-CON Events announced today that T-Mobile exhibited at SYS-CON's 20th International Cloud Expo®, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. As America's Un-carrier, T-Mobile US, Inc., is redefining the way consumers and businesses buy wireless services through leading product and service innovation. The Company's advanced nationwide 4G LTE network delivers outstanding wireless experiences to 67.4 million customers who are unwilling to compromise on qua...
SYS-CON Events announced today that Cedexis will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Cedexis is the leader in data-driven enterprise global traffic management. Whether optimizing traffic through datacenters, clouds, CDNs, or any combination, Cedexis solutions drive quality and cost-effectiveness. For more information, please visit https://www.cedexis.com.
SYS-CON Events announced today that Google Cloud has been named “Keynote Sponsor” of SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Companies come to Google Cloud to transform their businesses. Google Cloud’s comprehensive portfolio – from infrastructure to apps to devices – helps enterprises innovate faster, scale smarter, stay secure, and do more with data than ever before.