Now the fun begins as I use trial and error to see which applications I can get to run. I'll start with Windows Calculator, so I'll click on
CALC.EXE and press the Open button, then the OK button. And, voila, I'm using Windows Calculator. You could easily while away an afternoon testing each application to prove to yourself which ones work. Or, you could do a search at either of the following sites:
The first site currently has 2,704 applications which have been tested with Wine. The second site has a much more user-friendly layout, but is still a work-in-progress.
Now, let's try something a little more interesting. I'll become the superuser and see if I can build and then run a Windows application using Wine. To find an application, I'll head over to
Also in FreeBSD Basics:
I'll click on the link for the "most popular" games and Solsuite 2001 sounds promising: 282 unique solitaire games. I download the executable which is called
solsuite.exe and save it to
Returning to an
cd /dos wine -winver win98 -managed solsuite.exe
And I receive an error message about a missing
.wine directory. Let's make that directory and copy over the configuration file for the superuser:
mkdir ~/.wine cp /usr/local/etc/wine.conf ~/.wine/config
Now when I repeat the
wine command, the installation wizard for the program begins. I follow through the prompts and watch as the files are copied over to their correct destinations. At the very end, the install appeared to hang, but it said that there was 0 minutes, 0 seconds remaining. I took my chances and used a
^c to end the install. Then I typed:
cd Program\ Files/SolSuite wine -winver win98 -managed Solsuite.exe
And it's time to phone up the neighbors and show off. I've successfully installed and run a Windows application from FreeBSD and renewed my interest in card games in the process.
As a final test, I'll reboot this computer into Windows 98. I'll click on the Start menu, "Programs", and I see a new entry for "Solsuite-Solitaire Card Games," but it's empty. Not to be deterred, I go into Explorer and double-click on "Program Files" then "SolSuite" and I see all the executables which is a good sign. I then double-click on the Windows folder, Start Menu, "Programs", and "Solsuite", and use my right mouse button to drag
SolSuite.exe into this folder. Doing this will give me a menu where I'll choose to "Create Shortcut Here".
I'll now return to my Start button, "Programs", "Solsuite", and "Shortcut to SolSuite", and I'm again prompted to choose my favorite card game. I'm impressed.
Now for the ultimate challenge. I'll move over to the computer that is totally dedicated to FreeBSD. Its hard drive is completely formatted with UFS and there are no Windows files on this computer. I'll start by becoming the superuser and creating some directories and empty files which Microsoft applications expect to see:
su Password: mkdir -p /usr/local/lib/win/windows cd /usr/local/lib/win/windows mkdir system touch win.ini cd system touch shell.dll shell32.dll winsock.dll wsock32.dll
Remember how we had to change that one line in
/usr/local/etc/wine.conf so it pointed to the mount point? I'll want to edit that line again, but this time I want it to point to my "fake" Windows directory structure like so:
[Drive C] "Path" = "/usr/local/lib/win"
I'll then create the proper directories and copy over the configuration file for both the superuser and the user genisis;
mkdir ~/.wine cp /usr/local/etc/wine.conf ~/.wine/config mkdir ~genisis/.wine chown genisis ~genisis/.wine cp /usr/local/etc/wine.conf ~genisis/.wine/config
Still as the superuser, I'll go back to Download.com and download the executable for Solsuite 2001, this time saving it to
/usr/local/lib/win. I'll then startup an XWindows session, open up an
xterm window and type:
cd /usr/local/lib/win wine -winver win95 -managed solsuite.exe
Again, the installation program does its thing. I receive an error message about not being able to find
Explorer.exe, but I ignore it. When it's finished, I then type:
cd Program\ Files/SolSuite wine -winver win95 -managed SolSuite.exe
It's a bit slow (but this is an older computer) and I have to tweak my display settings, but I'm playing a Windows card game on a box totally dedicated to FreeBSD. A person could get a bit giddy indulging in the Wine.
It looks like Wine is one of the FreeBSD ports that you could have a lot of fun with. If you experiment with it and find an application that works but isn't listed yet in the database, submit your entry to one of the sites I mentioned in this article.
Dru Lavigne is a network and systems administrator, IT instructor, author and international speaker. She has over a decade of experience administering and teaching Netware, Microsoft, Cisco, Checkpoint, SCO, Solaris, Linux, and BSD systems. A prolific author, she pens the popular FreeBSD Basics column for O'Reilly and is author of BSD Hacks and The Best of FreeBSD Basics.
Read more FreeBSD Basics columns.
Return to the BSD DevCenter.