Originally Published: Wednesday, 21 March 2001 Author: F. William Lynch
Published to: daily_feature/Linux.com Feature Story Page: 1/1 - [Printable]

An End to Your Windows Woes

Interoperation is one of the most common problems faced by a Linux user. In this article William Lynch gives a straighforward overview of your options for working with Microsoft Windows software and Linux together.

   Page 1 of 1  

It's been my dream for months to cast off the chains of proprietary Microsoft Windows software entirely, and though that day has not quite arrived, its closing fast. Through the use of Win4Lin software from NeTraverse (formerly TreLos) I can now run every Windows application I need under Linux.

I'm sure most of you have seen/heard of/played with VMWare, and many of you may know of plex86 (formerly FreeMware). These are both emulators that allow a lesser degree of virtualization on the x86 platform, which allows one to run multiple operating systems concurrently. VMWare has the disadvantages of being both expensive ($299 for a full license or $99 for a student license), and resource hungry. Plex86, despite its promising appearance, is still very much pre-alpha and in fact lacks an installer altogether at this stage. However, if you have specific applications that require Windows NT or 2000, or you need to virtualize an entirely different OS such as FreeBSD, VMWare and Plex86 are the only options available at this point.

Why not just use Wine, KOffice, or StarOffice?

While I've already addressed the shortcomings of VMWare and Plex86, that's not to say there aren't other solutions out there for Windows compatibility. For Linux users who need to be able to exchange files with others in native Microsoft formats, an emulated Windows environment seems to be the only option, at least for the moment. As far as office software is concerned, Star Office is just too resource intensive and not yet 100% compatible with the file formats of Microsoft Office. According to the Koffice FAQ, KWord will likely never be able to write files in native Microsoft formats.

While Microsoft Office compatibility is one of the more obvious reasons why many users still cling to Windows, it certainly isn't the only reason. Consider the Wine project, which proposes to emulate the entire Win32 API in Unix system calls. Ultimately, the Wine project, 8 years in the making, will allow any Windows application to run on Linux at as close to native speed as possible. Unfortunately, the project is still under alpha-level development. While Wine gets closer and closer to a 1.0 release, it looks more and more interesting (especially the Code Weavers previews), but it certainly isn't complete or ready for general use just yet.

Win4Lin - An Adequate, if not Open Source Solution

What I'm leading up to here is, of course, a solution that will allow you to run MS Office (and many other Win32 programs) under Linux. Enter Win4Lin. Win4Lin can be considered as a sort of optimized subset of VMWare, in that while it's limited to DOS and Win9x OSes, it runs much faster and with a somewhat smaller memory footprint than VMWare. And, at about $60 per license it's cheap! Win4Lin performs beautifully on my Dell Inspiron 3800 laptop. I've been able to run every program I've tried so far including Word, Excel, IE, Acrobat, Paint Shop Pro, SecureCRT, Winzip, NewsBin Pro, and WinRAR. I can even play DivX video files with Windows Media Player 7 (and proper codecs). Speed seems to be about 90% or so of native performance.

File Sharing Between Operating Systems

Interoperation between the virtualized Windows OS and Linux is also much simplier with Win4Lin than with VMWare's implementation. With VMWare, you have no access to the virtualized file systems from within Linux and all file transfers occur through a modified version of Samba that may interfere with your other SMB sharing. In Win4Lin, the primary filesystem is just a directory tree under your Linux partition (ext2, or reiserfs in version 2.0.2), so you can copy files in and out with no difficulty, even during an open session.

If your Linux box is dual boot, Win4Lin can also access Fat32 partitions with some minor configuration. Primarily, you will need to add read and write permissions to the partition's device file. The security astute person would point out that ordinarily adding global read/write permissions to a device file is ill advised. However, because Fat32 filesystems are trivially secure to begin with, the risk exposure is minimal compared to adding users to the "disk" group which would allow them access to other non-Fat32 partitions that need to remain secured. Once users have permissions to access Fat32 partitions under Linux, they can be accessed under Win4Lin as local disk drives. Also, Fat32 filesystems cannot be mounted in Linux while in use under Win4Lin.

Networking Setup

Unlike VMWare, which requires additional network configuration, Win4Lin's networking works out of the box, but only for TCP/IP connections. According to NeTraverse's whitepaper, the native Windows winsock dynamic link libraries wsock32.dll and winsock.dll are replaced with win4lin.dll that translate's all TCP/IP function calls into Linux equivalents without the use of an additional IP address. Consequently, since there is no network adapter in the virtualized Windows OS, it cannot directly connect to SMB shares on the local network. Its still possible to access network shares by mounting them under Linux and exporting them to Windows, however.


Of course, no solution is perfect and Win4Lin does have significant drawbacks:

  • You must use a Win4Lin hacked kernel binary, or rebuild your existing kernel using NeTraverse's kernel patch. Currently, these are 2.2 kernels only, although I would expect 2.4 kernels are forthcoming. For the kernel patching squemish the Win4Lin installation script will automatically install the kernel binaries without overwriting your existing kernel, if you're running a recent version of a major distributrion such as Red Hat, Mandrake, Caldera or SuSE.
  • NeTraverse's website is difficult to follow in places and most documentation available such as the installation instructions is superficial, which can get annoying for experienced Linux users who would really like to understand what's happening behind the scenes.
  • Windows sound only works if you are using OSS (free or pay) drivers in Linux. Alsa drivers are unsupported (and won't work, I tried).
  • Gaming probably won't work very well since DirectX is unsupported. NeTraverse expects support for DirectX to be included in future releases, however.
  • There is no direct cut and paste available between Linux and the virtualized Windows OS.


Many Linux users, including myself, long for the day when we can run 100% Open Source software, but until that day arrives Win4Lin is an excellent and inexpensive way to bridge the gap between Windows and Linux. If you want to try it yourself you can download an evaluation copy from NeTraverse. The evaluation license is good for 30 days and allows you to run the software for one hour time periods.

About the Author William Lynch is a technology consultant for Crave Technology in Denver, CO. He spends every waking hour either in front of a computer, practicing martial arts or watching hockey.

   Page 1 of 1