As a student I am quite often confronted with (closed-source) Windows programs. These days there are a few tools that can help running Windows applications on Linux. One of these tools is Win4Lin, Win4Lin allowsone to install Windows 95, 98 and ME under Linux. The Windows NT branch is not supported yet, because Win4Lin sets up a special DOS environmentin which Windows runs.
However, according to the Netraverse FAQ support for Windows versions other than Windows 95, 98 and ME is currently under development. This review summarizes my experiences with Win4Lin 5.1. I use Slackware Linux, so the overview of the installation is based on that.
Technology
Win4Lin emulates an environment that is comparable to a usual Windows environment. First of all, Win4Lin adds some hooks add various places
in the Linux kernel, like the scheduler. These hooks are utilized by the mki-adapter module, which provides an interface to the hardware for the
Win4Lin BIOS. The BIOS and the kernel interface provide everything DOS needs to run.
There are a few advantages and disadvantages to this approach. First of all, it some users might not like the fact that Win4Lin makes and
uses hooks in the kernel. Besides that, the user is dependent on Netraverse for kernel patches. Fortunately Netraverse provides new
patches quite quickly after each new kernel release. The big advantage of this approach is that it is much faster than a real virtual machine
(like Virtual PC), hardware access by Windows is just translated to normal conventions of accessing hardware under Linux.
In contrast with VMWare and Virtual PC, Win4Lin does not use a hard drive image. Windows filesystem operations are translated to
operations on the Linux filesystem. This means that Windows is installed on the Linux partition. This makes files from the Windows
installation easily accessible.
Win4Lin supports two types of networking: WinSock (1 and 2) and VNet. WinSock networking integrates with an existing Linux network interface.
This approach requires no configuration, and will suffice for most daily network uses (for instance, web browsing and fetching e-mail). VNet
is a more advanced, but requires a bit more configuration. With VNet a separate IP address is configured for the Windows session. VNet is
required to support file and printer sharing.
Installation
Slackware Linux is not supported by Win4Lin, but the installation procedure is relatively simple. First of all you have to compile
a kernel with Win4Lin support, because there are no pre-compiled Win4Lin kernels for Slackware. The Netraverse site has excellent instructions
for patching vanilla Linux sources: here
To install Win4Lin the RPM package manager from the “ap” disk set is required (though some people might prefer using rpm2tgz). Win4Lin can be
installed using one of the following two methods:
- Use the Win4Lin Installer. This method works perfectly, and uses a graphical tool to install and configure both Win4Lin and Windows.
-
Download the full Win4Lin RPM with your Win4Lin account, and install it with rpm -i --nodeps package.rpm. The license code can
be entered by executing /opt/win4lin/bin/ask_license.sh afterwards. Finally, Windows can be installed by running the
win4linadmin command.
The Windows installation consists of two steps. The first step is performed as root, and creates an installable Windows image on the
hard disk. The second step installs Windows, this step is done as a normal user.
Usage
The first thing that surprised my after launching Windows 98 under Linux was the amazingly short boot time. On my Athlon XP1800+ Windows 98 boots in about 5 seconds. It is worth noting that there are two ways to start Windows/Win4Lin. The “win” command launches Windows in a X window, the “fwin” command starts an X server and runs Windows full screen, which gives the illusion that you are really running plain Windows, with fast boot up times. The good performance is not limited to the boot sequence, applications launch very fast, most of them at comparable speeds as on native Windows.
The largest limitation of Win4Lin is the lack of DirectX support. Even old DirectDraw programs do not work very well. For example, I tried to run some old games like Civilization: Call to power, with no success.
A nice feature, which is hidden somewhere on the Netraverse site, is the Appwrapper program (this can be found under “Miscellaneous Files” in the
member account screen). By replacing the default “explorer.exe” with appwrapper in system.ini, with an application as a parameter the specified
application will run in a Window on the desktop, as if it were a stand-alone Linux application. This feature is particularly useful in environments where one Windows program is used.
Enough talk! Let’s look at some action ;). I cannot test every single program, so here are just two examples I use in my daily life. The first
program you will see in action is Tarski’s World. I am a philosophy student, and logics is an important philosophy subject. So, I need my logic programs. Tarski is a program which gives students an introduction to first-order logic by using visual representations. As you can see, it just works.
Another suite of applications I sometimes need is Microsoft Office. I try to do my work with LaTeX or TextMaker as much as I can, but some documents are just a pain to convert decently. And sometimes I am flooded with so much work that I don’t want to care about conversion, and checking that others can correctly read the file without disruptions, etc. I know I get flamed for this, but in a world where most people are using Microsoft Office and where the time pressure high it is often more pragmatic to use Microsoft Office to do the job quickly (price is not really an issue, because universities have large software contracts over here in the Netherlands, which allow students to use commercial software quite cheaply). So, here is Microsoft Office on Win4Lin.
Configuration and tuning
Win4Lin provides the “winsetup” tool, which can be used to tune some aspects of the Windows environment. For example, normally 20 MB RAM is
reserved for Windows, this can be raised if you run applications that are memory intensive (20 MB should be sufficient for day to day work).
Another interesting feature is the “Drives & Filesystem” configuration, this allow the user to configure arbitrary Windows drives, and map parts
of the Linux filesystem to the drive. For example, in the default configuration the “D:” drive is mapped to $HOME/mydata/. Unlike VMWare Win4Lin does not need Samba to make the local filesystem accessible from Windows.
Netraverse provides an extensive guide with a detailed explanation ofconfiguration options: here
Printing
The most recent versions of Win4Lin install a default printer named “Default (local) Printer”, which is configured as an Apple LaserWriter
printer. This is a PostScript printer, and Win4Lin forwards printing jobs to this default printer to the default Linux printer. Thanks to ghostscript
one can send PostScript to a properly configured printer, without caring about the underlying printer language.
Conclusion
Win4Lin is a gem as it stands today. It is fast, configurable and a good solution in many situations. Compared to similar offerings it
is also very affordable, even for home users. In my opinion there are only two gaps that have to be closed. First of all Windows 2000 and XP
support, Windows 2000 is widely deployed in business environments and the TCO rises when Windows 9x/ME licenses have to be bought besides
the Windows 2000 licenses. Windows XP is the de-facto operating system for modern home computers, and many home users have a Windows XP license. The second gap is smaller, and largely applies to home users, namely the lack of DirectX support. Running games on Win4Lin might be out
of reach in the short term, but DirectX support is badly needed for some multimedia applications. As it stands today I rate Win4Lin 8/10, if they manage to support Windows 2000 for the next version, I can’t wait to review it ;).
Rating: 8/10
>The largest limitation of Win4Lin is the lack of DirectX
>support.
Untrue, the largest limitation of Win4Lin is the lack of USB support.
That depends on the use. If you use USB mass storage devices you can just mount them and provide them to Win4Lin. Keyboards and mice are also no problem, because they are handled by Linux. Only if you want to use Windows on Linux for using e.g. a webcam it is useful. But for most applications it is (IMHO) not a really big problem.
Simple alternative for those that want to use Windows software on Linux and that is to use Wine (free or Codeweavers CrossOver Office) and WineX for games. Difference between Wine and tools such as VMWare or Win4Lin is that Wine is not an emulator (Wine Is Not Emulation). Also Wine does not require a client OS to be installed such as required by VMWare and Win4Lin.
I have tried running Windows apps undr Wine/Crossover with varying degrees of success. Some run fine, some have severe graphical and other glitches, and some just won’t run at all. Assuming that whatever app you’re trying to run will work properly in Wine or CO, that’s probably the best option. But for everything else, there’s emulators
The problem with Wine is that it’s very flaky.
Almost every app other than the simplest ones require some tweaking of the settings to get it to run (if you’re lucky).
When it works it works great, but unfortunately it’s still alpha software.
[i]Almost every app other than the simplest ones require some tweaking of the settings to get it to run (if you’re lucky).
What they need is some sort of ‘app loader’ in the regular version of Wine .. such that if you wanted to install Kazaa++ (for instance), you would simply select it from a list and it would make whatever tweaks were necessary to make it work. Of course, volunteers would have to modify it every time a new version came out, but if you could run mutliple versions alongside each other, once something worked in one version, you could just keep it that way forever.
That didn’t come out very clear, so let me try again. When I said:
“Of course, volunteers would have to modify it every time a new version came out, but if you could run mutliple versions alongside each other …”
I meant:
Of course, volunteers would have to modify it every time a new version of Wine came out, but if you could run mutliple versions of Wine alongside each other, then you could keep using the Windows app in whatever version of Wine you first got it to work in, and wouldn’t have to mess with it anymore until some newer version of the Windows app were released and broke compatability.
Anyone know what the security implications of running Windows apps on Win4Lin are? In particular, can your Linux system now be infected by Windows viruses, worms, and trojans? Since Win4Lin puts Windows apps and data on a Linux file system, can Windows worms or trojans get access to data on the Linux filesystem, taking away one of the bigger security advantages of Linux?
I would like to switch the lone Windows PC in my house (it’s my wife’s) to Linux, but she needs to have some Windows apps (she teaches Photoshop and Illustrator, and needs to have them available at home; no, Gimp and Killustrator or whatever it’s called these days won’t do). I tried Wine, which didn’t support some of the apps she wanted. I tried Crossover Office, it didn’t either. Now my remaining options appear to be (1)stay with Win98 (ugh!), (2)Win4Lin, or (3)VMware. I’m looking for more information on pros and cons of each approach.
-Gnobuddy
Well, obiously the Windows system can get infected. But the Win4Lin configuration specifies which directories are available to Windows. By default D: is ~mydata. As long as you don’t give Windows access to the Linux files in the home directory there is no problem.
If you really want to isolate Windows you can create and use a seperate user running Windows.
Correct me if I’m wrong but doesn’t having an XP license mean you can use the license to install any older version on win32?
-DaMouse
can this run with linux PPC
Well, at least you’d have a hard time using your product number/serial code on another Windows version . But to answer your question: no. Even if you buy an upgrade from one Windows version to another, you are not allowed to use the old version.
No, you need Virtual PC for that.
I’ve been using linux since 1995. Back then there was dosemu for running dos programs, and there was wine (wine is not an emulator) for running windows programs.
Every year we were told that wine would be better, that it would work and support lot’s of new programs. Unfortunately, wine never seemed to deliver, at least for me.
How is it possible that after 10 years wine is still buggy alpha software?
Does Netraverse have any plans to implement an OpenGL wrapper (They would need to write an OpenGL.dll which would just access the Linux Native OpenGL library, no?) and maybe some of that directx stuff?
Win4lin creates a folder called .mappedfiles in each directory that it has acess to.
The main problem with this is, a lot of linux CDR tools have problems with this. You have to delete all of the .mappedfiles directories from the CD project to get it to burn.
To minimize this, I use samba shares for any folders I want win4lin to have access to. Since a samba share E: for /home/me/Documents is better than creating a native win4lin E: for /home/me/Documents
weather it can stand the differnt betwwen vmware and it. Me think that so is important because of the long journey one windows user has to come up despite the taff experience.
we use in the charité illhouse in berlin mostly a window pc, but we try to implement change.
so not so dependent of mircrosoft good is I think help netraverse.
on another hand dear Efgenia:
Osnews is a great whale on time. I enjoy lots of it. Please keep continue.
Love from the Berlin
Semjon
Some of the posts regarding Wine seem to point out issues revolve around Wine Alpha R & D. I run Wine with CrossOver Office, CrossOver Plugin and WineX (note you should uninstall Wine Alpha prior to installing the consumer versions). Both Codeweavers and Transgaming make it very clear not everything will work but they do a good job of improving on the product. Codeweavers for example lists several apps approved by them, tested by customers or soon to test. Sure it would be nice if the Alpha Wine worked like the consumer versions but they obviously don’t have adequate developer support. I didn’t assume when switching over to Linux that everything would be free. Not unless of course I develope a program myself.
Windows apps will certainly run better on native windows, and there is no money to be saved.
XP and Win2K are perfectly stable, there is tons of free software, both are secure enough – if you use a little common sense.
Some people prefer primarily Linux programs, but might have one or two Windows programs they can’t shake. Rather than dual-boot every time they want to run those few programs, having a way to run them in Linux would be a preferable solution.
just to add a note: you may even print using the RAW-option of Win4Lin -> e.g. You may want to print from Win4Lin to your local connected USB-printer using the original printer drivers supplied for Windows…
This kind of connection also allows you to use the advanced features of the window-drivers like cleaning, highest resolution and so on (sometimes cups miss some features)…
And its a fallback option if you screw up your CUPS configuration – as I just did 😉
(just print the pdf/ps file from linux through the win4lin-session 😉
I just bought Win4Lin v5 a couple of weeks ago and I have been very impressed with it. The installation was pretty simple (for Linux) and it really is *fast*.
BIG NOTE: As mentioned in the article, Win4Lin IS COMPLETELY USELESS for people who want to run 3D games or run programs that specifically require Win2K/XP. I was aware of the limitations though and knew it wasn’t an issue for me.
I have used WINE in the past and have always been completely unimpressed with it. (Your mileage may vary) But my experience with WINE was very spotty. Most programs wouldn’t run at all, and the ones that I was able to get working would only work … seemingly at random. Granted – if I had spent days/weeks messing with it, I probably could have had better luck. But I simply don’t have that kind of time.
Personally I think Win4Lin is the best way to run typical 2D Windows Applications under Linux. It’s not Open Source, so that will automatically eliminate the die hard idealists among you. But for people who have a some sense of realism, I’d recommend checking it out if you have the need. But spend a few seconds reading over their website to make sure it will do what you want before you buy it so you’re not disapointed that you can’t (for example) use your USB MP3 player under Win4Lin.
I can also vouch for their support staff. I had a couple of questions that I needed answered and they were very courteous and quick to respond.
Money well spent in my opinion.
I used to really like the idea behind Win4Lin. For those one or two Windows applications, it makes more sense to have a lightweight Win98 install. But nowadays, on these blazing fast machines a lot of people have, running VMWare is no big deal. I run it to get access to Windows XP Professional, only really for access to VS.NET, which I need for some of the work I do. As for other “necessary” Windows apps, I have Office XP and Photoshop 7 running under CrossOver Office and haven’t had a problem yet.
If you have a fast machine, VMWare will be unbelievably fast for you. On my 2Ghz machine, I can run XP full screen and it feels faster than some XP boxes I’ve played with running natively. The main limitation is, again, directx/graphics, but that’s not such a big deal if you’re not a gamer.
Still no 2.6 kernel support for Win4Lin !
can this run with linux PPC?
There’s actually a project going called qemu
http://fabrice.bellard.free.fr/qemu/
which has as one of its goals the running of Wine:
User mode emulation. In this mode, QEMU can launch Linux processes compiled for one CPU on another CPU. Linux system calls are converted because of endianness and 32/64 bit mismatches. Wine (Windows API emulator) and DOSEMU (DOS emulation) are the main targets for QEMU.
So basically you have a Windows API compatibility layer (WINE) running on top of a user mode CPU emulator (QEMU).
You can probably run MS Office on Wine on Linux/390 on Hercules/390 on Linux/x86 – if you’ve got the time!
There is. Netraverse provide 2.6.x patches ever since 2.6.0.
I hate to tell the purists but emulation is darn hard and perfect emulation almost impossible. I’ve heard emulation promises for 37 years in this industry, ever so seldom have I seen it really work well. The secondary effects are so hard to duplicate. You even have to duplicate the errors.
Stop looking at OSS as a religion and think of using the right tool for the job. If you need to run an application or exchange some document with an Office user, why fight it, just use Win and Office.
OTOH, if you want to use GNU/Linux for its many strengths (Windows apps compatibility not being one of them), then use that.
Like I just said about seven posts up, if it’s just a few Windows applications you need to run, it’s very time-consuming to have to reboot into Windows every time you need to run those few applications. I use Win4Lin for a few 2D DirectX games and for Finale (a music notation program), and it’s nice to not have to reboot into Windows every time I need to use Finale (which is two or three times a week because I make lead sheets for my church’s praise band.)
Win4Lin will pretty much work for anything that’s not a 3D game. I can only guess from the tone of your post that you haven’t used any of the emulators recently.
I have a dual boot setup, but I want my household to use Linux as exclusively as possible for two reasons:
1) I hate having to worry about viruses and trojans
(especially since McAfee now requires subscriptions for
virus updates after the first year)
2) Linux is both free as in beer and speech
The only reason why I absolutely would need to run Windows
programs is because a have a huge collection of Win9x based
2D games that my 2yr old son loves to play.
In my current dual boot setup, you have to reboot to
windows to play these games, and my wife is usually the one
who does this. The only other reason my wife uses the
computer is for e-mail and pictures. Both are supported
equally under windows and Linux on the dual-boot, but
she spends more time in windows because of the games
for my son.
If I had Win4lin installed, she could stay in Linux
to check e-mail and fiddle with pictures, but still
run the games for my son.
I appreciate whoever did this review. I have been a
little on the fence about purchasing Win4Lin, but I think
I’m convinced now.
still run the games
I could probably get by without the whole MS Office suite but I am hooked on Outlook 2003. When CodeWeavers supports that, I can go Linux and never look back.
Correct me if I’m wrong but doesn’t having an XP license mean you can use the license to install any older version on win32?
-DaMouse
You’re wrong. That was me correcting you.
“Civilization: Call to power”
On Windows? There’s a native port for Linux!
http://www.lokigames.com/products/civctp
http://www.happypenguin.org/show?Civilization%3A%20Call~*~@…
“Windows XP is the de-facto operating system for modern home computers”
Source? Good article btw, thanks.
“Civilization: Call to power”
On Windows? There’s a native port for Linux!
Yep, and it is actually very cheap. But I just wanted to test some older DirectX stuff .
It requires a kernel module that is not included in the kernel tree. If there is a security update to the kernel, as there was last week. You cannot apply the update until they come out with a “patched” kernel for your distro. Unless of course you are a kernel wiz and patch it yourself. I have spent countless hours trying to do that repeatedly and finally gave up and went to VMware, which simply re-compiles for whatever kernel you are running. If you are a freqent updater this is a fatal flaw.
Computers are so cheap now, I just dedicated a computer to windows 98 and run vnc to bring up a window for my law programs and microsoft word. Works great.
It doesn’t do games (screen redraw a trifle slow) but it works fine and no dual-boot.
It requires a kernel module that is not included in the kernel tree. If there is a security update to the kernel, as there was last week. You cannot apply the update until they come out with a “patched” kernel for your distro. Unless of course you are a kernel wiz and patch it yourself. I have spent countless hours trying to do that repeatedly and finally gave up and went to VMware, which simply re-compiles for whatever kernel you are running. If you are a freqent updater this is a fatal flaw.
Most kernel security patches are only between 1 and 20 lines. So, applying a patch almost never causes a problem.