Obtaining Wine and getting it to work - some links(This install tested using Redhat 6.2 under both Gnome and KDE)
Note: due to varying install methods, and testing different versions of wine source code and binaries; some of the following tutorial may be non-optimal.Some other relevant on-line resources for Wine:
|
Configuration Before Obtaining and Compiling WineThe important point here is that we are going to setup a /c/ directory as a "fake" C: drive. Wine will be configured to think of this as c:\ drive. And thus /c/windows is c:\windows, etc. Thus, when you want to put something via the Linux file system into C:\ , just CD to /c/. E.g., C:\wingx under Wine will be seen as C:\wingx if you create a /c/wingx directory. Also there are some minor Redhat Linux kludges we have to repair before Wine will run in a happy manner.
For common problems you may encounter getting a Windows program working under wine there
are solutions. E.g., to set a DOS Environment variables (In this case for WinGX):
Under bash shell use export WINGXDIR="c:\wingx" and under csh use set WINGXDIR="c:\wingx" in
your .cshrc file and env WINGXDIR="c:\wingx" from the command line.
Creating a ~root/,wine directoryThe Wine installer is presently minorly broken (probably assumes you are doing an upgrade and have run Wine before). After initially running the Wine Installer (with a failure to create the registry), we will have to run Wine as root (which will initialise some files for us), then continue on with the install. To hepl this process out, in the ~root directory (as root), make a .wine directory. mkdir ~root/.wine
Setting up the libraries path in LinuxIf not already, log in as root on Linux. In X-windows, run netscape and have this tutorial page open which can save you typo introducing errors by just doing cut and paste of instructions. By default /usr/local/lib is not in the library search path. To enable this, add /usr/local/lib to the file /etc/ld.so.conf and then run ldconfig. (if ldconfig if not found, make sure to su to root using su - so you collect roots default path)
Setting up the wine c:\windows area on the Linux file systemType the following commands which should be obvious to any Linux user what they are doing. mkdir -p /c/windows cd /c/windows mkdir system temp Profiles mkdir -p /c/windows/Profiles/Administrator mkdir -p "/c/Program Files" (It can be necessary to fool Windows programs and Wine that various files exist when in fact they are handled by the internals of Wine (using the touch command. This is because they will check for these files on startup even though their functions are handled internally using wine. This is not described here as the default does not require this) Done! Also, if a program requires some system based DLLs to run, just put them in aliased c:\windows\system directory (in the case of this tutorial) in /c/windows/system. There might be more to this depending on the program you are trying to install. |
Downloading and extracting the Wine source filesIf not already, log in as root on Linux. In X-windows, run netscape and have this tutorial page open which can save you typo introducing errors by just doing cut and paste of instructions. Go to the WineHQ at http://www.winehq.com/ and download the latest tar.gz source code.
In this case (9th July 2000 tutorial), http://metalab.unc.edu/pub/Linux/ALPHA/wine/development/Wine-20000526.tar.gz is the file to grab but updates come quick and often. Extract the source using the command: gzip -d < Wine-20000526.tar.gz | tar xvof -
|
Configuring the /usr/local/etc/wine.conf fileIf not already, as root, go into the extracted extracted Wine source directory. A wine.ini file is provided with the distribution in the extracted wine directory. Copy this file to wine.conf so you can edit it in safety (cp wine.ini wine.conf) (by default, you don't need to edit this - but Wine may not be able to access your CD-ROM and Floppy disks drives unless you tweak this file)
The important parts are making sure C:\ points to /c and making sure Wine knows about this. From the conf file:
You may have to confirm that the floppy and cdrom devices are defined correctly. If not change them that they are. (e.g., /mnt/cdrom instead of /cdrom. /mnt/floppy instead of /floppy) And under the section Tweak.Layout confirm the default to be Win95
Edit/confirm this in wine.conf and then copy the wine.conf file in the /usr/local/etc/ directory. Before continuing and compiling up the source code, the wine.conf file must be copied into /usr/local/etc/ otherwise the autocompile will fail to configure, then install the default registry components in /usr/local/etc/.
If wanting to install and run applications like Office 95 and/or Office 97, you may have to take note of the advice in http://www.winehq.com/source/documentation/no-windows. This can mean copying over some real Windows based files to make things happy.
Also, if at a later date you have to browse a CD-ROM. To made browsing a CD-ROM happier, try
mounting the CD-ROM using the following command which makes the CD-ROM files case insensitive:
mount -o check=relaxed /dev/cdrom /mnt/cdrom |
Compiling and Installing the Wine binaries and librariesIf not already, as root, go into the extracted extracted Wine source directory. Assuming the /usr/local/etc/wine.conf file in in place; type the following (the will take a while to compile as Wine is quite a sizable program):tools/wineinstall This above command will, compile, install the binaries, do some tests then prompt you with some questions. When prompted if Windows was not found on your system, so I assume you want a Wine only installation. Am I correct? Answer Yes and confirm that you want /c as the fake C: drive (Note down any problems that occur at the end as this might tell you of some /c/Windows directories or registry setting files that you failed to install properly.) If the registry files failed to install (copy or create symbolic link) this could be due to there not being a /usr/local/etc/wine.conf or an installer glitch of which a workaround follows.
Setting /usr/local/bin in the root pathBy default, /usr/local/bin is not in root's search path (The Wine binary is installed in /usr/local/bin). To put this in the path for every session, do the following:
For Bash ShellEdit the .bashrc file in the home directory and insert:export PATH=/usr/local/bin:$PATH To enable this in the present session type: export PATH=/usr/local/bin:$PATH
For cshEdit a .cshrc file in the home directory and insert:set PATH=($path /usr/local/bin) To enable this in the present session type: env PATH=($path /usr/local/bin)
Running Wine and completing the install
As root, (making sure a /usr/local/etc/wine.conf file exists; making sure /usr/local/bin is in root's path); and making sure a ~root/wine/ directory exists; run wine: wine This will create the registry entries in the ~root/.wine directory such that tools/wineinstall will now complete the install correctly. (the installer seems to be minorly broken with respect to creating a default registry). Thus now type: tools/wineinstall
|
As a plain user, copy a Windows test program (solitaire is good) and test
out Wine by running it. (wine soli)
|