[Penguin Logo]

Linux for Newbies, pt. 21:
Linux/Windows Coexistence

by Gene Wilburn

(The Computer Paper, Apr 2001. Copyright © Wilburn Communications Ltd. All rights reserved)


As we start winding down this Newbies series, it's time to take stock. You've come a long way since you first worked up the courage to grab a distribution CD set and dive into fascinating and rewarding world of Linux. If you've stuck with it this long, you're probably ready to purchase that big, shiny attitude button that reads: "The box said 'Requires Windows 95 or better' SO I INSTALLED LINUX" (button available at www.thinkgeek.com). After extended exposure to Linux, Windows becomes less and less interesting.

However, as uninteresting as Windows is, it's hard to ignore entirely, especially if your day job requires it. And, to be fair, there are many Windows programs that outshine anything yet available for Linux. When your job requires MS Office (not a semi-compatible substitute), you need Office. Likewise for Lotus Notes client, Visio, QuickBooks, or any number of applications that you share with co-workers.

For most users, Linux/Windows coexistence isn't an option; it's a necessity. You may prefer using Linux most of the time, and you've found many substitutes for Windows programs that not only work well, but are free, but there are still times when you may need to run Windows programs.

The commonest approach to this dilemma is the classic dual-boot Linux/Windows setup via LILO or another boot manager. When you need Windows, you boot into Windows--otherwise you stay booted in Linux, or vice-versa. This is workable if you don't have to switch too often, but if you have a frequent need for both operating systems, it quickly becomes a pain in the, er, boot sector.

There are two fundamental approaches to simultaneous coexistence: combining Linux/Windows functionality on a single computer, or running them on two separate machines. The approach you take depends on what resources you have available, and how much you're willing to spend.

Single Computer Solutions

If you only have a single computer available, but it's a good one (modern, fast CPU, very large drive, lots of memory), you're a candidate for one of the virtual hosting environments such as VMWare or Win4Lin.

VMWare (www.vmware.com) is an elegant package that allows Linux and Windows to run at the same time by creating virtual machines on one box. Those of you with long memories may remember virtual DOS systems that worked pretty well in their day.

VMWare is a thin layer of software that sits between the Intel architecture and the operating systems layers, virtualizing and managing all hardware resources. It provides access to IDE and SCSI drives, CD-ROMs and sound devices. All the operating systems installed have access to networking, dial-up and file sharing. The main VMWare product, called VMWare Workstation, can host combinations of Linux, FreeBSD, Windows 95/98, Windows NT and Windows 2000.

VMWare allows you to add operating systems without repartitioning or multi-booting and you can pop in and out of operating systems at will. VMWare Workstation lists for US$299. There is a new addition to the VMWare line, VMWare Express, that lists for $US79. VMWare Express allows Linux users to run Windows 95/98 software, with full access to hardware devices such as modems, scanners, printers, etc. It provides full networking access and file sharing to Windows apps under Linux.

Evaluation downloads of both VMWare Workstation and VMWare Express are available at the VMWare website.

Win4Lin Desktop 2.0 (www.netraverse.com) has been gaining in popularity and is probably the reason why VMWare has released a less-expensive Express version. Win4Lin is a more scaled down product that, like VMWare Express, allows you to run Windows 95/98 products in Linux. Among the Windows products listed under its support page are MS Office, Intuit Quicken, Lotus SmartSuite, Adobe Photoshop, Intuit TurboTax, MS Internet Explorer, Palm Desktop, Netscape Navigator and Winamp.

Win4Lin lets Windows programs to share hardware resources with Linux, including printers, network cards, modems, and sound systems. Win4Lin has been designed to make recovery of Windows applications easy. There is a protection layer whose job is to prevent badly behaved Windows applications from crashing the entire system.

There is an evaluation download of Win4Lin available at the Netraverse website. Win4Lin lists at US$89.99 and is sometimes available on sale for US$50.

The granddaddy of the "run Windows under Linux" products is WINE (www.winehq.org). WINE is also the least reliable. It is an open-source project that has been developing a Win16/Win32 application API layer that lets Windows applications to run via underlying X Window calls. It's a noble volunteer effort but the results are spotty. A few applications run well, but many only partially work and many more do not work at all. Still the price is right--it's free.

The main downsides to products such as VMWare and Win4Lin are the resourcing demands of virtualizing. For it to work smoothly and with anything close to native speed, you need a fast CPU and plenty of memory. Both VMWare and Win4Lin support SMP and can benefit from dual processors. If you have the MIPS and a bit of cash, they are elegant solutions.

Multiple Computer Solutions

A more common scenario is this: you purchase a new computer for yourself or the family, which often comes with the latest and greatest version of Windows. The older machine gets recycled into a Linux box. Now you've got two computer systems and you've got some issues with space and location--not to mention how to share monitors, keyboards, etc. Above all, it's often inconvenient to move from one computer to the other unless they're side by side.

If the Linux box is mainly used as a server, and you don't need X Window, or don't need it very often, then it's easy to run the Linux box headless (without monitor), hook everything up to your home network, and simply telnet in to Linux from your Windows workstation to administer the system.

Telnet command-line access is one of the oldest and most reliable ways of remotely using a Unix or Linux system. Command-line setups work very well on 386 and 486 units that have been left behind by Windows, making it possible for you to recycle old computers that would otherwise be destined for landfill.

But if your Linux box is a Pentium class or higher unit, you may be enjoying the X Window environment. Fortunately there are ways to access both your Linux and Windows computers from a single graphical console, allowing you to do all your work in one place.

The thing that makes X Window so versatile is that, unlike Microsoft Windows, X is a client/server architecture. To avoid the confusing terminology that exists for X Window, let's simplify to say you can run Linux programs on one machine, and control and view the results on another. Similar, in a way, to PCAnywhere, but with more versatility.

The problem is that X is not native to Microsoft operating systems, so you must obtain a X Window package for that environment if you want to work in a scenario where you do all your work from your Windows workstation. Two of the most popular commercial high-end X Window products for Windows are Reflection-X and Hummingbird Exceed. Both are very solid but neither is cheap. With one of these products installed, you can telnet to your Linux box, set the display for remote, and launch programs that appear on your Windows computer.

Let's say your home network is based on 192.168.1.0-255 and your Windows machine is 192.168.1.5. To beam an X program to your Windows desktop from Linux (assuming you have Reflection-X or Exceed running) your telnet session will look something like this:

Voila, Emacs will suddenly appear on your Windows box under full mouse and keyboard control of Windows. Some products work very well this way and others are a little problemmatic. Netscape, Emacs and vi are fine but products like the GIMP don't work as well across an X network to Windows.

There are some less expensive X Window packages available for Windows but in terms of features and reliability, they lag behind the industry leaders.

VNC

One of the hidden treasures of the open-source world is a product from AT&T Labs UK that has been released under the GPL. Called VNC (Virtual Network Computing), it's a totally free solution to computer sharing that is about as versatile as a product can get. You can use it as a connector between Linux and Windows, Linux and Macintosh, Windows and Windows, Windows and Macintosh, or any combination of these.

VNC is something of a cross between X Window remote sessions and PCAnywhere. There is a client (viewer) version available for Linux, Windows and Macintosh, and server versions available for Linux and Windows.

If you're still mainly a Windows user who dips into Linux from time to time, you can set up the server on Linux and the client on Windows and view X sessions on your Windows desktop. Conversely if you prefer working in Linux in GNOME, KDE, or your favourite X Window manager and only need limited access to Windows programs, you can put the server on Windows and use the Linux viewer to run Windows programs while you're in X (see fig. 1)

There are even Java components for VNC that allow you to run a viewer in a browser as a Java applet.

VNC offers a few other advantages over X Window packages on Windows. You can close a VNC session and pick it up later right where you left off. If you have more than two computers on your network, you can close a session on one computer and pick it up on another. (VNC sessions are password protected, of course). I've become so fond of this product that I run a VNC server on every system in the house, allowing me to use any computer from any other computer.

Of course YMMV (your mileage may vary). One of the downsides of remote sessioning is that you experience some lag in display and responsiveness. But if you have a distributed network in your house and don't want to put Windows and Linux on the same machine, take a trip to www.uk.research.att.com/vnc and try out the Linux and Windows versions of VNC. It could change the way you do computing.

Gene Wilburn (gene@wilburn.ca) is a Toronto-based IT specialist, musician and writer who operates a small farm of Linux servers.

-30-