Red Hat Linux 7 Unleashed

Red Hat Linux 7 Unleashed

By William Ball

Windowing Network Clients

While software and hardware emulators can ease many computing tasks, the demands on system resources such as memory or storage can be tremendous. If you have extra computers or work in a networked environment, an easier approach is to use the X Window system and networking protocols to communicate with other systems and run other clients.

Thanks to AT&T Laboratories Cambridge and Red Hat, Red Hat Linux users can now enjoy working on the desktops of foreign operating systems with relative ease through virtual networking computing. Even better news is that the software, called vnc, is available under the GNU General Public License with source code for Linux, comes with the latest version of Red Hat Linux, and if downloaded in source code form, readily builds and installs under Red Hat Linux.

The vnc Linux software consists of several major components: an X server named Xvnc, a server named vncserver, a password utility named vncpasswd, and a network communication viewer named vncviewer. The vnc software is also available for other computers and operating systems, such as these:

The latest version of this software is available at http://www.uk.research.att.com/vnc. A compressed archive of binaries for Linux is available, and you can download the 2.5MB UNIX source code tarball.

Building and Installing the vnc Software

This section details how to download and install the vnc software. If you download the binaries, decompress the file with the tar command:


   # tar xvzf vnc-3.3.3r1_x86_linux_2.0.tgz

This creates a vnc_x86_linux_2.0 directory. Read the included README file in the directory, and copy the files Xvnc, vncserver, vncviewer, and vncpasswd to the /usr/local/bin directory. If you install the vnc software from your Red Hat Linux CD-ROMs, you'll find the command under the /usr/bin directory. If you download the vnc source, decompress the archive with the tar command:


   # tar xvzf vnc-3.3.3r1_unixsrc.tgz

This creates the vnc_unixsrc directory. Navigate into the directory and then start the build with the xmkmf command:


   # xmkmf

   # make World

Navigate into the Xvnc directory and build the vnc X server like this:


   # cd Xvnc

   # make World

Finally, install the vnc software (as root) with the included installation script, specifying an installation directory:


   # ./vncinstall /usr/local/bin

This completes your Linux software installation. However, if you want to work on the desktops of other computers, you need to download and install the vnc software for the desired platform. For example, if you want to work with a Windows 95 or Windows 98 desktop, download the Win32 vnc software onto the desired computer.

Enabling Virtual Network Service

The vnc server software must be started on a remote computer in order to work on the remote computer's desktop. Under Linux, this may be done through a Telnet session or by sitting at the console and starting the software.

To start the server for Linux, use the vncserver script from the command line:


   # vncserver
You will require a password to access your desktops.

Password:

Enter a password used to allow remote access and press Enter. The script then loads and starts the Xvnc X11 server (a customized X11R6.3 server based on XFree86 3.3.2).

In order to start the vnc server software on a remote Windows computer, the vnc software for Win32 must be downloaded and copied onto the remote Windows computer. The Win32 software must then be extracted with an archive utility such as WinZip.

Decompress the Win32 vnc software and install the software using the vnc Setup. You can run Win32 vnc software as a server or as a program. To start the server, click the Install Default Registry Settings menu item from the vnc folder on your desktop's Start menu, then click the Install WinVNC Service menu item.

If you run WinVNC as a program, click the Run WinVNC (App Mode) menu item. You'll see a dialog, as shown in Figure 28.11.

Enter a password in the dialog, and click OK. If you need to customize your settings or change the password for access to the Win32 desktop, click the WinVNC settings menu item. That's all there is to do! From another computer on the network, use the vncviewer command, along with the server Display Number (default of 0 for Win32) and password to log in to your computer.

28fig11.gif

Figure 28.11 The Win32 vnc software provides easy-to-use dialogs and menus you can use to offer remote operation via your network.

Viewing Remote Desktops

To view the remote Win32 desktop from Linux, use the vncviewer command, followed by the hostname or IP address of the Win32 computer. Type the command in an X11 terminal window like this:


   # vncviewer thinkpad.home.org:0

You are prompted for the password of the remote vnc server:

vncviewer: VNC server supports protocol version 3.3 (viewer 3.3)
Password:

After you type in the password and press Enter, an X11 window appears with the remote desktop (as shown in Figure 28.12). You can then launch remote applications and work on the computer as if it were your own!

28fig12.jpg

Figure 28.12 The Linux vncviewer client launches and displays a remote Windows desktop session.

You can also use the vncviewer client on remote computers to view the Linux desktop. The settings and X resource files for the Linux vnc desktop may be quite different from your normal X session! Look in the .vnc directory for the file xstartup, which will look like this:

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

Note that only a single X terminal and the twm window manager are used! Edit this file to suit your needs. Of course, with all this flexibility, remote sessions can get a little confusing. For example, Figure 28.13 shows a remote computer using KDE for its X11 session; this session is being viewed by a Windows 98 desktop, which in turn is being remotely viewed through a Red Hat Linux GNOME Enlightenment X session!

28fig13.jpg

Figure 28.13 A chain of three remote virtual network sessions can get a bit confusing, but works quite well thanks to the vnc software.

Share ThisShare This

Informit Network