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

In Chapter 3, `` Working in the Win4Lin environment '', you learned about the default operating environment that Win4Lin creates when you start a DOS or a Windows session. However, because Win4Lin is fully configurable, you can change the default environment as well as create additional environment configurations, which will enable you to run many different kinds of DOS and Windows sessions.

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.

Configuration categories

Win4Lin displays a list of configuration categories that you can select. The categories are:

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

  1. Options view

    You can configure the following items using the Options view:

    AUTOEXEC.BAT
    Lets you specify the autoexec.bat files you want executed for the session. See `` Interpreting config.sys and autoexec.bat ''.

    CONFIG.SYS
    Lets you specify the config.sys files you want executed for the session. See `` Interpreting config.sys and autoexec.bat ''.

    Windows Type
    This is not used anymore. It is set automatically.

    Memory
    Lets you specify the amount of memory the session is to use. See `` Configuring memory ''.

    Command
    Lets you specify a command that Win4Lin is to run when a session starts.

  2. Drives & Filesystem view

    The Drives & Filesystem view lets you assign and configure DOS and Linux volumes as specific drives in your environment. See `` Drives & Filesystems view ''.

  3. Devices view

    The Devices view lets you specify the hardware configuration you want for a specific environment.

    You can configure the following items using this view:

    COM ports
    Lets you attach serial ports. See `` COM ports ''.

    DOS printer
    For DOS sessions only, lets you redirect an LPT port to the Linux printing system. See `` DOS printers ''.

    Other devices
    Lets you specify other devices (such as parallel ports) to be used by your sessions, and examine the configuration details for these devices. `` Other devices ''.

  4. Display view

    The "Display view" lets you specify the display features of a specific configuration.

    You can configure the following items using this view:

    Display
    Lets you specify font size, graphics scaling, and display type for DOS windows. See `` Specifying DOS fonts '', `` Scaling DOS graphics '', and `` Setting DOS display types ''.

    Colormap
    Lets you specify whether to use a shared or private colormap. See `` Colormap ''.

    Windows 3.1 Window Size
    This is not used anymore. (Windows 3.1 is not supported anymore.) See `` Setting the size of a Win4Lin window '' for how to set the size of your Windows 95 or 98 window.

    Options
    Lets you specify whether to use any of the following options:

    Special Keys
    Lets you view or change the special keys:

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


Options view detail

Interpreting config.sys and autoexec.bat

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:

Setting standard (extended) memory for Windows

Under Win4Lin, DOS and Windows sessions cannot make use of the whole physical memory space the same way they do on a stand-alone PC. Instead, the Linux operating system manages physical memory and allocates a certain amount of virtual memory to each DOS and Windows session when it starts. By default, enough memory is allocated for most applications to run. However, certain Windows applications require more than the default memory allocation. In this case, you can configure your Windows sessions to start with more memory.

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.


Drives & Filesystems view detail

Win4Lin makes the Linux file system, as well as any physical or virtual DOS volumes that exist on your hard disk, available to your DOS or Windows sessions. (A virtual DOS volume is a Linux file that is formatted as a DOS file system and reserved exclusively for DOS files.)

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: You can tune the GUI program to change the lowest drive letter that it allows to be use for CD-ROM drives. This is done via the "MERGE_CDROM_START" setting in "/etc/default/merge". This can be changed to specify a drive letter between "A" and "Z".

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.

Drive properties

The drive properties window contains different information depending on the drive type you select: Linux File System, Dos Drive, or CD-ROM:

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:

Standard Mapping
This mapping method is the default for all Linux drives except your personal drive (normally, drive C).

Win95 Mapping
This mapping method is the default for your personal drive (normally, drive C).

Old-Style Mapping

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.

Linux file locking options

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.

Specifying the initial drive

When your DOS or Windows session starts, the initial drive and directory are determined by the option Start on personal drive:


Devices view detail

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: