Welcome!

Linux Containers Authors: Liz McMillan, Robin Miller, Bob Gourley, XebiaLabs Blog, Yeshim Deniz

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
Data is an unusual currency; it is not restricted by the same transactional limitations as money or people. In fact, the more that you leverage your data across multiple business use cases, the more valuable it becomes to the organization. And the same can be said about the organization’s analytics. In his session at 19th Cloud Expo, Bill Schmarzo, CTO for the Big Data Practice at Dell EMC, introduced a methodology for capturing, enriching and sharing data (and analytics) across the organization...
SYS-CON Events announced today that T-Mobile 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. 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 ...
The explosion of new web/cloud/IoT-based applications and the data they generate are transforming our world right before our eyes. In this rush to adopt these new technologies, organizations are often ignoring fundamental questions concerning who owns the data and failing to ask for permission to conduct invasive surveillance of their customers. Organizations that are not transparent about how their systems gather data telemetry without offering shared data ownership risk product rejection, regu...
Bert Loomis was a visionary. This general session will highlight how Bert Loomis and people like him inspire us to build great things with small inventions. In their general session at 19th Cloud Expo, Harold Hannon, Architect at IBM Bluemix, and Michael O'Neill, Strategic Business Development at Nvidia, discussed the accelerating pace of AI development and how IBM Cloud and NVIDIA are partnering to bring AI capabilities to "every day," on-demand. They also reviewed two "free infrastructure" pr...
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...
With major technology companies and startups seriously embracing IoT strategies, now is the perfect time to attend @ThingsExpo 2016 in New York. Learn what is going on, contribute to the discussions, and ensure that your enterprise is as "IoT-Ready" as it can be! Internet of @ThingsExpo, taking place June 6-8, 2017, at the Javits Center in New York City, New York, is co-located with 20th Cloud Expo and will feature technical sessions from a rock star conference faculty and the leading industry p...
With billions of sensors deployed worldwide, the amount of machine-generated data will soon exceed what our networks can handle. But consumers and businesses will expect seamless experiences and real-time responsiveness. What does this mean for IoT devices and the infrastructure that supports them? More of the data will need to be handled at - or closer to - the devices themselves.
Grape Up is a software company, specialized in cloud native application development and professional services related to Cloud Foundry PaaS. With five expert teams that operate in various sectors of the market across the USA and Europe, we work with a variety of customers from emerging startups to Fortune 1000 companies.
The age of Digital Disruption is evolving into the next era – Digital Cohesion, an age in which applications securely self-assemble and deliver predictive services that continuously adapt to user behavior. Information from devices, sensors and applications around us will drive services seamlessly across mobile and fixed devices/infrastructure. This evolution is happening now in software defined services and secure networking. Four key drivers – Performance, Economics, Interoperability and Trust ...
Financial Technology has become a topic of intense interest throughout the cloud developer and enterprise IT communities. Accordingly, attendees at the upcoming 20th Cloud Expo at the Javits Center in New York, June 6-8, 2017, will find fresh new content in a new track called FinTech.
Today we can collect lots and lots of performance data. We build beautiful dashboards and even have fancy query languages to access and transform the data. Still performance data is a secret language only a couple of people understand. The more business becomes digital the more stakeholders are interested in this data including how it relates to business. Some of these people have never used a monitoring tool before. They have a question on their mind like “How is my application doing” but no id...
SYS-CON Events announced today that Interoute, owner-operator of one of Europe's largest networks and a global cloud services platform, has been named “Bronze Sponsor” of SYS-CON's 20th Cloud Expo, which will take place on June 6-8, 2017 at the Javits Center in New York, New York. Interoute is the owner-operator of one of Europe's largest networks and a global cloud services platform which encompasses 12 data centers, 14 virtual data centers and 31 colocation centers, with connections to 195 add...
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.
SYS-CON Events announced today that Juniper Networks (NYSE: JNPR), an industry leader in automated, scalable and secure networks, 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. Juniper Networks challenges the status quo with products, solutions and services that transform the economics of networking. The company co-innovates with customers and partners to deliver automated, scalable and secure network...
The age of Digital Disruption is evolving into the next era – Digital Cohesion, an age in which applications securely self-assemble and deliver predictive services that continuously adapt to user behavior. Information from devices, sensors and applications around us will drive services seamlessly across mobile and fixed devices/infrastructure. This evolution is happening now in software defined services and secure networking. Four key drivers – Performance, Economics, Interoperability and Trust ...
In his keynote at @ThingsExpo, Chris Matthieu, Director of IoT Engineering at Citrix and co-founder and CTO of Octoblu, focused on building an IoT platform and company. He provided a behind-the-scenes look at Octoblu’s platform, business, and pivots along the way (including the Citrix acquisition of Octoblu).
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 an...
@GonzalezCarmen has been ranked the Number One Influencer and @ThingsExpo has been named the Number One Brand in the “M2M 2016: Top 100 Influencers and Brands” by Analytic. Onalytica analyzed tweets over the last 6 months mentioning the keywords M2M OR “Machine to Machine.” They then identified the top 100 most influential brands and individuals leading the discussion on Twitter.
The Internet of Things is clearly many things: data collection and analytics, wearables, Smart Grids and Smart Cities, the Industrial Internet, and more. Cool platforms like Arduino, Raspberry Pi, Intel's Galileo and Edison, and a diverse world of sensors are making the IoT a great toy box for developers in all these areas. In this Power Panel at @ThingsExpo, moderated by Conference Chair Roger Strukhoff, panelists discussed what things are the most important, which will have the most profound e...
@ThingsExpo has been named the Most Influential ‘Smart Cities - IIoT' Account and @BigDataExpo has been named fourteenth by Right Relevance (RR), which provides curated information and intelligence on approximately 50,000 topics. In addition, Right Relevance provides an Insights offering that combines the above Topics and Influencers information with real time conversations to provide actionable intelligence with visualizations to enable decision making. The Insights service is applicable to eve...