c't 7/98, page 170 - Translation by Sabine Cianciolo
Windows emulators for Linux
Linux is a mature operating system for the PC with gigabytes of capable, mostly free software on the Internet. Nevertheless, there can be good reason for wanting to work with Windows programs as well.
The times when there was not even basic software for Linux are over: meanwhile there are useful applications for most purposes. The wish to use Windows applications under Linux does not seem to be that rare, however; three programs compete to deliver Windows software to the Linux desktop. But a direct comparison would be unfair: Wabi 2.2B is a commercial product shipped by Caldera for 49 US-$, while the Willows Twin Libraries 3.1.5 and Wine are available for free.
The three programs also take different approaches regarding the technical realization: Wabi and Wine are emulators that execute Windows applications under Linux by capturing Windows API calls and substituting them for X-Window routines respectively. Wabi is restricted to Windows 3.x programs, needs an original Windows 3.x and claims to be a stable product for users; on the other hand Wine is capable of running a few Windows 95 applications (Win32), does not necessarily need a Windows installation and is explicitly marked as an Alpha version. Twin Libraries are following a more advanced approach by trying to make the Windows API available as libraries across all platforms. The Windows emulator xwin is only a system specific interface for these libraries.
WabiWabi is based on Sun's Windows emulator with the same name. We had no problems installing it on a machine with SuSE-Linux 5.2 (kernel version 2.0.33, XFree86 3.3.2). Wabi uses only about 10 MByte of disk space. Depending on the documentation on their server Caldera sometimes recommends 24, sometimes 32 MByte of RAM; we did not encounter any memory bottlenecks on our test computer equipped with 32 MByte.
No windows without Windows When starting Wabi for the first time it demands the Windows installation disks. Wabi is not satisfied with an already installed Windows. All Windows 3.x versions may be used; for Windows for Workgroups 3.11 a warning about not supporting the network functionality of WfW is displayed at this time.
Windows is installed in the home directory of the respective user. This means that every Linux user must install his own Windows, which might have its advantages regarding the Windows configuration but also costs 20 MByte of disk space each time. It is supposedly possible to install Windows in a different directory that is accessible for all users, by using the environment variables $WABIDIR and $WABIHOME that are described in the documentation; however, I did not succeed in installing an executable version this way.
Wabi launches with the familiar window of the Program Manager with the three program groups known from Windows. Whether it is Paintbrush, File Manager or Windows Help: all applications included in Windows work; only the network functions are not available. It is recommended to start Wabi with the parameter -SF (small fonts) on displays with high resolution; otherwise the names of the icons are partially overlapping. With wabi -s program name, a Windows program can be launched directly without loading the Program Manager as well.
The first trials with Wabi revealed that important keys - Enter, Tab, Backspace - do not work. The FAQ list on Calderas Wabi page offers the explanation: Wabi is not compatible with the XKeyboard extensions implemented with XFree 3.2. This can be remedied by loading an older version of the X11 libraries and a changed start skript and installing it according to the instructions. Afterwards the keyboard worked almost perfectly; only the Alt key was not supported. Therefore familiar shortcuts like Alt-F4 are not available; other standard key combinations like for example Shift-Del or Ctrl-Ins can be used as usual.
In the system control the system module has been substituted with the 'Wabi Configuration Manager'. This application assigns Linux directories to the DOS drive letters and maps the serial interfaces and already installed Linux printers to COM and LPT ports. Wabi enters sensible settings without any intervention from the user; for example the Wabi installation directory, the Root directory and the own Home directory are mapped to different drive letters.
Windows everywhereWabi draws its windows as 'seamless windows' in any location on the X-desktop while bypassing the installed X11 window manager. If you are using a modern window manager with several virtual screens (like fvwm or kde), Wabi windows appear on every virtual screen.
The emulator uses the regular Windows True-Type fonts that are displayed and printed correctly. Even printing on network printers installed under Linux worked without any problems. WinSockets offers network functionality, at least a few TCP/IP based programs like telnet or Lotus Notes can be utilized. However, direct access to Windows networks or Novell servers is not possible. If for example Netware or NFS volumes are mounted on an appropriate Linux client, it may be accessed from Windows programs as well.
For data exchange between Windows programs Wabi offers the Windows clipboard and OLE. Texts may also be exchanged between Wincows and X11 applications via clipboard. Though this method is not available for graphics and other more complex data formats.
Big chunksBy using the respective setup programs Winword 6.0, Excel 5.0, Photoshop 2.5 and Quicken 6 including Video for Windows 1.1 could be installed without problems. Both the Microsoft applications and Quicken launched without complaints; Photoshop on the other hand refused to work while displaying the error message that there was not sufficient RAM. Wabi's documentation points out that this error message usually masks other problems - unfortunately it is not revealed what kind of problems and how to solve them.
Whether it was loading, saving or printing of documents, clipboard functions or embedding of objects: all program functions of Winword, Excel and Quicken worked as expected A resource hungry program like Word for Windows 6.0 ran under Wabi at sufficient speed; even on a 486/100 large documents could be processed in acceptable speed. Quicken's demo video ran smoothly on this computer as well.
Program crashes happened very rarely and could not be reproduced; I was not able to find out whether they were caused by Wabi or the Windows programs. Problems mainly occurred in situations where I have also experienced several crashes under Windows, like complex OLE transactions or working on large documents with Winword 6. The stability of the Linux system was not affected by the crash of a Windows program in these cases, nor was there any damage to the file system; however, Wabi usually crashed as well during these incidents.
CommunicationInstalling the communication software for Psion organizer was another test. These programs communicate with the organizer via the serial interface. The installation was uneventful; the first start of the backup program failed with the message that the serial device must have read and write authorization for regular users first. Afterwards - and after restarting Wabi -it was possible to access the serial port; but the Psion software complained about not getting a timer from the system, and consequently refused to work.
Sun has published a list of 16 Windows applications that supposedly run under Wabi without any problems. Of course programs that are not on this list could also work, but there is no guarantee for that. Tricky is any software that includes network functionality, uses undocumented Windows functions or even bypasses the Windows API. Wabi does not possess its own DOS emulator and therefore cannot execute DOS programs. Since Wabi is restricted to 16-bit programs, Windows 95 or NT applications do not run either.
WineThe development of Wine is similar to the history of Linux: many programmers worked together on the project of a freely available Windows emulator for Linux while coordinating the development on the Internet. Frequent updates and a certain support for Windows 95 and NT programs already are one consequence, as well as the Alpha version status that has been existing for years now.
The Wine archive (version from 13.4.1998) only contains the source code of the emulator. Therefore a compiler run is necessary before executing the program, but this proofed to be unproblematic due to the included configuration script and makefile. Afterwards a "make install" copies the necessary components to /usr/local hierarchy.
The Alpha status of Wine - the programmers point out explicitly that currently Wine is still a developer version - is also mirrored by the included documentation: the Wine Reference Manual discusses a few aspects of the Win32 API and its implementation in Wine, but the chapter about installation and configuration does not contain any text yet. The added man-page and the README file only offer short hints regarding installation and use of the program.
Handy WorkThe user must enter the configuration settings for Wine in the file /usr/local/etc/wine.config himself. This file has a similar structure as the Windows INI files and determines how the Linux paths are assigned to drive letters, which LPT ports belong to printers installed under Linux, and which devices are addressed as COM1 and COM2. A path to an already existing Windows installation may be entered here as well; in this case those INI files and DLLs are used to a certain extent.
Wine is a distinctly less finished product than Wabi, but it also follows a more advanced approach: While Wabi only represents an environment for running Windows programs, Wine aims at not using Microsoft components at all. The complete Windows API should be mapped to X-Window functions. The difference becomes apparent when working with fonts: Wabi uses the TrueType fonts of Windows while Wine utilizes X11 fonts.
Though it was possible to launch the program manager of an installed Windows for Workgroups 3.11 with Wine, it did not display any program groups. Via the menu 'run' most of the included applications launched; only the file manager refused to function. Windows Help also worked. A standard printer could not be enabled in the control panel: the printer module worked but it obviously did not save the selected settings. Consequently some programs complained about the missing standard printer. The font module did not find any installed fonts; Windows Write offered the fonts installed under X, however.
Like under Wabi the Wine windows may be placed anywhere on the screen. With the parameter -managed the user determines whether to leave the windows management to the X11 window manager. In this case the Wine windows behave like regular X windows and also respect virtual screens. Of course the window manager can be bypassed, accordingly the windows are drawn directly onto the X screen like in Wabi. I did not notice a difference in performance or stability between those two modes.
HungryWine appears to be quite hungry for resources. On the test computer with 32 MByte every launch of a Windows program under Wine was accompanied by a distinct increase of swap files. The work performance also does not come close to Wabi. On the other hand there is better support for the keyboard. Alt-F4 and the shortcuts for navigating in the menus work just like under Windows. Via the clipboard texts can be exchanged between Windows and X11 applications.
Word for Windows 2.0 could be installed without problems. Winword 6.0 and Excel 5.0 refused the installation with the unfounded message that the initialization file had errors. Winword 2.0 launched in Wine, the basic functions worked; the font selection displayed a vast emptiness, however, and the print capabilities could not be tested because it was not possible to install a printer in the control panel.
Photoshop 2.5 could be installed without problems; but the program did not launch under Wine: Wine immediately displayed a 'segmentation fault' of the Windows program. Quicken's installation program did not crash and nor did it display an error message, but it also did not install - after showing the introduction screen nothing happened. The same phenomenon occurred during installation of the Psion software.
The version of Winword 6.0 installed under Windows managed to get to the start screen under Wine, but nothing happened from then on. Excel launched correctly but did not allow any entries and crashed after a few activities. Wine refused any launch of Quicken and Psion software with a 'segmentation fault' error message, same procedure as with Photoshop.
One positive aspect is that Wine displays exact information about errors while launching Windows programs, like for example missing DLLs; this makes it easy to identify such problems. After a program crash it also shows detailed information about the cause - thus enabling developers to pinpoint bugs and API gaps in Wine.
32 Bit?Wine already contains rudimentary support for 32-bit programs. Therefore it was possible to launch Wordpad and Paint taken from a Windows 95 installation. However, the functionality of both programs was quite restricted still. Wordpad for example did not recognize Winword 6.0 files during import, neither the print dialog nor help worked, and saving in Word 6.0 format produced empty files. Similar to Paint it crashed repeatedly without affecting the Linux system.
Nevertheless, Wine basically runs Windows 95 software, and a lot of development is going on especially with the Win32 parts. The present status quo of development can be read on http://www.winehq.com. A relatively current list of the 16 and 32-bit programs tested under Wine can be found at http://www.geocities.com/SiliconValley/Bay/4901/linux-www.html.
Willows Twin LibrariesWillows Software ships the Twin Libraries also as a source code that needs to be compiled. This did not present any problems. Before compilation the user can determine with a configuration script whether debug code and Win32 should be implemented. The compiled libraries and the Windows emulator xwin or its 32-bit version xwin32 which resemble only a system specific interface to the libraries in the Willows concept, are installed in the /usr/local hierarchy. Contrary to Wine a fairly explicit user documentation accompanies the program.
UniversalThe Twin Libraries are neither restricted to Linux nor to the Intel platform, but also support other operating systems - besides different Unix dialects also MacOS - and processors, like for example PowerPC or MIPS. The source code is subject to the Gnu GPL. Willows Software aims at offering the Windows API as a programming interface on a variety of platforms.
The text file .twinrc in the home directory of the user is used for configuration. It maps the Linux directories to the drive letters. The user must also enter a Windows directory in this file. But this directory does not need to include an original Windows; only the setup.reg and win.ini files as well as the subdirectory system are necessary. The Windows programs store their DLLs there, and the control panel searches for its modules there for example. Of course the user can also enter the directory of a 'real' Windows installation that has been mounted under Linux.
The Twin Libraries leave the window management completely to the X11 Windowmanager. Similar to the other programs the Windows screens may be placed on the desktop randomly. The display is quite slow, however; after clicking on a menu item it takes very long before the menu is built up. Another unpleasant point is that the program uses a font in the dialog windows that is very small and hard to decipher.
ModestProgram and file manager refused to work, therefore every Windows program must be launched with its own xwin call. The other applications included in Windows 3.x function more or less. The ability of the system control is very reduced though; it is hardly possible to apply any settings. Write crashed very fast while using different fonts. One positive aspect is that the Twin Libraries are more economical with the main memory than Wine.
The installation program of Winword 2.0 and 6.0, Excel 5.0, Photoshop 2.5 and the Psion software could neither be launched with xwin nor with xwin32. While trying to implement Quicken 6 with the Twin Libraries the program crashed right after displaying the introduction screen. The version of Word for Windows 6.0, Excel, Photoshop and the Psion software installed under Windows would not even start. Both the windows of Winword 2.0 and Quicken appeared on the desktop; however both programs crashed during the first user tasks. In these cases it did not matter whether the Windows entry in .twinrc pointed to the 'real' Windows directory with all DLLs and system components or to a directory that was especially installed for the Twin Libraries and contained only the absolutely necessary files.
Luckily xwin and xwin32 inform about all modules and DLLs that the launched Windows program wants to load. Similar to Wine this allows to locate problems that are only based on wrong paths or missing DLLs quite easily.
ResumeWabi clearly is the most useful solution, but it is not free and only restricted to Windows 3.x software. Additionally there is little flexibility when problems occur, because the user can configure the Wabi functions to a certain extent only and has no access to the source code. However, the supported programs run stable and with all functions. In the long run Wabi will not have a future though, since Sun already announced that they will not develop the program any further - this translates to no Windows 95 support in Wabi ...
These are the advantages of Wine. Even though this freely available Windows emulator has not nearly come far enough yet to be regarded as a working solution for users; but the already existing Window 95 support and the extensive developments on Wine let us hope for further progress.
The also freely available Willows Twin Libraries are not really a match for Wine.The cross- platform approach does not have any advantages under Linux, but it could be the cause for the slow performance. The emulator supports significantly less Windows programs than Wine, and not even all the accessory programs included in Windows work. Developers are already thinking about support for Windows 95; Willows Software promised to continue developing the Twin Libraries. (odi)