Win4Lin User's Guide |
Chapter 4 -- Configuring DOS and Windows sessions |
(User's Guide Table of Contents) | (Chapter Table of Contents) |
Previous Chapter - Working in the Win4Lin environment | Next Chapter - Win4Lin resource administration |
This chapter tells you how to use the Win4Lin Setup utility to make some common changes to DOS and Windows environments to better suit your needs. In particular, it describes how to configure sessions to use resources such as printers and CD-ROMs; how to change the amount of memory available to you; and how to setup access to different parts of the Linux filesystem.
You can create multiple named configurations so that, for example, one set of devices is automatically available when you start Windows with one configuration and a different set of devices is available when you start Windows with another configuration.
If a resource you want to use is not described in this chapter, a system administrator may need to define it. See Chapter 5, `` Win4Lin resource administration '' for information. Also, refer to Chapter 6, `` Using Win4Lin from the command line '' for a description of the more obscure configuration features available.
Using Win4Lin Setup to configure your environment
In a Desktop environment, you can
use the
Win4Lin Setup utility
to configure
your environment.
If you really want to you can use Linux command line utilities to
accomplish exactly the same things.
For information on the command-line interface, see
Chapter 6, `` Using Win4Lin from the command line ''.
To start the Win4Lin Setup graphical utility, use the command: "winsetup &".
Note that a lot of the information in this chapter is also covered in the Win4Lin Setup "help" pages that you can access by clicking the Help buttons.
Win4Lin displays a list of configuration categories that you can select. The categories are:
The system administrator uses this category to set up or review the aspects of Win4Lin that apply to all Win4Lin users. Examples: Managing device definitions and editing shared DOS startup files. See Chapter 5, `` Win4Lin resource administration '' for information on how to use this configuration category.
You use this category to install Microsoft Windows under Win4Lin. See Chapter 2, `` Installing Windows ''.
You have at least two of these configurations: dos and win. These configurations detail all characteristics of the DOS or Windows sessions you use. Selecting one of the personal Win4Lin session configurations and clicking on the OK button brings up the Personal Win4Lin Session Configuration window. You can use this window to view or change the configuration.
You can also create new personal Win4Lin session configurations that are different from the standard dos and win configurations. When you do, they appear on the list below dos and win. You can remove these configurations by using the Delete button.
To choose a category, select it by clicking on its name, and then click OK.
The rest of this chapter covers the Personal Win4Lin session configuration.
Personal Win4Lin session configuration window
The personal Win4Lin session configuration window allows you to examine and modify various characteristics of your DOS and Windows sessions.
This window has four views, which you can select by using buttons located across the top of the window:
Options
Drives & Filesystem
Devices
Display
You can configure the following items using the Options view:
You can configure the following items using this view:
You can configure the following items using this view:
Specifying the scope of configuration changes
To run a DOS or a Windows session immediately with your configuration changes in effect, click on Start when you finish modifying the settings.
To save your changes for all future sessions started with this named configuration, click on Save.
To create a new named configuration, click on Save As and provide a name for your configuration. Legal names can contain the characters A to Z (either upper- or lowercase), the numbers 0 to 9, and the hyphen (-).
Doing this adds the following entry to the list of Win4Lin Setup categories:
Personal Win4Lin session configuration: your configuration name
By default, Win4Lin interprets the system-wide config.sys file and any config.sys file found on your personal drive when DOS or Windows sessions are started. In addition, it executes the system-wide autoexec.bat startup file and any autoexec.bat file found on your personal drive.
You can specify in your Personal Win4Lin session configuration that one or more of these files not be interpreted or run; you can also edit them or specify that Win4Lin use different or additional config.sys and autoexec.bat files. This is done in the AUTOEXEC.BAT and CONFIG.SYS areas of the Options view.
Select Run System Wide, Run Personal, or Other to enable the execution of the corresponding autoexec and config.sys file.
The Other file is any file you specify in the corresponding text box. Use Linux syntax and specify the full path name for the file (for example, /tmp/startup).
If multiple files are enabled, they are executed in the listed sequence -- System Wide followed by Personal followed by Other.
Deselect the file to disable its execution.
You can click the Select File button to bring up the File Browser and then select the file name from a list. The file need not be named autoexec.bat or config.sys as long as it contains valid DOS commands.
Click the Edit Files button to view, edit, or create any of the three startup files. To edit a file, you must have write permission.
Windows Type
This control is not used anymore.
The windows type is automatically set to "Windows 95/98" when you
first install Windows 95 or Windows 98,
so there is no need to make adjustments to this setting.
Configuring memory
Use procedures in this section to:
Win4Lin refers to the memory given to Windows as "standard" memory. Standard memory refers to the aggregate of 1MB of conventional DOS RAM, plus as many megabytes of extended memory as you want to add, up to a maximum of 64MB. The default memory setting are different for the various versions of Windows. (In Win4Lin, more than 1MB of this "standard" memory is only for Windows session, not DOS sessions. For DOS sessions you must use EMS to get more memory.)
You specify in your Personal Win4Lin session configuration how much memory to allocate to a Windows session. This is done in the Memory area of the Options view by clicking on the up or down arrow key next to Standard to select the amount of standard memory you want.
NOTE: Do not request more memory than you really need, because it wastes memory resources and in some cases can slow your session down. If you do not need additional memory every time you run Windows, do not change your default configuration; request additional memory only for those sessions in which you need it.
Note that you can also use a command line option to the win or dos command to override the memory allocation for a single session. Refer to `` Using dos and win commands with configuration options '' in Chapter 6.
Setting expanded memory (EMS) for DOS
Win4Lin supports the Lotus/Intel/Microsoft Expanded
Memory Specification (EMS), so you can run any
DOS
applications that use expanded memory and
conform to this specification.
Win4Lin simulates expanded memory by using standard Linux system virtual memory.
You specify in your Personal Win4Lin session configuration how much EMS memory to allocate to a DOS session. This is done in the Memory area of the Options view by clicking on the up or down arrow key next to EMS to select the amount of standard memory you want.
NOTE: Do not request more memory than you really need. If you do not need additional memory every time you run DOS, do not change your default configuration; request additional memory only for those sessions in which you need it.
These file systems can be accessed through drive letters as under real DOS or Windows. See `` About drives and file systems '' in Chapter 3 for more information about the default drive configuration.
You can customize the drive letter assignments to access different parts of your Linux file system and assign drive letters to physical and virtual DOS volumes. You specify the drive letter assignments in your Personal Win4Lin session configuration. This is done in the Drives & Filesystem view.
You can also assign drive letters to CD-ROM drives for use under DOS or Windows.
In the Drives & Filesystems view,
you will see a list of drive letters and file system volumes that are
currently attached to these drive letters.
You can configure new drive letters to access
parts of the Linux file system, DOS file system, or CD-ROM drives.
Drive letter restrictions
Although the GUI gives the impression that almost any drive
letter can be used for any purpose, that is not the case.
Some of these restrictions cannot be changed, and some can:
If you really have to, there is a way to change which drive letter is the
highest allowed Linux and DOS volume drive.
The procedure is too compilcated to cover in this User's guide.
Later versions of the Win4Lin documentation will cover the
proceedure, perhaps in some "special topics" document.
Making changes
To change the configuration of a drive that is already attached, select the drive letter and click on the Properties button. A window with the current drive properties appears. Change the properties and click on OK.
To attach a new drive, click on the Add button. A drive properties window appears with defaults selected for Linux file system access. Select the drive letter you want by clicking on the arrows next to the current drive letter and change the properties as required. Click OK and your new drive will appear in the list.
To detach a drive, select it from the list and click Detach.
You can also specify whether you want your DOS and Windows sessions to always start at the root of your personal drive as opposed to starting in your current Linux working directory. See `` Specifying the initial drive '' for more information.
The drive properties window contains different information depending on the drive type you select: Linux File System, Dos Drive, or CD-ROM:
The Directory box, specifies the Linux directory that corresponds to the root of the drive. To change it, you can either type in the full path name for the directory (using Linux syntax) or use the Browse button to find it.
The Personal Drive check box is used designate this drive as your personal drive, which is the drive where your personal autoexec.bat and config.sys files are located. You can only have one drive designated as a personal drive. By default, your personal drive is drive C. For Windows sessions, the personal drive must be drive C.
Clicking on the Advanced options button displays various file-mapping and record-locking options that you can set for this drive. It is usually not necessary to change the default settings, but you might want to be aware of what they do in case you need to use them.
See `` File name mapping options '' and `` Linux file locking options '' below for more information about these advanced options.
The "Dos Drive" type provides
access a DOS file system
(either a physical or a virtual DOS volume) using your DOS
or Windows sessions.
The "Drive properties" for this type shows a list of available volumes. The highlighted line indicates the current selection. To change the selection, Click on another entry.
Native DOS volumes correspond to actual physical DOS volumes on your hard disk. $HOME/vdrive.dsk is a virtual DOS volume that has been preconfigured for each user. If you choose this volume for the first time, you are prompted to create the actual Linux file where the DOS file system will be stored.
See `` Physical and virtual DOS drives '' in Chapter 5 for more information on both physical and virtual DOS volumes, when to use them, how to attach them, and how to create new virtual DOS volumes.
If you click on the Advanced button, you can set file access options that allow you to share this DOS volume with other DOS and Windows sessions. You can set Exclusive and Read Only options to signify the following types of access for sessions started with this configuration:
This type of drive provides access to a CD-ROM device.
The Device box shows the current CD-ROM device setting. If you click on it, a drop-down selection list allows you to pick another device that corresponds to actual CD-ROM drives installed on your computer.
If your CD-ROM device is not listed, choose Other. A type-in box appears, and you can either type the device name or use the Browse button to find it.
There are no advanced options for CD-ROMs so clicking that button does nothing when viewing the CD-ROM properties.
Advanced Linux file system options
There are two types of Advanced options for Linux filesystem access:
file name mapping options and locking options.
File name mapping options
Refer to Chapter 3, `` File name issues '' for information about just what filename mapping is.
Refer to Appendix C, `` Filename mapping '' for more detailed information about about how the different mapping work and why you would choose a particular filename mapping.
The following only explains how to select the different options. (For normal situations you should use the default settings.)
One of the three file name mapping methods is selected in this "File Name Mapping" control:
Regardless of the mapping method that is selected, the Case Mapping checkbox enables or disables case mapping. The default is for case mapping to be disabled (unselected). Refer to `` Appendix C - Filename mapping '' for explanation of all these mapping types.
The other advanced option for Linux filesystem access is Linux locking.
This enables or disables the use of Linux file and record locking when Win4Lin accesses the Linux filesystem on behalf of DOS or Windows applications when they do DOS or Windows file and record locking operations.
File and record locking is necessary when two users want to make simultaneous updates to shared data files or to guarantee sequential access to data files. The applications that performs file access in this case must have been designed to use file and record locking to provide safe shared access. (So just by enabling "Linux locking" does not make any application play well with others. It has to be designed to be that way.) Many database applications, including spreadsheets, allow such shared access.
For multi-user versions of Win4Lin, all DOS and Windows file and record locking operations are automatically handled between all Win4Lin sessions running on the same system. But if the same files are being accessed from Win4Lin sessions from different machines over a network, or a Linux application is accessing the same files, then this "Linux locking" option should be enabled.
However, Linux locking causes a decrease in the file system performance especially when files are accessed over the network. Consequently, you should not enable this option unless you have a specific need.
By default, Linux drives do not have Linux locking enabled.
When your DOS or Windows session starts, the initial drive and directory are determined by the option Start on personal drive:
If there is no drive in your configuration that provides access to the current Linux directory, your session fails to start.
COM ports
Win4Lin does not yet support the use of COM ports.
Thus the only selection for COM1 and COM2 is "None".
DOS printer
To print from a DOS session via the Linux printing system you have print via
a "redirected LPT port".
This is set up in the "DOS Printer" sections of the "Devices" view
of a Personal Win4Lin DOS session configuration.
Win4Lin stores printer output to any of the DOS LPT ports in a temporary file. It prints this output when more than 15 seconds have elapsed since the application sent a character to be printed. The timeout is needed because when DOS applications print to the LPT port there is no standard indication as to when the application has finished printing. If an application has normal delays of more than 15 seconds then your printout can get split up or otherwise not print correctly. You can use the "DOS Printer" control to change that timeout to make it longer or shorter as needed.
To print via a Linux printer, there must be a "printer definition" that specifies the Linux command to be used. During installation, Win4Lin creates a printer definition with the name default, which provides for printing to the default Linux printer. (For this to work as is, there must be a default printer set up on your Linux system.)
To adjust the "default" definition or to create or modify other Linux printers definitions, for use with Win4Lin, see `` Printer administration '' in Chapter 5.
For the three possible LPT ports you use this to specify which, if any, are to be redirected to a Linux printer:
Other devices
The "Other Devices" section of the "Devices" view
of a Personal Win4Lin session configuration allows you to
select devices (other than COM ports and DOS printers) to
use with your Win4Lin sessions.
All the possible devices appear in the list and can be individually selected. (When Win4Lin is first installed the default selections in the list are for the parallel ports and the game port.)
If you pick two devices that use a resource in common a warning is displayed indicating the conflict and you will not be able to save or use the configuration until you de-select a device to clear the conflict. Each device definition includes an "Access" field which specifies if normal users are allows to use that device or not.
NOTE:
For security reasons, by default all definitions
have their "Access" fields set to "Root Only".
The "Access" field is also known as the "Usable by" field. If you try to start a Win4Lin session with access to a device that you do not have permission to use, the session will fail to start with an error message about the device or "token" not being usable.
Click on the "Detail" button to bring up the "Custom Devices Detail Viewer" which allows you easily find out what the definition for each device is, including the "Access" setting.
The View/Create/Modify Device Definitions part of the Win4Lin Setup "System-Wide Win4Lin Administration" GUI is used to update the device definitions. The system administrator will have to use this to change the "Access" setting to make appropriate devices available for use by normal users.
See `` Custom device administration '' in Chapter 5 for more information about updating or adding to the items that appear in the "Other Devices" list.
The "Display view" lets you specify the display features of a specific configuration. There are five areas, "Display" , "Colormap" , "Options" , "Special Keys" and "Windows 3.1 Window Size".
Use the following options to configure advanced display features for your DOS sessions:
These options are described below:
DOS Font
By default, Win4Lin automatically sets the size of the fonts used in the
DOS window if you are working in the Desktop environment.
This size is based on the resolution of
your X Window display and is either 6x13 (small) or 8x14 (medium).
If you do not like the automatic selection, you use this control to to choose the size you want. Note that this only for DOS windows, and not Windows windows. You can also set your DOS fonts while you are running a DOS session by using the Options menu at the top of the Win4Lin window. (See the `` Controlling the Win4Lin window '' topic in Chapter 1.)
Scaling DOS graphics
When you run a CGA or Hercules graphics DOS application on the
Desktop, Win4Lin displays it in the DOS
window either with in original or double size, automatically.
If you do not like the automatic selection, you use this control
to to choose the scaling you want, "1x" or "2x"..
Display Type
On the X desktop,
Win4Lin is supports the DOS graphics CGA and Hercules modes and
the DOS monochrome (a.k.a. "MDA") text mode.
On systems that support "Zooming" on the system console standard
VGA graphics (640x480, 16 colors) are supported via "zooming".
("Zooming" is when the Win4Lin session takes over the display hardware.)
Note: Zooming is not supported by Win4Lin on Linux.
Win4Lin automatically selects the virtual display mode for each Win4Lin session. For Windows sessions, you should leave the setting on "Automatic". For DOS sessions you can use this control to specify a specific virtual display type. One reason you might want to do this is if you have a DOS application that requires a specific display type.
Because your Windows session is being displayed via the X Window system, the number of colors available in your Window session is at most the number of colors available on your X display. If the X display is using "8 bit" color or less (i.e. 256 shades or less) then generally there are not enough colors for X applications and Windows applications to use without some conflict. The "Colormap" controls for use in this situation. By default, the setting is "Use Shared Colormap", and should be left at that unless you have some color problems.
It is strongly recommended to use at least 16 bit color (64K shades), but if that is not possible, refer to the help topic for this configuration view for instructions on how and why to configure the "Colormap" controls. Click here to go to that help topic.
Zooming a Win4Lin session window causes it to take over the display hardware over from the X desktop. Zooming is not supported by Win4Lin on Linux systems, which is why the zooming related control options are not active.
Suspending DOS or Windows when another window is currently active
If an X application currently has input focus and is running unacceptably slow, one or more DOS or Windows sessions running in the background may be consuming too many system resources. In this case, you can force Win4Lin to temporarily suspend your Win4Lin session when the input focus changes to make more system resources available to other applications or users. This is done by selecting the "Autofreeze" option here.
You can also set the Autofreeze option while you're running a DOS or a Windows session by using the Options menu at the top of the Win4Lin window. (See the `` Controlling the Win4Lin window '' topic in Chapter 1.)
X Cut & Paste
The explanation of just what "X Cut & Paste" is and how to
use it is in the
`` Cutting and pasting ''
topic
in chapter 3.
The "X Cut & Paste" option in the "Display" view of the
Personal Win4Lin configuration sets what the initial state
of the feature (enabled or disabled) when a Win4Lin session
is started.
Note: If the "X Cut & Paste" option is greyed out, then this feature is not currently supported.
While using your Windows session you can enable and disable the X Cut & Paste feature by using the Options menu at the top of the Win4Lin window. (See the `` Controlling the Win4Lin window '' topic in Chapter 1.)
By default, the X Cut & Paste feature is disabled. If for some reason you want to change the default (not recommended), you select the "X Cut & Paste" option in the Options area of the Display view.
"Special Keys"
The special Show Menu and Unzoom keys are both, by default,
<Shift><F12>.
You can redefine these keys if the current settings are not convenient
or conflicts with your application.
(The Show Menu key causes the menu to be shown if it is hidden
and unfocuses the mouse if it is focused to DOS.
The Unzoom key undoes the effect of Zoom.)
To change the keys used for these functions, click on the Show Menu or Unzoom button in the Special Keys section. This displays a Key Properties dialog box where you can select the key combination you want.
You can also change the keys for these actions while using your DOS or Windows session (but only for that session) via the Options menu at the top of the Win4Lin window. (See the `` Controlling the Win4Lin window '' topic in Chapter 1.)
"Windows 3.1 Windows Size"
This control is not used because Windows 3.1 is not supported anymore.
For Windows 95 or Windows 98 a different method is used to change
the window size; you use the Windows Display control panel.
In a Windows session: