From 73c23f49585804531ec1e25128481aa43ceb8824 Mon Sep 17 00:00:00 2001 From: Richard Stonehouse Date: Tue, 6 Jul 2004 21:03:57 +0000 Subject: [PATCH] Updated for the new 'dosdevices' directory system. --- documentation/configuring.sgml | 321 ++++++++++++--------------------- 1 file changed, 115 insertions(+), 206 deletions(-) diff --git a/documentation/configuring.sgml b/documentation/configuring.sgml index 6b8ad8a0384..71cc5deefb5 100644 --- a/documentation/configuring.sgml +++ b/documentation/configuring.sgml @@ -208,11 +208,6 @@ The settings available in the configuration file include: - - - Drives and information about them - - Directory settings @@ -301,11 +296,6 @@ - - [Drive x] - yes - Sets up drive mappings to be used by Wine - [wine] yes @@ -326,16 +316,6 @@ yes Font appearance and recognition - - [serialports] - no - COM ports seen by Wine - - - [parallelports] - no - LPT ports seen by Wine - [ppdev] no @@ -399,17 +379,6 @@ Now let's explain the configuration file sections in a detailed way. - - - The [Drive x] Sections - - For a detailed description of these configuration file - sections which are used to set up DOS drive mappings to Unix - directory space, please look at the Wine file system layer - configuration section. - - The [wine] Section @@ -427,8 +396,8 @@ For a detailed description of drive layer configuration and the meaning of these parameters, please look at the Wine file system layer - configuration section. + linkend="config-drive-main">Disc Drives, Serial and Parallel + Ports section. "GraphicsDriver" = "x11drv|ttydrv" @@ -589,41 +558,8 @@ - The [serialports], [parallelports], [spooler], and [ports] Sections + The [spooler] and [ports] Sections - Even though it sounds like a lot of sections, these are - all closely related. They are all for communications and - parallel ports. - - - The [serialports] section tells wine what serial ports it - is allowed to use. - "ComX" = "/dev/ttySY" - Replace X with the number of the COM - port in Windows (1-8) and Y with the - number of it in X (Usually the number - of the port in Windows minus 1). ComX - can actually equal any device - (/dev/modem is acceptable). It is - not always necessary to define any COM ports (An optional - setting). Here is an example: - "Com1" = "/dev/ttyS0" - Use as many of these as you like in the section to define - all of the COM ports you need. - - - The [parallelports] section sets up any parallel ports - that will be allowed access under wine. - "LptX" = "/dev/lpY" - Sounds familiar? Syntax is just like the COM port setting. - Replace X with a value from 1-4 as it - is in Windows and Y with a value from - 0-3 (Y is usually the value in windows - minus 1, just like for COM ports). You don't always need - to define a parallel port (AKA, it's optional). As with - the other section, LptX can equal any device (Maybe - /dev/printer). Here is an - example: "Lpt1" = "/dev/lp0" The [spooler] section will inform wine where to spool print jobs. Use this if you want to try printing. Wine docs claim that spooling is "rather primitive" at this @@ -873,7 +809,7 @@ - The Wine File System And Drive Layer + Disc Drives, Serial and Parallel Ports Extremely Important Prerequisites @@ -898,29 +834,54 @@ Short Introduction - Wine emulates drives by placing their virtual drive roots to - user-configurable points in the Unix filesystem, so it's your - choice where C:'s root should be - (tools/wineinstall will even ask you). If - you choose, say, ~/wine (or, in other - words, /home/user/wine, since "~" - indicates the home directory of a user), as the root of your - virtual drive C:, then you'd put this - into your Wine configuration file: + Windows applications refer to disc drives by letters such as + A:, B: and + C:, and to serial and parallel ports by names + such as COM1: and LPT1:. - - -[Drive C] -"Path" = "%HOME%/wine" -"Type" = "hd" - - - With this configuration, what windows apps think of as - "c:\windows\system" would map to - /home/user/wine/windows/system in the UNIX - filesystem. + You need to tell Wine how to interpret these. You do so by + specifying the Unix file system nodes and devices that Wine + should map them onto, as described later in this section. + + You can map a Windows fixed disc drive onto any node in your + Unix file system - this need not be the root node of a drive. + For example, you could map your Windows drive C: + onto your Unix directory /usr/share/wine-C. + Then the Windows folder C:\Windows\Fonts would + be at /usr/share/wine-C/Windows/Fonts in your + Unix file system. + + + Make sure that you have assigned drive letters for directories + that will cover all the items Wine needs to access. These include + the programs that you run, the data files they need and the Wine + debugger (in case anything goes wrong). + + + It is best to use a number of drive letters, and map them onto + directories that cover small sections of the file system containing + the files that Wine will need to access. This is safer than simply + assigning a single drive letter to the Unix root directory + /, which would allow Windows applications to + access the whole of your Unix file system (subject, of course, + to Unix permissions). If one of them misbehaved, or if you + accidentally installed a virus, this might leave you vulnerable. + + + For replaceable media, such as floppy discs and CD-ROMs, you should + map Windows drive letters onto the mount points for these drives in + your Unix file system - for example /mnt/floppy + or /mnt/cdrom. + + + If your applications access serial and parallel ports directly, + you should map these onto the corresponding Unix devices + - for example /dev/ttyS0 and + /dev/lp0. + + @@ -951,100 +912,51 @@ C:\ Root directory of primary disk drive - The [Drive x] Sections + The dosdevices Directory - These sections are supposed to make certain Unix - directory locations accessible to Wine as a DOS/Windows drive - (drive 'x:') and thus accessible to Windows programs - under the drive name you specified. - Every DOS/Windows program sort of expects at least a C: - drive (and sometimes also an A: floppy drive), so your - configuration file should at least contain the corresponding - sections, [Drive C] and [Drive A]. - You need to decide on whether you want to use an existing Windows - partition as the C drive or whether you want to create your own - Wine drive C directory tree somewhere (take care about - permissions!). - Each drive section may specify up to 6 different settings - as explained below. + The dosdevices directory contains the entries + that tell Wine how to map Windows disc drive letters onto Unix file + system nodes, and how to map Windows serial and parallel ports onto + Unix devices. It is located in the .wine + sub-directory of your home directory, + i.e. ~/.wine/dosdevices. - [Drive x] - The above line begins the section for a drive whose letter is x - (DOS notation: drive 'x:'). - You could e.g. create an equivalent to a drive 'C:' - under DOS/Windows by using a [Drive C] section name. - Note that the drive letter is case insensitive. + The entries in the dosdevices directory are + symbolic links to Unix file system nodes and devices. You can + create them by using the ln command in a Unix + terminal. Alternatively, many File Managers have the capability of + creating symbolic links. - "Path" = "/dir/to/path" - This specifies the directory where the drive will begin. - When Wine is browsing in drive x, it will be able - to see the files that are in the directory - /dir/to/path and below. - (note that symlinks to directories won't get included! - see "ShowDirSymlinks" - configuration setting) - You can also make use of environment variables like $HOME here, - an example for using a mywinedrive - directory in your home dir would be - "Path" = "%HOME%/mywinedrive", - but don't forget to put it as a DOS environment variable, - ie surrounded by '%' signs rather than preceded by a '$'. - Don't forget to leave off the trailing slash! - - - "Type" = "hd|cdrom|network|floppy" - Sets up the type of drive Wine will see it as. Type must - equal one of the four floppy, - hd, cdrom, or - network. They are self-explanatory. - (The |'s mean "Type = '<one of the options>'".) - Usually, you choose "hd" for a drive ("hd" is default anyway). - For a home directory entry, it makes sense to choose - "network" sometimes, since some home directories are being - exported over the network via NFS and thus can have slow response - times. - - - "Device" = "/dev/xx" - - Needed for raw device access and label and serial number reading. - Use this only for floppy and cdrom devices. Using it on - Extended2 or other Unix file systems can have dire results - (when a windows app tries to do a lowlevel write, - they do it in a FAT way -- FAT format is completely different from - any Unix file system). - Also, make sure that you have proper permissions to this device - file. - - - - This setting is not really important; almost all apps - will have no problem if it remains unspecified. For - CD-ROMs it's quite useful in order to get automatic label - detection, though. If you are unsure about specifying - device names, just leave out this setting for your - drives. - - - - Here are a few sample entries: + For example, if you have decided to map your Windows + C: drive onto + /usr/share/wine-c, you could type the + following (after changing to your dosdevices + directory): -Here is a setup for Drive C, a generic hard drive: -[Drive C] -"Path" = "/dosc" -"Type" = "hd" -This is a setup for Drive E, a generic CD-ROM drive: -[Drive E] -"Path" = "/mnt/cdrom" -"Type" = "cdrom" -"Device" = "/dev/cdrom" -And here is a setup for Drive A, a generic floppy drive: -[Drive A] -"Type" = "floppy" -"Path" = "/mnt/floppy" -"Device" = "/dev/fd0" +ln -s /usr/share/wine-c c: + + + + Replaceable media are a little more complicated. In addition to + creating a link for the file system on the medium, for example: + +ln -s /mnt/floppy a: + + you also need to create a link for the device itself. Notice that + this has a double colon after the drive letter: + +ln -s /dev/fd0 a:: + + + + For serial and parallel ports, you simply create a link to + the device; notice that no colon is required after the Windows + device name: + +ln -s /dev/ttyS0 com1 +ln -s /dev/lp0 lpt1 @@ -1228,13 +1140,13 @@ And here is a setup for Drive A, a generic floppy drive: - Point [Drive C] in - ~/.wine/config to the directory where you want - C: to be. Refer to the wine.conf man page - for more information. - The directory to be used for emulating a C: drive will be - the base directory for some Windows specific directories - created below. + Make a symbolic link in ~/.wine/dosdevices + to the directory where you want + C: to be. Refer to the wine man page + for more information. The directory to be used for emulating + a C: drive will be + the base directory for some Windows specific directories + created below. @@ -1389,17 +1301,16 @@ And here is a setup for Drive A, a generic floppy drive: through Wine for dual boot (Linux + Windows) systems. - Wine maps mounted FAT filesystems, such as - /c, to driver letters, such as - c:, as indicated by the - ~/.wine/config file. The following excerpt - from a ~/.wine/config file does this: - + Wine maps mounted FAT file systems, such as + /c, to drive letters, such as + c:, by means of symbolic links in the + dosdevices + directory. Thus, in your dosdevices directory, you could type + the command: -[Drive C] -"Path" = "/c" -"Type" = "hd" +ln -s /c c: + Although VFAT filesystems are preferable to FAT filesystems for their long filename support, the term FAT @@ -1588,10 +1499,8 @@ And here is a setup for Drive A, a generic floppy drive: Drive labels and serial numbers - Until now, your only possibility of specifying drive volume - labels and serial numbers was to set them manually in the wine - configuration file. By now, wine can read them directly from the - device as well. This may be useful for many Win 9x games or + Wine can read drive volume labels and serial numbers directly + from the device. This may be useful for many Win 9x games or for setup programs distributed on CD-ROMs that check for volume label. @@ -1629,8 +1538,10 @@ And here is a setup for Drive A, a generic floppy drive: How To Set Up? Reading labels and serial numbers just works automatically - if you specify a "Device" = line in the - [Drive x] section in your ~/.wine/config. + if you specify the correct symbolic links for the devices + (with double colons after the drive letters) in your + dosdevices + directory. Note that the device has to exist and must be accessible by the user running Wine if you do this, though. @@ -1651,15 +1562,13 @@ And here is a setup for Drive A, a generic floppy drive: Here's a simple example of CD-ROM and floppy: -[Drive A] -"Path" = "/mnt/floppy" -"Type" = "floppy" -"Device" = "/dev/fd0" +cd ~/.wine/dosdevices -[Drive R] -"Path" = "/mnt/cdrom" -"Type" = "cdrom" -"Device" = "/dev/hda1" +ln -s /mnt/floppy a: +ln -s /dev/fd0 a:: + +ln -s /mnt/cdrom r: +ln -s /dev/hda1 r::