SDB:Installation and Use of Wine

Şuraya atla: kullan, ara


Symptom:

You have installed the applicationemulator wine and need to configure it.

Cause:

After Installation of wine there will follow the configuration.Please notice that the emulator won't replace MS Windows. To use wine a installed windows or parts of it is needed. The emulator doesn't emulate windows, it enables to use windows applications with linux.

Solution:

After installing wine with YAST, you'll find the configuration file in the directory: /etc/wine.conf To use the application-emulator, please edit following lines in the above mentioned file. For example:

[Drive A]
Path=/floppy
Type=floppy
Label=Floppy
Serial=87654321
Device=/dev/fd0

In the next section of the file, please name the directory of the Windows OS. Please make sure that the datas are really available.

[Drive C]
Path=/windows/C
Type=hd
Label=MS-DOS
Filesystem=win95

Now you add the CDROM-drive. Maybe you need to adapt the device Device=/dev/cdrom e.g. in Device=/dev/hdx

 [Drive D]
 Path=/cdrom
 Type=cdrom
 Label=CD-Rom
 Filesystem=win95
 ; make sure that device is correct and has proper permissions !
 Device=/dev/cdrom
 

Next line defines the temporary directory which is to be used.

[Drive E]
Path=/tmp
Type=hd
Label=Tmp Drive
Filesystem=win95

Drive F mostly doesn't need to be changed, it referes to the home directory of the specific user.

[Drive F]
Path=${HOME}
Type=network
Label=Home
Filesystem=win95

Now you need to specify the directory's where Windows is installed.

[wine]
Windows=c:\windows
System=c:\windows\system
Temp=e:\ 
Path=c:\windows;c:\windows\system;e:\;e:\test;f:\ 
Profile=c:\windows
GraphicsDriver=x11drv

In the [DllOverrides] Section for the time now there are no changes needed, the files which are requisited will be emulated.

[DllOverrides]
kernel32, gdi32, user32 = builtin
krnl386, gdi, user      = builtin
toolhelp                = builtin
comdlg32, commdlg       = elfdll, builtin, native
version, ver            = elfdll, builtin, native
shell32, shell          = builtin, native
lz32, lzexpand          = builtin, native
commctrl, comctl32      = builtin, native
wsock32, winsock        = builtin
advapi32, crtdll, ntdll = builtin, native
mpr, winspool.drv       = builtin, native
ddraw, dinput, dsound   = builtin, native
winmm, mmsystem         = builtin
msvideo, msvfw32        = builtin, native
mcicda.drv, mciseq.drv  = builtin, native
mciwave.drv             = builtin, native
mciavi.drv, mcianim.drv = native, builtin
msacm.drv, midimap.drv  = builtin, native
w32skrnl                = builtin
wnaspi32, wow32         = builtin

Then you can adapt the X11 graphic driver, presumed that you know what you are doing.

 [x11drv]
 ; Number of colors to allocate from the system palette
 AllocSystemColors = 100
 ; Use a private color map
 PrivateColorMap = N
 ; Favor correctness over speed in some graphics operations
 PerfectGraphics = N
 ; Color depth to use on multi-depth screens
 ;;ScreenDepth = 16
 ; Use XFree86 DGA extension if present
 UseDGA = Y
 ; Use XShm extension if present
 UseXShm = Y
 ; Enable DirectX mouse grab
 DXGrab = N
 

If you want to use additional font, you can add them in the following section [fonts].

 [fonts]
 ;Read documentation/fonts before adding aliases
 Resolution = 96
 Default = -adobe-times-
 

If you need serial interfaces, activate them to use e.g. a modem.

[serialports]
Com1=/dev/ttyS0
Com2=/dev/ttyS1
Com3=/dev/modem,38400
Com4=/dev/modem

The use the printer with wine is also possible. Enlist the interfaces where your printer is installed.

 [parallelports]
 Lpt1=/dev/lp0

 [spooler]
 LPT1:=|lpr
 LPT2:=|gs -sDEVICE=bj200 -sOutputFile=/tmp/fred -q -
 LPT3:=/dev/lp3

 [ports]
 ;read=0x779,0x379,0x280-0x2a0
 ;write=0x779,0x379,0x280-0x2a0
 

The Windows registry datas which need to be loaded.

 ;These are all booleans.  Y/y/T/t/1 are true, N/n/F/f/0 are false.
 ;Defaults are read all, write to Home
 ; Global registries (stored in /etc)
 LoadGlobalRegistryFiles=Y
 ; Home registries (stored in ~user/.wine/)
 LoadHomeRegistryFiles=Y
 ; Load Windows registries from the Windows directory
 LoadWindowsRegistryFiles=Y
 ; TRY to write all changes to home registries
 WritetoHomeRegistryFiles=Y
 ; Use new file format
 UseNewFormat=Y
 ; Registry periodic save timeout in seconds
 ; PeriodicSave=600
 ; Save only modified keys
 SaveOnlyUpdatedKeys=Y
 

The appearance and behaviour of the emulator wine.

 [Tweak.Layout]
 ;; WineLook=xxx  (supported styles are 'Win31'(default), 'Win95', 'Wi
 n98')
 WineLook=Win95
 

In the Section programs] the applications can be loaded with the start of wine

[programs]
Default=
Startup=

This Section is for appearance and behaviour of the console:

 [Console]
 ;Drivers=tty
 ;XtermProg=nxterm
 ;InitialRows=25
 ;InitialColumns=80
 ;TerminalType=nxterm
 

This Section if used as storage and can remain:

[Clipboard]
ClearAllSelections=0
PersistentSelection=1

Please notify, that the above mentioned configuration file is just an illustration and some entries may vary. Please just make entries where you sure about or which are needed to use wine. After making the entries and the windows partition is in the linux filesystem you can use with wine applications from windows with linux.

To start a windows application, do following:

wine "file.exe"

or

wine "file.bat"

Additional information about wine will be maintained at:

http://www.winehq.com/ <keyword>wine,emulator</keyword>