This chapter describes the SoftWindows system configuration and user configuration files, and the X-resource configuration options.
Each user's configuration settings are stored in a file named '.swin2config' in the user's home directory. This file determines the settings that appear in the Options menu dialog boxes. If the user changes any of the settings, and the Save Configuration Changes option is checked in the Exit dialog box, the new values will be saved in the user's configuration file on exiting SoftWindows,
You can also edit the SoftWindows configuration file using a Unix text editor, such as vi.
When a user launches SoftWindows, the initial configuration settings are determined by the system configuration file, sys.swin2config, which is installed in the SoftWindows directory /usr/lib/SoftWindows2, specified by the environment variable $SWIN2HOME.
The system administrator can edit the system configuration file to provide users with different initial settings.
To do this, sys.swin2config must be owned by root, and the SUID bit must be set. If necessary, login as root and from the $SWIN2HOME directory enter the commands:
chown root sys.swin2config chmod 4444 sys.swin2config |
The system configuration file also contains entries to determine the default values for the LPT and COM port settings, the maximum size of the hard disk drive and memory, and the initial size of the Windows desktop.
A full listing of the SoftWindows system configuration file is given on the following pages.
The following entries determine the user's initial SoftWindows preferences:
DRIVE_C_FILE_NAME DRIVE_D_FILE_NAME DRIVE_CDROM_DEVICE_NAME DRIVE_D_FSA_DIRECTORY DRIVE_E_FSA_DIRECTORY $HOME DRIVE_F_FSA_DIRECTORY /CDROM DRIVE_G_FSA_DIRECTORY $SWIN2HOME/windows DRIVE_H_FSA_DIRECTORY $HOME DRIVE_I_FSA_DIRECTORY DRIVE_J_FSA_DIRECTORY DRIVE_K_FSA_DIRECTORY /floppy DRIVE_L_FSA_DIRECTORY DRIVE_M_FSA_DIRECTORY DRIVE_N_FSA_DIRECTORY DRIVE_O_FSA_DIRECTORY DRIVE_P_FSA_DIRECTORY DRIVE_Q_FSA_DIRECTORY DRIVE_R_FSA_DIRECTORY DRIVE_S_FSA_DIRECTORY DRIVE_T_FSA_DIRECTORY DRIVE_U_FSA_DIRECTORY DRIVE_V_FSA_DIRECTORY DRIVE_W_FSA_DIRECTORY DRIVE_X_FSA_DIRECTORY DRIVE_Y_FSA_DIRECTORY DRIVE_Z_FSA_DIRECTORY DRIVE_FLOPPY_A_DEVICE_NAME DRIVE_FLOPPY_B_DEVICE_NAME DISPLAY_GRAPHICS_ADAPTOR VGA DISPLAY_SIZE 1.0 DISPLAY_MSWIN_WIDTH 640 DISPLAY_MSWIN_HEIGHT 480 DISPLAY_MSWIN_COLOURS 16 DISK_DEFAULT_SIZE 80 MEMORY_EXTENDED_SIZE 8 LPT_PORT_1_PS_FLUSH Yes LPT_PORT_2_PS_FLUSH No LPT_PORT_3_PS_FLUSH No LPT_PORT_1_TYPE Pipe LPT_PORT_2_TYPE LPT_PORT_3_TYPE LPT_PORT_1 lp LPT_PORT_2 LPT_PORT_3 COM_PORT_1_PS_FLUSH No COM_PORT_2_PS_FLUSH No COM_PORT_3_PS_FLUSH No COM_PORT_4_PS_FLUSH No COM_PORT_1_TYPE COM_PORT_2_TYPE COM_PORT_3_TYPE COM_PORT_4_TYPE COM_PORT_1 COM_PORT_2 COM_PORT_3 COM_PORT_4 COM_PORT_1_FLOW No COM_PORT_2_FLOW No COM_PORT_3_FLOW No COM_PORT_4_FLOW No SECURE No SECURE_MASK 0 SOUND No AUTO_FREEZE No AUTO_FLUSH Yes AUTO_FLUSH_DELAY 50 KEYBOARD_MAP_FILE_NAME $SWIN2HOME/keyboard/SGINDYus.kbd FILE_DEFAULT $HOME/SoftWin.tmp DEVICE_DEFAULT PIPE_DEFAULT lp DRIVE_HARD_DISK_MAX_SIZE 300 MEMORY_EXTENDED_MAX_SIZE 32 FPU_EMULATION Yes MSWIN_RESIZE Never WINDOW_RESIZE_MODE restart_win CMOS 00 00 00 00 00 00 00 00 00 00 26 02 00 80 00 00 20 00 f0 00 01 80 02 00 00 14 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 19 80 00 00 00 00 00 00 00 00 00 00 00 00 |
The following sections provide details of the alternative values for particular configuration entries:
Table 7-1. MSWIN_RESIZE Values
Value | Description |
|---|---|
File | Output to a Unix file. |
Pipe | Pipe to a Unix process (for example, a print spooler). |
Device | Output to a Unix printer port. |
Blank | Port disabled. |
Value | Description |
|---|---|
File | Output to a Unix file. |
Pipe | Pipe to a Unix process (for example, a print spooler). |
Device | Output to a Unix serial port. |
Blank | Port disabled. |
Table 7-4. DISPLAY_GRAPHICS_ADAPTOR Values
Value | Description |
|---|---|
VGA or SVGA | SVGA display. |
Hercules | Hercules display. |
This entry is optional. If a user does not have write permission to a SoftWindows hard disk file, a warning dialog box will normally be displayed when SoftWindows starts up. The option RO_DISK_PANEL_DISABLE allows you to override this default action as follows:
Table 7-5. RO_DISK_PANEL_DISABLE Values
Value | Description |
|---|---|
No or omitted | The warning dialog box will be displayed if the user cannot write to the disk. |
Yes | The warning dialog box is not displayed. |
The _DEFAULT entries can be changed by the system administrator to determine the default values for the options in the Comms Ports and Lpt Ports dialog boxes.
The _MAX_SIZE entries can be changed by the system administrator to determine the maximum disk and memory sizes.
The following entries do not appear in the user's individual configuration file ($HOME/.swin2config): FILE_DEFAULT, DEVICE_DEFAULT, PIPE_DEFAULT, SECURE, SECURE_MASK, DRIVE_HARD_DISK_MAX_SIZE, and MEMORY_EXTENDED_MAX_SIZE.
SECURE is optional, but if it is not preset, the default value assumed is Yes, so it should be preset to No if secure mode operation is not required.
SECURE_MASK is intended for future expansion and should be set to 0.
Since SoftWindows is an X Windows-based application, you can restrict access to parts of the SoftWindows menu tree by editing the SoftWindows X resource file, sOftWindows, located in $SWIN2HOME.
Each menu item can be individually grayed out by setting its sensitive setting to false. For example, to restrict users from accessing the Display… option, locate the following line in the sOftWindows file:
sOftWindows*dispPBG.sensitive: true |
And change it to:
sOftWindows*dispPBG.sensitive: false |
Alternatively, you can gray out entire menu options, by setting the sensitive setting of the parent menu option to false. For example, to restrict users from accessing the entire Options menu, locate the following line in the sOftWindows file:
sOftWindows*optionCBW.sensitive: true |
And change it to:
sOftWindows*optionCBW.sensitive: false |
To restrict users from accessing any of the SoftWindows menus, except for the Help menu, change the following lines in the sOftWindows file:
sOftWindows*fileCBW.sensitive: true sOftWindows*optionCBW.sensitive: true sOftWindows*actionCBW.sensitive: true |
To the following:
sOftWindows*fileCBW.sensitive: false sOftWindows*optionCBW.sensitive: false sOftWindows*actionCBW.sensitive: false |
To change the fonts on the SoftWindows menus, either edit the following line in the sOftWindows file, if present, or add a similar line to the file:
sOftWindows*FontList: screen14 |
When the user launches Microsoft Windows, the Resize dialog box appears, allowing the user to select the size of the user's Microsoft Windows desktop. The sizes provided in the Resize dialog box are set in the SoftWindows resource file, sOftWindows, and are defined using the following lines:
sOftWindows*windowSizeWidth1: 640 sOftWindows*windowSizeHeight1: 480 sOftWindows*windowSizeWidth2: 800 sOftWindows*windowSizeHeight2: 600 sOftWindows*windowSizeWidth3: 680 sOftWindows*windowSizeHeight3: 700 sOftWindows*windowSizeWidth4: 880 sOftWindows*windowSizeHeight4: 700 |
To change the default size settings, simply modify the relevant lines. For example, to make the fourth pair of default sizes equal to 1024 x 768, change the lines to:
sOftWindows*windowSizeWidth4: 1024 sOftWindows*windowSizeHeight4: 768 |