Monday, April 1, 2002

Control your computer remotely using PalmVNC

.KEYWORD palmvnc
.FLYINGHEAD VIRTUAL NETWORK COMPUTING
.TITLE Control your computer remotely using PalmVNC
.FEATURE
.SUMMARY Have you ever wanted to control your computers over the Internet? Perhaps you want to administer your server while traveling. Contributing Editor Stephen Vance will introduce you to an exciting application called PalmVNC that will let you do all of this with your Palm OS handheld regardless of the operating system on the computer you want to control.
.AUTHOR Stephen Vance
Have you ever wanted to control your computers over the Internet? Perhaps you want to administer your server while traveling. Maybe you need to give technical support to your co-workers around the world. Perhaps you want to demonstrate your software or give a presentation to customers via a teleconference.

If you come from a UNIX background, you have this capability through remote login or the X Window System. There are commercial products like pcAnywhere (at http://www.symantec.com/pcanywhere/) that serve this purpose for Windows. How would you like to do all of this with your Palm OS handheld regardless of the operating system on the computer you want to control?

.CALLOUT Many places that require property passes or have severe restrictions on laptops will conveniently ignore your handheld.

If any of the above appeals to you, then you should consider VNC (Virtual Network Computing) from the AT&T Laboratories Cambridge, UK (at http://www.uk.research.att.com/vnc/) and the PalmVNC client from Harakan Software (at http://www.btinternet.com/~harakan/PalmVNC/). And by the way, it all comes for free, although you should understand the GNU Public License and how it applies to your usage.

.H1 How it works
The instance of VNC running on your "remote" computer is called the "VNC server." This is intuitive to you unless you come from a UNIX background where the X server is the software running on your local computer.

VNC has a different program, called the "VNC viewer" that runs on your local computer. You’ll interact with the VNC viewer to control the remote computer.

In general, the VNC server provides a platform-independent way to remotely control another computer. The VNC server works a little differently depending on what operating system it’s running on. When the server runs on UNIX, it shows you a self-contained set of windows that are independent of what is shown on the system console. When the remote computer runs Windows, it shows you the same screen that someone sitting at the PCs keyboard would see.

Regardless of the remote operating system, the viewer and client talk by exchanging optimized and compressed portions of an image of the screen being controlled. The viewer sends keyboard input and mouse clicks to the server, and the server sends pictures of chunks of the screen back.

You can find much more detail, including the source code, at the VNC home page.

.H1 Setting up the server
Since we are specifically looking toward PalmVNC, I recommend that you download the server from the PalmVNC Web site instead of the VNC home page. PalmVNC has a useful feature that requires the scaling extensions in the Harakan version of the server. As of this writing, the latest version of the VNC server with the scaling extensions is 3.3.3r7 while the latest version of the VNC server is 3.3.3r9. However, for PalmVNC, you’ll prefer the scaling extensions.

Also, note that the Harakan distribution of the VNC server only includes the Windows server. If you would like the server for another platform, you’ll need to download the source code and build it.

The Harakan distribution is a ZIP file containing the PalmVNC application and a standard set of files to support a Windows installation. Download the file, unpack it, and run the SETUP.EXE that it includes. All of the decisions are standard.

The next step is to run the application. You have a decision to make about how you want to run the server. You can either run it as an application, or you can install it as a service. Both options are available from the Start menu under Programs->VNC. If you just want to try it out, I recommend running it as an application. If and when you choose to run it on a more permanent basis, install it as a service. There’s also a menu item to remove the service if you need it.

The first time you run the program, it will present you with the properties dialog as shown in Figure A.

.FIGPAIR A You must enter a password in the properties dialog the first time you run the VNC server.

The default settings should suffice until you can read the documentation, but you must set the server password in order to use the server.

If you choose to install the VNC server as a service, it will require you to either manually start the service or to reboot. When the service starts for the first time, it will present the properties dialog, also.

.H1 Testing the server
The VNC distribution comes with the VNC viewer. You should test your server installation with the viewer before attempting to use PalmVNC. Although the viewer is included in the installation, do not run it from the machine on which the server is running against that same server. If you really think about it, you’ll realize that it would be like looking at two parallel mirrors that face each other or the image on a television driven by a video camera pointed at its screen. While it’s at it, it also recursively consumes your computer’s CPU resources. It’s not a pretty sight.

That means that you must at least install the viewer on another machine that’s networked to the server. If you’d rather not perform a full installation, the viewer is available as a standalone executable in the AT&T distribution’s ZIP file. When you first run the viewer, you will see a dialog like that in Figure B.

.FIGPAIR B This is the first screen you see when you run the VNC viewer.

You need to enter something of the form <host name>:<port address> where <host name> is the name or IP address of the machine running the VNC server and <port address> is the port address of the VNC server. I use "kodachi:0" on my internal network. From the Internet, I use an IP address. More on that later.

After you enter the server reference, you’ll be prompted for a password as shown in Figure C. This is the same password you set previously.

.FIGPAIR C Enter the same password you set for your server.

Once you enter the password, you’ll see the screen of your VNC server’s PC in a window on the machine running the viewer. You can move your mouse over the window, click in the window, enter text, or perform any other activity you would normally perform on your computer. There are some special key sequences that you can send from the viewer’s context menu, shown in Figure D, most notably Ctrl-Alt-Del. It also lets you refresh the entire screen, which is sometimes necessary.

.FIGPAIR D The VNC viewer’s context menu lets you send special key sequences and run other commands.

.H1 Setting up PalmVNC
PalmVNC is a standard Palm OS application and installs the way you’re used to. If you HotSync from a machine you installed the Harakan distribution on, you can also choose the "Transfer PalmVNC to Palm" menu item in the Start menu. When you first run it, you’ll see the splash screen shown in Figure E.

.FIG E This is the PalmVNC splash screen.

.H1 Configuring PalmVNC
You first want to set up a connection. All of the basic connection controls are located in the Server menu, shown in Figure F.

.FIG F The Server menu gives you all of the connection options.

To set up your first connection, use the Open item and tap the New button to see the screen in Figure G.

.FIG G The connection definition screen lets you set up your server connections.

For the moment, we’ll assume that your handheld has direct, networked access to your server. Typically this means either that your server is directly available on the Internet or that your handheld has access to your local network. I generally use my PalmModem to dial my ISP (Internet Service Provider) and connect to my server, which is available through my cable modem. I’ll give some tips on this later, but for now we’ll ignore the details. I’ll also defer the setup of the ISP dial-up to Palm’s documentation.

In the connection definition screen, the first field simply gives you a readable name. The program doesn’t care what you enter here. The server address is the DNS (Domain Name Server) name or IP (Internet Protocol) address through which you access your server and is the same as the <host name> used with the basic VNC viewer. The display by default is set to 0. Read the documentation for more details on screen numbers.

The final field lets you define whether you want to enter the server password in advance or whether PalmVNC should prompt you. The default is Prompt, which provides the most safety. If you assign a password, the security of your server may be compromised simply through the theft of your handheld. You can safely ignore the Details button until you feel like exploring later on. Tap the OK button when finished.

Once you’ve set up your connection, tap the Open button to test it. Figure H shows the PalmVNC view of my server’s screen.

.FIG H My server desktop through PalmVNC with Whole Desktop scaling.

Figure I shows the same screen as seen from the standard VNC viewer on my laptop.

.FIGPAIR I The VNC viewer from my laptop shows the same screen without scaling.

You may notice the illegibility of the screen shot from PalmVNC. To get that view, I used the View menu shown in Figure J and chose the Whole Desktop item.

.FIG J The PalmVNC View menu lets you access server scaling settings.

The scaling extensions make VNC much more usable from the handheld’s limited screen. However, attempting to use the scaling features against the standard VNC server (without scaling extensions) will break your connection in my experience.

To complete the tour of PalmVNC, Figure K shows the Send menu.

.FIG K The Send menu lets you send special character sequences.

Through this menu, you can send special character sequences like Ctrl-Alt-Del and Alt-F4, similar to the context menu back in Figure D.

.H1 Additional Tips
The main tip I want to deliver here answers the question of how to connect to your server when it’s not on the same network as your viewer. VNC conducts its communication over a single TCP/IP port. If your server is behind a router or firewall, you can forward the VNC ports to it, allowing access from the Internet at large. Beware, this also lets anyone else get through your firewall on this port and that any text sent from the client will be unencrypted plaintext, including passwords and other potentially critical data. Unfortunately, I am unaware of any IPsec or SSH (Secured Shell) tunneling implementations for the Palm OS.

Now that you have been appropriately warned of the security risks, VNC uses a port range starting at port 5900. Remember the number associated with the server connection above? Add that number to 5900, and you get the port that a given connection will use. You can use this fact to forward different connections to different machines on your internal network. I use this technique through my broadband router, which also explains why I use the IP address from the Internet.

The other tip seems patently obvious, but is worth pointing out. Graffiti works! You can use graffiti, the virtual keyboard, the Palm Portable Keyboard, or your other favorite text entry mechanism to enter text on your server. I wouldn’t want to write an article that way, but you can’t beat it for a little remote administration.

.BEGIN_KEEP
.H1 Conclusion
PalmVNC adds another tool to the road warrior’s arsenal of tricks. Yes, your handheld has a small screen, but in this case it may save you from having to haul your laptop on the next business trip or consulting engagement. Many places that require property passes or have severe restrictions on laptops will conveniently ignore your handheld. PalmVNC increases the power and versatility of your handheld in a very useful way.

.BEGIN_SIDEBAR
.H1 Product availability and resources
For more information on Symantec’s pcAnywhere, visit http://www.symantec.com/pcanywhere/.

For a download of the standard VNC distribution, visit http://www.uk.research.att.com/vnc/.

For more information on PalmVNC, visit http://www.btinternet.com/~harakan/PalmVNC/.

For more information on Palm handhelds, visit http://www.palm.com.

.H1 Easy, flexible article reprints
ZATZ now offers a quick, easy, flexible and inexpensive way to use article reprints in your marketing and promotion efforts. You can now get article reprints for a one-time fee of only $200. For details, visit http://mediakit.zatz.com/reprints.
.END_SIDEBAR

.BIO
.DISCUSS http://powerboards.zatz.com/cgi-bin/webx?50@@.ee6fe35
.END_KEEP