Welcome!

Linux Containers Authors: Liz McMillan, Pat Romanski, Elizabeth White, Yeshim Deniz, Jyoti Bansal

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
Internet of @ThingsExpo, taking place October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, is co-located with the 21st International Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry players in the world. @ThingsExpo Silicon Valley Call for Papers is now open.
SYS-CON Events announced today that DivvyCloud will exhibit 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. DivvyCloud software enables organizations to achieve their cloud computing goals by simplifying and automating security, compliance and cost optimization of public and private cloud infrastructure. Using DivvyCloud, customers can leverage programmatic Bots to identify and remediate common cloud problems in rea...
SYS-CON Events announced today that Tintri, Inc, a leading provider of enterprise cloud infrastructure, will exhibit 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. Tintri offers an enterprise cloud platform built with public cloud-like web services and RESTful APIs. Organizations use Tintri all-flash storage with scale-out and automation as a foundation for their own clouds – to build agile development environments...
SYS-CON Events announced today that Fusion, a leading provider of cloud services, will exhibit 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. Fusion, a leading provider of integrated cloud solutions to small, medium and large businesses, is the industry’s single source for the cloud. Fusion’s advanced, proprietary cloud service platform enables the integration of leading edge solutions in the cloud, including cloud...
SYS-CON Events announced today that Peak 10, Inc., a national IT infrastructure and cloud services provider, will exhibit 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. Peak 10 provides reliable, tailored data center and network services, cloud and managed services. Its solutions are designed to scale and adapt to customers’ changing business needs, enabling them to lower costs, improve performance and focus intern...
SYS-CON Events announced today that Progress, a global leader in application development, has been named “Bronze Sponsor” of 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. Enterprises today are rapidly adopting the cloud, while continuing to retain business-critical/sensitive data inside the firewall. This is creating two separate data silos – one inside the firewall and the other outside the firewall. Cloud ISVs ofte...
SYS-CON Events announced today that Systena America will exhibit 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. Systena Group has been in business for various software development and verification in Japan, US, ASEAN, and China by utilizing the knowledge we gained from all types of device development for various industries including smartphones (Android/iOS), wireless communication, security technology and IoT serv...
DevOps at Cloud Expo – being held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA – 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 r...
SYS-CON Events announced today that Hitachi Data Systems, a wholly owned subsidiary of Hitachi LTD., will exhibit 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. Hitachi Data Systems (HDS) will be featuring the Hitachi Content Platform (HCP) portfolio. This is the industry’s only offering that allows organizations to bring together object storage, file sync and share, cloud storage gateways, and sophisticated search and...
The 21st International Cloud Expo has announced that its Call for Papers is open. Cloud Expo, to be held October 31 - November 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA, brings together Cloud Computing, Big Data, Internet of Things, DevOps, Digital Transformation, 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...
SYS-CON Events announced today that Technologic Systems Inc., an embedded systems solutions company, will exhibit at SYS-CON's @ThingsExpo, which will take place on June 6-8, 2017, at the Javits Center in New York City, NY. Technologic Systems is an embedded systems company with headquarters in Fountain Hills, Arizona. They have been in business for 32 years, helping more than 8,000 OEM customers and building over a hundred COTS products that have never been discontinued. Technologic Systems’ pr...
SYS-CON Events announced today that Carbonite will exhibit 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. Carbonite protects your entire IT footprint with the right level of protection for each workload, ensuring lower costs and dependable solutions with DoubleTake and Evault.
New competitors, disruptive technologies, and growing expectations are pushing every business to both adopt and deliver new digital services. This ‘Digital Transformation’ demands rapid delivery and continuous iteration of new competitive services via multiple channels, which in turn demands new service delivery techniques – including DevOps. In this power panel at @DevOpsSummit 20th Cloud Expo, moderated by DevOps Conference Co-Chair Andi Mann, panelists will examine how DevOps helps to meet th...
SYS-CON Events announced today that Progress, a global leader in application development, has been named “Bronze Sponsor” of 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. Enterprises today are rapidly adopting the cloud, while continuing to retain business-critical/sensitive data inside the firewall. This is creating two separate data silos – one inside the firewall and the other outside the firewall. Cloud ISVs oft...
SYS-CON Events announced today that CollabNet, a global leader in enterprise software development, release automation and DevOps solutions, will be a Bronze Sponsor of SYS-CON's 20th International Cloud Expo®, taking place from June 6-8, 2017, at the Javits Center in New York City, NY. CollabNet offers a broad range of solutions with the mission of helping modern organizations deliver quality software at speed. The company’s latest innovation, the DevOps Lifecycle Manager (DLM), supports Value S...
SYS-CON Events announced today that Cloudistics, an on-premises cloud computing company, has been named “Bronze Sponsor” of 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. Cloudistics delivers a complete public cloud experience with composable on-premises infrastructures to medium and large enterprises. Its software-defined technology natively converges network, storage, compute, virtualization, and management into a ...
SYS-CON Events announced today that Ocean9will exhibit 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. Ocean9 provides cloud services for Backup, Disaster Recovery (DRaaS) and instant Innovation, and redefines enterprise infrastructure with its cloud native subscription offerings for mission critical SAP workloads.
Multiple data types are pouring into IoT deployments. Data is coming in small packages as well as enormous files and data streams of many sizes. Widespread use of mobile devices adds to the total. In this power panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists will look at the tools and environments that are being put to use in IoT deployments, as well as the team skills a modern enterprise IT shop needs to keep things running, get a handle on all this data, and deli...
We build IoT infrastructure products - when you have to integrate different devices, different systems and cloud you have to build an application to do that but we eliminate the need to build an application. Our products can integrate any device, any system, any cloud regardless of protocol," explained Peter Jung, Chief Product Officer at Pulzze Systems, in this SYS-CON.tv interview at @ThingsExpo, held November 1-3, 2016, at the Santa Clara Convention Center in Santa Clara, CA
DevOps is often described as a combination of technology and culture. Without both, DevOps isn't complete. However, applying the culture to outdated technology is a recipe for disaster; as response times grow and connections between teams are delayed by technology, the culture will die. A Nutanix Enterprise Cloud has many benefits that provide the needed base for a true DevOps paradigm.