|
|
NeTraverse Merge resource administration
Chapter 3 covers how NeTraverse Merge automatically manages access to the most important hardware resources. Chapter 4 covers how you must explicitly request (attach) all other devices via named "device definitions" to use them under DOS or Windows, and that several commonly used resources have preconfigured definitions and can be attached to your DOS and Windows sessions. (These resources include physical and virtual DOS drives, default printer, COM ports, parallel ports, and a game port.) So this chapter covers setting up and changing device definitions to make them available for attachment to individual NeTraverse Merge sessions.
Most of the system wide resource administration is done via the System-Wide Administration part of the WinSetup GUI. To start the WinSetup graphical utility, use the command: "winsetup &". You can also use the WinSetup icon or button to start up the utility. Then select "System-Wide Administration" and click "OK" to bring up the "System-Wide Administration" window.
The actual detailed instructions for using WinSetup is available via the Help button on each WinSetup window. Thus this chapter does not go into the details of using the GUI.
(Note, if you really want to you can use UNIX command line utilities to accomplish exactly the same things that you can use the WinSetup GUI to do. The GUI is a lot easier to use. For information on the command-line interface, see Chapter 6, `` Using NeTraverse Merge from the command line ''.)
The top button in the System-Wide administration window brings up the "Device Definition" window, which is the first topic in this chapter. This is the most used system-wide administration tool. Besides "device definitions", there are other system-wide NeTraverse Merge settings that can be adjusted via the System-Wide administration GUI:
A device definition provides the information that NeTraverse Merge needs to access a device. Once a device definition has been created, you can use the device by selecting it to be part of a personal DOS or Windows session configuration. This action is called attaching the device for use in a DOS or Windows session. You use the Personal Session Configuration option of the WinSetup utility to attach devices. Device attachment is described in detail in Chapter 4, ``Configuring DOS and Windows sessions''.
The Device Definition window of the System-Wide administration has five category (or view) buttons:
You use these category views to inspect, modify or delete existing definitions and to create new ones. Click on the Help buttons to get more info about how to do this.
The following controls appear on the left side of all views of the Device Definition window:
If a user is not allowed to use the definition, the entry for the definition the selection lists in the Personal Session Configuration window for that user has "(unavail)" appended to the description to indicate that device is not currently available for that user.
NOTE: All the default custom device definitions (parallel port and game port definitions) have "Usable by" set to "Root". You must use the Custom view of the Device Definition windows to change the setting to "All" for those devices you want to be usable from DOS and Windows sessions. (And if there are a custom device definition that you will never make available to normal users, then you should delete the definition.)
Note that the specified Failure Action does not apply to printer definitions because those definitions are used at print time and not as the NeTraverse Merge session is starting.
Printer view --
Printer device definitionConfiguring the default printer
When NeTraverse Merge is installed a printer definition named "Default"
is created for printing to the default UNIX printer.
This of course only works if there is a default printer to print to.
If printing via this printer definition is not working properly (or you want it to work differently) then you can either change this definition to use different printer command and/or options or you can create a new printer definition. It only matters that you get a printer definition set up so that printing comes out properly. The following section covers how to do this.
Configuring a printer definition
You can print from a NeTraverse Merge session to any number of printers that
is available via the UNIX printing system as long has you
have a printer definition defined for NeTraverse Merge.
If needed you can even have multiple printer definitions for
a single UNIX printer.
(For instance if you have to use different printer options for
printing letters and for printing envelopes.
Thus you could make two printer definitions, one with the
options for printing letters and another for printing envelopes.)
Before you can start to set up a printer definition you must first be able to print from UNIX. Get this working first, then you can continue on and try to print from a NeTraverse Merge session.
To determine the exact printer command:
From your DOS or Windows application in a NeTraverse Merge session, print your document to a file.
With Windows, you set up for printing just as you would do on a normal Windows system using the "Add Printer" utility. Using this, select your printer type to match your printer as your would expect. The only difference is when you select one of the "available ports" to use. What you select here is "FILE: Creates a file on disk" (or similar wording). Then continue on and finish "adding" this printer. Hint: No need to "print a test page". Then from a Windows application, print a document to a file using this "printer".
This is the hardest step. You must determine how to print this "print file" using the UNIX printing system commands. One tricky part is that the command needs to be formed to print when the print file is fed to it via "standard in". E.g. if the print file is named "printout.prn", and the UNIX print command is "lp -dprinter1" the command must be of this form must work:
cat printout.prn | lp -dprinter1
The printer command can also be any other UNIX command that operates on standard input. Some examples: You can run your printer output through a filter before spooling by using the following command:
cat printout.prn | filtername | lp -dprinter1
Something like this could be used to print plain DOS text using the NeTraverse Merge filter "dos2unix" that converts DOS text to UNIX text so that printing comes out properly on the UNIX printer:
cat printout.prn | dos2unix | lp -dprinter1
If you want you don't even need to use a UNIX printer command if you don't want to. For example you could have a command that saves the printout in a file for later processing (perhaps for another UNIX program to automatically fax later), or a command that copies the printout to a web page. The point is that all you need is a UNIX program that takes it's input from "standard in".
So now that you have determined the UNIX command to print
(or whatever) from the "print file",
you have all the information you need for the printer definition.
Go into WinSetup System-Wide administration to the "Printer" device
definition window to either update an existing definition
or create a new one.
(Click on the Help button if you need to for how to do these things.)
In the "Printer Command" entry type in the printer command
(sans the leading "cat printout.prn | " you used
to test the command).
Using some of the above examples, this would be:
lp -dprinter1
or
dos2unix | lp -dprinter1
Make sure to click the "Save" button.
Now all you have to do is go back into your Windows session and update your Windows icon for the printer to change the setting from "printing to a file" to print to the "port" that you defined or updated in WinSetup. (All the printer definitions that are defined via WinSetup automatically appear in the Windows properties for the printer icon as selections in the "Print to the following port:" control in the "Details" tab.)
COM1 & COM2 view --
Serial Port device definition
The Device Definition window has a COM1 and a COM2 button. These bring up the COM1 or COM2 device definition view window where you can view, update or delete the current definitions or create new ones. (Click on the Help button in the COM1 or COM2 view if you need help on how to do these things.)
To enable a COM port device for use under NeTraverse Merge, you can use the virtual attachment and on OpenServer systems also the direct attachment method. A COM port device configured through virtual attachment is a UNIX serial port that a DOS or Windows process refers to as COM1 or COM2 and accesses through NeTraverse Merge drivers. A COM port device configured through direct attachment is a serial port that DOS or Windows drivers control directly without interfacing with NeTraverse Merge or UNIX.
By default, NeTraverse Merge provides definitions for virtual attachment of COM1 and COM2 to UNIX serial ports. These are UNIX serial port devices are named /dev/tty1a and /dev/tty2a on OpenServer systems, and /dev/tty00t and /dev/tty01t on UnixWare/OpenUNIX systems. The tokens that represent these definitions are named com1 and com2 respectively.
NeTraverse Merge on OpenServer systems also provides definitions for direct attachment of COM1 and COM2. The tokens that represent these definitions are named dcom1 and dcom2 respectively.
To attach serial ports to your DOS or Windows you use the Devices view of the Personal Session Configuration option of the WinSetup utility.
DOS Drive view --
A physical DOS drive is a portion of the fixed disk
formatted under DOS and reserved exclusively for
DOS and Windows files.
Your fixed disk may have one or more physical DOS drives of different
sizes.
Physical and virtual DOS drives
NeTraverse Merge can access any physical DOS drive on your fixed disk. During installation, and each time you reboot your system, NeTraverse Merge checks for the existence of physical DOS drives and updates its internal database for the drives it finds.
NeTraverse Merge also allows you to create virtual DOS drives. A virtual DOS drive (sometimes called a virtual DOS volume) is actually a UNIX file that has been formatted as a DOS file system and is used to store DOS files. One default virtual DOS volume is provided in each user's home directory.
A DOS volume may be useful with NeTraverse Merge for the following reasons:
You use the DOS Drive view of the Device Definition window to view, create and update device definitions for real and virtual DOS volume. In the upper left of the window is the Token Name selection list. You use this to select which existing definition to view or update. To the right of that is the New button, which is used to create new definitions. For instructions on how to use this view, click on the Help button.
The tokens for physical DOS partitions that are automatically create are named dosc, dosd, and so on, while the default virtual DOS volume token is named homevdrv.
To attach an available physical or virtual DOS volume to your DOS or Windows session, use the Personal Session Configuration option of the WinSetup utility as described in ``Configuring drives'' in Chapter 4.
Note: Typically, by default, the device definitions for physical DOS volumes have the Usable by setting set to "Root", which means only the root user has permission to use the device definition. In order to make the volume available for normal users, you (when logged in as root) must change this setting to "All".
When the "Usable by" setting is set to "Root", the entry for the definition the selection lists in the Personal Session Configuration window for normal users have "(unavail)" appended to the description to indicate that device is not currently available.
When you change it from "Root" to "All", you also need to make sure the device's UNIX access permissions allow the device to be readable and writeable by everyone that you want to be able to use the drive. You use the normal UNIX chmod command to change the access permissions of the device.
To restrict access to only certain groups, see the later topic Limit DOS volume access to a group.
Note: On UnixWare/OpenUNIX systems any access permission changes you make to device names with the commands chmod, chown and chgrp are not permanent. To make them permanent you have to use the "installf" system utility.
Creating and formatting physical DOS drives
If you want to have one or more physical DOS drives
on the same disk that UNIX is installed on,
normally you should create them before or
at the time you install the UNIX system.
You can also add a second hard disk to your computer and put one or more physical DOS drives on it.
NeTraverse Merge automatically senses these new physical drives the next time you reboot and makes them available by creating device definitions for them as was described above.
Virtual DOS drives are different from physical DOS drives in the following ways:
NeTraverse Merge automatically makes the definition for $HOME/vdrive.dsk (token name homevdrv) available. This is the default virtual DOS drive that is located in each user's home directory.
You use the DOS Drive view of the Device Definition window to create new definitions. For instructions for completing this task, use the Help button on that window.
You can create two types of virtual volumes: One type is for use by all users where the actual volume is shared; the other type is for use by individual users, where each user can have his or her own copy of the defined volume.
Shared volumes are created when you specify the file name using the full UNIX path name. In this case, the actual file should be created at device definition time. Personal volumes are created when you specify the file name relative to the user's home directory. Each user creates actual files for personal volumes at the time of attachment.
Once the new virtual volume has been defined, you can attach it to a drive letter using the Personal Session Configuration option of WinSetup utility.
Default protection of DOS drives
The UNIX file system protection mechanisms apply in only a
limited way to DOS drives.
Because DOS
drives are not UNIX file systems, access to
individual DOS files in these drives is not
governed by UNIX system user or group ownership
or by UNIX system read, write, or execute permissions.
However, a DOS drive as a whole is accessed as a UNIX file or device and can be protected like any other UNIX file or device.
Here are the considerations that affect access to and administration of DOS drives:
Virtual DOS drives created in public directories have the same permissions
as physical DOS drives, i.e., all users have read and write permissions.
However, by default, only the owner can access personal virtual DOS drives created in
a user's home directory.
The user can relax these permissions
at the time the virtual drive is created.
Changing the protection of DOS drives
If you need to restrict access to a DOS drive, you can use
one or all of the following methods:
When a DOS drive is attached to a DOS or Windows session, NeTraverse Merge does not immediately claim the specified device, but waits until DOS or Windows actually attempts to read or write to the device. Meanwhile, the requested device may become unavailable if another session gets control of it.
To avoid this problem, you can request that the device be attached to DOS and Windows sessions immediately and exclusively. Exclusive access to the specified device means that no other session can attach it at the same time.
Specifying read-only access prevents DOS and Windows sessions from making any changes to the DOS drive.
Using the DOS attrib command to make a DOS file read-only can protect individual files on a DOS volume. The protection offered by the DOS attrib command is limited, however, because anyone who can access a DOS file can also use this command to make the file writeable.
To make a DOS file read-only, use the attrib
command to assign the read-only (R) attribute as follows:
attrib +r filename
When the read-only attribute is assigned, the file cannot be
deleted or changed.
To make the file writable again, type:
attrib -r filename
Advanced Topic:
--Limit DOS volume access to a group
If for some reason you want to limit access to only some users,
then you can use the UNIX permissions to restrict access
to a certain group, as you can do for any other file on the filesystem.
You do this with the UNIX chgrp command to change the group
and the UNIX chown command to change the ownership so
that only the owner and group have read and write access.
Note:
On UnixWare/OpenUNIX systems any access permission changes you make to
device names with the commands
chmod, chown and chgrp are not permanent.
To make them permanent you have to use the installf system utility.
Custom view --
In addition to the standard hardware resources, NeTraverse Merge
allows DOS and Windows to use certain classes of "custom" hardware devices.
These are devices for which attachment is provided by specifying
the I/O ports, interrupts and other related hardware parameters
so the device can be "directly attached" to a NeTraverse Merge session.
Custom device administration
All of the "custom" device definitions show up as selections for attachment to your DOS or Windows session in the Personal Session Configuration window Devices view in the Other Devices section. In this "Other Devices" selection list, device definition that have the "Usable by" setting set to "Root" instead of "All", the selections have "(unavail)" appended as a reminder that the definition is not currently available for general use.
Limitations of direct attachment
Many factors can prevent a directly attached device from
working under NeTraverse Merge. Some reasons
certain devices may fail are:
All the direct attach device tokens are by default set this way. The system administrator (i.e. the "root" user) has to go in and configure the needed device definition to allow it to be used by normal users. This is done with the WinSetup graphical utility (the command winsetup starts it up.) Navigate to "System Wide Administration" -> "View/Create/Modify Device Definitions" -> "Custom". On the left side, choose the desired "Token Name" from the popup list, and set the "Usable by" setting to "All". This makes that device attachable by all users.
To work around the problem of Windows not knowing the port exists, follow these steps:
There are several custom device definitions that are predefined when you install NeTraverse Merge. These are for the parallel ports and the game port. These are defined regardless of whether those devices actually exist. By default the definitions have the "Usable by" setting set to "Root", so if you want a normal user to be able to use the device you must change that setting to "All". If one or more of these devices do not exist or you never want a normal user to access the device directly then you should remove the device definition, so the user will not have to see in the list the devices that cannot be used.
The two standard parallel ports are some of the custom devices that are predefined by NeTraverse Merge. A parallel port can be in several modes: standard, ECP and EPP. These modes are typically set in your computer system's BIOS setup utility. NeTraverse Merge supplies two device definitions for each parallel port mode for a total of four definitions. Plus two definitions on OpenServer that include IRQs.
Historically on Personal Computers, the use of interrupts (IRQs) with parallel ports has not worked well, so most application using parallel ports have made do without IRQs. (The standard Windows parallel port driver does not use an IRQ.) Thus there is usually no need to make use of the definition that includes an IRQ, which is only available on OpenServer anyway. Also note that IRQ 5 is normally used for the virtual mouse device in NeTraverse Merge sessions, so if you have to use virtual IRQ 5 for the parallel port, you have to change which virtual IRQ is used for the mouse. It is a pain to do this, but if you really want to, it can be done. Doing this is covered later in this chapter.
Note that choosing to use one of the parallel port definitions for attachment in a DOS or Windows session does NOT change the mode the parallel port. (Changing the mode has to be done in the BIOS setup of your computer before the operating system boots up.) So when directly attaching a parallel port you should use the definition that matches the mode of the parallel port.
The game port is one of the custom devices that is predefined by NeTraverse Merge. The definition description is "Game/joystick port" (token name "game").
Defining a direct attach custom device
To be able to attach a custom device to a DOS or Windows configuration, you must first create a device definition for it. This is done in the Custom view of the Device Definition window of the System-Wide Setup part of the WinSetup utility.
You have to specify various hardware characteristics of the device you are defining, so you should have that information ready. The parameters you can specify include:
The address is given in hexadecimal notation, and is typically in the range 0 - 7ff (hex). If this device must use an address range that another device is using, you can remap the address to a virtual address. You cannot choose a virtual address that another device is already using as a physical or virtual address at the same time as this device.
You cannot choose an IRQ that another device will be using at the same time. Consult the manufacturer's documentation for the value to use. If this device must use a physical IRQ that has been assigned to another device, you can remap the IRQ to a virtual IRQ value.
NeTraverse Merge uses the following IRQ numbers:
Valid DMA values are 0 through 7. If this device must use a DMA channel that another device is using, you can remap the DMA channel to a virtual DMA channel.
NeTraverse Merge uses DMA channel 1 for the floppy controller.
For a Memory Mapped I/O device, the range must start on a 4K boundary and be a multiple of 4K. The address is given in hexadecimal notation, and is typically in the range c0000 - effff (hex). If this device must use an address range that another device is using, you can remap the address to a virtual address. You cannot choose a virtual address that another device is already using as a physical or virtual address at the same time as this device.
The preceding part of this chapter covered the device setup you do using the Device Definition part of the WinSetup GUI utility. There are some administration tasks that cannot be done via this part this GUI. Of interest here are:
Floppy drives
Diskette drives A and B are available to DOS and Windows sessions
as long as they are not otherwise in use.
NeTraverse Merge automatically
assigns the floppy drives on a first-come-first-served
basis to any DOS or Windows session that attempts to
access them whenever they have been unused for several seconds.
The virtual mouse
Any mouse that is properly installed and accessible to the
UNIX system is also accessible to DOS and Windows sessions.
(If you are running a DOS application in a NeTraverse Merge window
you have to "focus" the mouse to make it usable in the window.
See
``Controlling the
NeTraverse Merge window'' in Chapter 1.)
DOS and Windows sessions always view the mouse as a Microsoft bus mouse. A device driver entry in the system-wide NeTraverse Merge config.sys file supports DOS communication with a mouse. Do not modify this file or a personal config.sys file to specify another mouse driver. In particular, ensure that DOS applications do not modify any config.sys files to specify another mouse driver when you install them.
By default, the mouse uses interrupt (IRQ) 5, which works for almost all applications. If you discover that your mouse does not work, check the following:
winconfig dos set mouse=mousen
winconfig win set mouse=mousen
Here, n is the interrupt number. (Valid values are 2, 3, 4, or 5; the default is 5.)
About DOS images
The DOS image is a file that reflects the configuration of your
virtual PC environment.
It is a
snapshot of DOS memory that is taken after DOS has been booted,
loaded into memory, and started.
This image includes information DOS needs about the system configuration, which is derived from the hardware installed on the system and the contents of special configuration files at the time the image is made. It allows quick start-up of a DOS program from the UNIX environment.
The default DOS images (for monochrome, CGA, and VGA
display modes) are contained in the following files:
/usr/merge/image/std/mono/*.img
/usr/merge/image/std/cga/*.img
/usr/merge/image/std/vga/*.img
(Hercules display mode uses the same files as monochrome mode.)
NeTraverse Merge users use these DOS image files whenever they run a DOS or Windows session.
These standard DOS images are sufficient for most NeTraverse Merge users in most situations. However, you may need to make new DOS images if you want to:
Typically, when new images are required, you create a new DOS image for all of the display modes. The new default images are available automatically to all users.
To create new DOS images, you have to be logged in as root since the new images are used for all DOS and Windows sessions on your system.
To make new DOS images, you use the WinSetup GUI and choose System-Wide Administration from the list of configuration categories. To make new DOS images, click on the Create DOS images button.
mkimg command
you can run from a UNIX prompt that
does the same thing as the "Create DOS images" button.
Each directory has a file called config.sys. This config.sys file is used in the DOS session from which the DOS image is created, so all configuration parameters specified in it are automatically included in each DOS or Windows session started after the new image is created.
If you want to change the values of certain config.sys commands or add device drivers to your DOS image, log in as root, edit these config.sys files, and create new DOS images following the procedures in ``Steps to making DOS images''.
The following sections describe specific changes you can make to
config.sys files.
Changing special config.sys commands
NeTraverse Merge allows you to use nearly all config.sys
commands as you would on a conventional DOS
computer.
Commands in the system-wide config.sys file affect all users when they start a DOS process. Commands in each user's home directory config.sys file affect only that user's DOS and Windows sessions. To examine or modify these config.sys files, you can use the Personal Session Configuration option of the WinSetup utility.
However, certain config.sys commands cannot be interpreted unless they are incorporated into the DOS image you are using. These commands include:
The BUFFERS
value is effective only when you use
an actual DOS file system.
It is not used when you
access the shared UNIX file system.
The FCBS command is effective only when you use an actual DOS file system. It is not used on any portion of the shared UNIX file system.
Do not edit the image configuration file /usr/merge/image/config.mki. The factory default images are made on the basis of the entries in this file. Altering any of its lines is likely to result in unexpected and undesirable NeTraverse Merge behavior.