Jump to content

Stupid OS/2 Tricks/System Tips: Difference between revisions

From EDM2
Ak120 (talk | contribs)
m Stutterer - shut your yap!
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Stupid OS/2 Tricks|Return to OS/2 Stupid Tricks Main Page ]]
{{Stupid}}
 
==Keeping applications from restarting at boot==
=Keeping applications from restarting at boot=
 
When OS/2 is started, it automatically opens applications which were open during the last OS/2 session. To keep applications from restarting on boot, you can use either the manual or automatic method.
When OS/2 is started, it automatically opens applications which were open during the last OS/2 session. To keep applications from restarting on boot, you can use either the manual or automatic method.


Related subject(s):
===Prevent restarting manually===
 
* Prevent restarting manually
* Prevent restarting automatically
* Rebooting from the command line
 
==Prevent restarting manually==
 
To prevent applications from restarting during boot, hold down the Ctrl, left Shift, and F1 keys at the same time, beginning when the mouse pointer appears until the icons begin appearing on the desktop. If you find that disk activity stops, you may have to release the keys and then quickly hold them down again.
To prevent applications from restarting during boot, hold down the Ctrl, left Shift, and F1 keys at the same time, beginning when the mouse pointer appears until the icons begin appearing on the desktop. If you find that disk activity stops, you may have to release the keys and then quickly hold them down again.


Related subject(s):
===Prevent restarting automatically===
 
* Prevent restarting automatically
 
==Prevent restarting automatically==
Placing the line
Placing the line
 
SET RESTARTOBJECTS=STARTUPFOLDERSONLY,REBOOTONLY
  SET RESTARTOBJECTS=STARTUPFOLDERSONLY,REBOOTONLY
 
into your CONFIG.SYS file will prevent any applications which had been open in the last session from opening, but will allow programs in the Startup folder to open.
into your CONFIG.SYS file will prevent any applications which had been open in the last session from opening, but will allow programs in the Startup folder to open.
(this line may be order-dependent on some systems)
(this line may be order-dependent on some systems)


Related subject(s):
==Shutting down without a mouse==
* Prevent restarting manually
 
=Shutting down without a mouse=
To shut OS/2 down without a mouse, press Ctrl-Esc to bring up the Window List, choose the Desktop, press the Spacebar to deselect any icons, press Shift-F10 to pop up the Desktop's menu, choose Shutdown.
To shut OS/2 down without a mouse, press Ctrl-Esc to bring up the Window List, choose the Desktop, press the Spacebar to deselect any icons, press Shift-F10 to pop up the Desktop's menu, choose Shutdown.


=Rebooting from the command line=
==Rebooting from the command line==
To reboot OS/2 down from the command line, type
To reboot OS/2 down from the command line, type
 
SETBOOT /B
  SETBOOT /B
 
Note: the above only works with Boot Manager installed.
Note: the above only works with Boot Manager installed.


or
or
 
SETBOOT /IBD:<drive>
  SETBOOT /IBD:<drive>
 
where <drive> is the letter of the drive or partition to which you wish to boot
where <drive> is the letter of the drive or partition to which you wish to boot


Related subject(s):
Related subject(s):
* Keeping applications from restarting at boot
* Keeping applications from restarting at boot
* SHUTDOWN.CMD
* SHUTDOWN.CMD


=Finding settings for original objects=
==Finding settings for original objects==
 
The settings for all of the objects which were created upon installation of your OS/2 system are contained in the INI.RC file, located in the \OS2 subdirectory. Those handy with REXX and the external REXXutils can use the information contained in the INI.RC file to rebuild the original OS/2 objects.
The settings for all of the objects which were created upon installation of your OS/2 system are contained in the INI.RC file, located in the \OS2 subdirectory. Those handy with REXX and the external REXXutils can use the information contained in the INI.RC file to rebuild the original OS/2 objects.


Related subject(s):
Related subject(s):
* Replacing your Shredder if deleted
* Replacing your Shredder if deleted


=Controlling order of execution in Startup folder=
==Controlling order of execution in Startup folder==
[[Image:Stupid06.png|thumb|Startup folder in Flowed view with item being dragged into it.]]


You can control the order in which objects in your Startup folder execute.
You can control the order in which objects in your Startup folder execute.
#Open the Startup folder in either Flowed or Non-flowed view.
#Drag objects or their shadows into the Startup Folder in the order you want them to execute.


1. Open the Startup folder in either Flowed or Non-flowed view.
==Backing up the *.ini files==
2. Drag objects or their shadows into the Startup Folder in the order you want them to execute.
 
http://www.os2world.com/gallery2/d/4784-1/1_system_startup.jpg
 
ScreenShot: Startup folder in Flowed view with item being dragged into it.
 
Backing up the *.ini files
 
Much of your system's customization is stored in two files, OS2.INI and OS2SYS.INI. To back up these important files, add the following line to the beginning of your CONFIG.SYS:
Much of your system's customization is stored in two files, OS2.INI and OS2SYS.INI. To back up these important files, add the following line to the beginning of your CONFIG.SYS:
 
CALL=<drive1>:\OS2\XCOPY.EXE <drive2>:\OS2\OS*.INI <drive3>:\<path>
  CALL=<drive1>:\OS2\XCOPY.EXE <drive2>:\OS2\OS*.INI <drive3>:\<path>
 
where
where
 
:<drive1> is the letter of the drive in which XCOPY.EXE is found
<drive1> is the letter of the drive in which XCOPY.EXE is found
:<drive2> is the letter of the drive in which the *.ini files are found
 
:<drive3> is the letter of the drive in which you would like to locate the backups of the *.ini files
<drive2> is the letter of the drive in which the *.ini files are found
:<path> is the path in which you would like to locate the backups of the *.ini files
 
<drive3> is the letter of the drive in which you would like to locate the backups of the *.ini files
 
<path> is the path in which you would like to locate the backups of the *.ini files


Note: The 2.11 CSD adds the System attribute to OS2.INI and OS2SYS.INI. In order for this tip to work, you should use XCOPY's /T /R /O switches at the end of the CALL command above.
Note: The 2.11 CSD adds the System attribute to OS2.INI and OS2SYS.INI. In order for this tip to work, you should use XCOPY's /T /R /O switches at the end of the CALL command above.
Line 91: Line 55:
* Restoring last desktop backup
* Restoring last desktop backup


=Removing device drivers for better performance=
==Removing device drivers for better performance==
contributed by Jack Tan
''contributed by Jack Tan''


If you aren't using the DOS subsystem, you can improve performance by removing DOS-specific device drivers from loading in your CONFIG.SYS (they generally begin with the letter V). The same applies to Win-OS/2, HPFS, CD-ROM drivers as well.
If you aren't using the DOS subsystem, you can improve performance by removing DOS-specific device drivers from loading in your CONFIG.SYS (they generally begin with the letter V). The same applies to Win-OS/2, HPFS, CD-ROM drivers as well.


Related subject(s):
Related subject(s):
* Getting memory back from unused caches
* Getting memory back from unused caches


=Speeding up some IDE drives=
==Speeding up some IDE drives==
contributed by Jack Tan
''contributed by Jack Tan''


Try adding switches to the BASEDEV=IBM1S506.ADD line:
Try adding switches to the BASEDEV=IBM1S506.ADD line:
 
BASEDEV=IBM1S506.ADD /A:0 /U:0 /SMS
  BASEDEV=IBM1S506.ADD /A:0 /U:0 /SMS
 
and use /V to see if the /SMS works (/V = verbose). This is supposed to speed up IDE drives that support this feature; otherwise, it will be ignored.
and use /V to see if the /SMS works (/V = verbose). This is supposed to speed up IDE drives that support this feature; otherwise, it will be ignored.


(note: the switches above affect the first drive on the first adapter in the system -- for more information on the switches, search for "basedev" in your online OS/2 Command Reference)
(note: the switches above affect the first drive on the first adapter in the system -- for more information on the switches, search for "basedev" in your online OS/2 Command Reference)


=Disabling use of the floppy drives=
==Disabling use of the floppy drives==
by Darius Vaskelis
''by Darius Vaskelis''


To prevent users from using the floppy drives under OS/2, such as in a workstation situation:
To prevent users from using the floppy drives under OS/2, such as in a workstation situation:


Remove the following line from your CONFIG.SYS:
Remove the following line from your CONFIG.SYS:
 
BASEDEV=IBMxFLPY.ADD
  BASEDEV=IBMxFLPY.ADD
 
Where x is 1 for ISA and EISA, or 2 for Microchannel.
Where x is 1 for ISA and EISA, or 2 for Microchannel.


Getting Epson ActionLaser 1500 to work
==Getting Epson ActionLaser 1500 to work==
 
To get an Epson ActionLaser to work with OS/2 2.1:
To get an Epson ActionLaser to work with OS/2 2.1:
# First, follow the standard steps for non-working printers under OS/2:
# Make sure you have a compliant cable. A parallel cable should have all 25 pins wired, unfortunately, a lot of cables currently manufactured only have 18 pins wired.
# Check your interrupts. ISA and EISA bus machines cannot share interrupts under OS/2. Often, a sound card will be set to the same interrupt as LPT1 (IRQ7), and must be changed.
# Get a compatible I/O card. Some parallel port cards don't seem to work correctly under OS/2.
# Finally, for the Epson ActionLaser, change the "Busy Delay" to +5 (covered in p.4-15 of the Epson's manual).


1. First, follow the standard steps for non-working printers under OS/2:
==Getting memory back from unused caches==
2. Make sure you have a compliant cable. A parallel cable should have all 25 pins wired, unfortunately, a lot of cables currently manufactured only have 18 pins wired.
''from the OS/2 2.1 Technical Reference''
3. Check your interrupts. ISA and EISA bus machines cannot share interrupts under OS/2. Often, a sound card will be set to the same interrupt as LPT1 (IRQ7), and must be changed.
4. Get a compatible I/O card. Some parallel port cards don't seem to work correctly under OS/2.
5. Finally, for the Epson ActionLaser, change the "Busy Delay" to +5 (covered in p.4-15 of the Epson's manual).
 
=Getting memory back from unused caches=
from the OS/2 2.1 Technical Reference


You can increase available resources by disabling unused caches. If you are running an HPFS-only system, remove (or REM) the DISKCACHE line in your CONFIG.SYS file. Similarly, if you are running a FAT-only system, remove (or REM) the IFS=<drive>:\OS2\HPFS.IFS line in your CONFIG.SYS.
You can increase available resources by disabling unused caches. If you are running an HPFS-only system, remove (or REM) the DISKCACHE line in your CONFIG.SYS file. Similarly, if you are running a FAT-only system, remove (or REM) the IFS=<drive>:\OS2\HPFS.IFS line in your CONFIG.SYS.


Related subject(s):
Related subject(s):
* Removing device drivers for better performance


* Removing device drivers for better performance
==Dealing with OS/2 !! SYS messages on boot==
''contributed by Jack Tan''


=Dealing with OS/2 !! SYS messages on boot=
contributed by Jack Tan
The error message:
The error message:
 
OS/2 !! SYS01475
  OS/2 !! SYS01475
OS/2 !! SYS02027
 
  OS/2 !! SYS02027
 
means that the system files can't be found. Try removing any diskettes from the disk drives. If this message appears when trying to boot from a hard disk, use SYSINSTX to restore the OS/2 system files.
means that the system files can't be found. Try removing any diskettes from the disk drives. If this message appears when trying to boot from a hard disk, use SYSINSTX to restore the OS/2 system files.


=Restoring last desktop backup=
==Restoring last desktop backup==
contributed by Jack Tan
''contributed by Jack Tan''


To make the Alt-F1 trick restore your last desktop backup instead of the (ugly) default, replace the CONFIG.SYS, OS2.INI, and OS2SYS.INI in \OS2\INSTALL with the files from your last backup. Make sure to save the original files in \OS2\INSTALL before replacing them.
To make the Alt-F1 trick restore your last desktop backup instead of the (ugly) default, replace the CONFIG.SYS, OS2.INI, and OS2SYS.INI in \OS2\INSTALL with the files from your last backup. Make sure to save the original files in \OS2\INSTALL before replacing them.


Related subject(s):
Related subject(s):
* Backing up the *.ini files
* Backing up the *.ini files


=Viewing *.inf files more conveniently=
==Viewing *.inf files more conveniently==
contributed by Jack Tan
''contributed by Jack Tan''


Here are two tips to make viewing OS/2 *.inf files more convenient:
Here are two tips to make viewing OS/2 *.inf files more convenient:


1. Put several INF files together using a plus sign. On the command line (or 'Parameters' field of the settings notebook), enter something such as:
1. Put several INF files together using a plus sign. On the command line (or 'Parameters' field of the settings notebook), enter something such as:
 
e.g., <drive>:\BOOKS\FILE1.INF+<drive>:\BOOKS\FILE2.INF+ <drive>:\BOOKS\FILE3.INF.
  e.g., <drive>:\BOOKS\FILE1.INF+<drive>:\BOOKS\FILE2.INF+ <drive>:\BOOKS\FILE3.INF.
 
The pathnames aren't necessary if the file is in a directory specified by the HELP environmental variable.
The pathnames aren't necessary if the file is in a directory specified by the HELP environmental variable.


2. You can assign the book names to an environmental variable:
2. You can assign the book names to an environmental variable:
 
e.g., SET FILE=<drive>:\BOOKS\FILE1.INF+<drive>:\BOOKS\FILE2.INF+ <drive>:\BOOKS\FILE3.INF
  e.g., SET FILE=<drive>:\BOOKS\FILE1.INF+<drive>:\BOOKS\FILE2.INF+ <drive>:\BOOKS\FILE3.INF
 
and execute VIEW.EXE using the variable name (e.g., VIEW FILE).
and execute VIEW.EXE using the variable name (e.g., VIEW FILE).


=Using less memory for DOS images=
==Using less memory for DOS images==
 
When you load a DOS image file (Virtual Machine Boot, or VMB), the entire diskette image is loaded into memory. Since the files on the DOS image diskette don't take up much room themselves, much of the memory used for the diskette is wasted. Therefore, in order to regain memory when loading the specific DOS session, try using double-density diskettes to make your DOS images, instead of high-density diskettes.
When you load a DOS image file (Virtual Machine Boot, or VMB), the entire diskette image is loaded into memory. Since the files on the DOS image diskette don't take up much room themselves, much of the memory used for the diskette is wasted. Therefore, in order to regain memory when loading the specific DOS session, try using double-density diskettes to make your DOS images, instead of high-density diskettes.


=Booting OS/2 in full-screen mode=
==Booting OS/2 in full-screen mode==
 
You can boot OS/2 in full-screen mode, and still retain Presentation Manager support for multiple sessions:
You can boot OS/2 in full-screen mode, and still retain Presentation Manager support for multiple sessions:


1. Change:
1. Change:
 
SET RUNWORKPLACE=<drive>:\OS2\PMSHELL.EXE
    SET RUNWORKPLACE=<drive>:\OS2\PMSHELL.EXE
 
in your CONFIG.SYS file to:
in your CONFIG.SYS file to:
 
SET RUNWORKPLACE=<drive>:\OS2\CMD.EXE /FS
      SET RUNWORKPLACE=<drive>:\OS2\CMD.EXE /FS
 
where <drive> is the drive on which OS/2 resides.
where <drive> is the drive on which OS/2 resides.


2. Create the file STARTUP.CMD in your OS/2 boot drive's root directory. STARTUP.CMD should contain the following lines:
2. Create the file STARTUP.CMD in your OS/2 boot drive's root directory. STARTUP.CMD should contain the following lines:
 
@ECHO OFF
      @ECHO OFF
START /FS
      START /FS
  EXIT
      EXIT
 
Related subject(s):
Related subject(s):
* Using OS/2 without the Workplace Shell
* Using OS/2 without the Workplace Shell


=Completing shutdown=
==Completing shutdown==
 
If shutdown seems to "hang" at the first shutdown message box, this trick sometimes works:
If shutdown seems to "hang" at the first shutdown message box, this trick sometimes works:
# Press the Ctrl-Esc keys.
# Wait for about a minute.
# In many cases, a dialog box will pop up telling you that the Workplace Shell isn't responding to system requests, and will give you the choice of clicking on Enter to end the application, or Cancel.
# Click on the Enter box. The shutdown usually proceeds normally.


1. Press the Ctrl-Esc keys.
==Adjusting your swap file==
2. Wait for about a minute.
3. In many cases, a dialog box will pop up telling you that the Workplace Shell isn't responding to system requests, and will give you the choice of clicking on Enter to end the application, or Cancel.
4. Click on the Enter box. The shutdown usually proceeds normally.
 
=Adjusting your swap file=
 
If you have disk space to spare, you can adjust the default startup size of your swap file (SWAPPER.DAT) to improve system performance.
If you have disk space to spare, you can adjust the default startup size of your swap file (SWAPPER.DAT) to improve system performance.


The default startup size of SWAPPER.DAT is set in your CONFIG.SYS file with the line:
The default startup size of SWAPPER.DAT is set in your CONFIG.SYS file with the line:
 
SWAPPATH=<drive>:\<path> <minfree> <swapsize>
  SWAPPATH=<drive>:\<path> <minfree> <swapsize>
 
where <swapsize> is the default startup size of SWAPPER.DAT.
where <swapsize> is the default startup size of SWAPPER.DAT.


To adjust the startup size for better performance:
To adjust the startup size for better performance:
# Monitor the size of the SWAPPER.DAT over the course of a normal day's work. A third-party utility for monitoring swap file size makes this task a bit easier.
# Note the maximum size that SWAPPER.DAT reaches during normal usage.
# Change the <swapsize> parameter of SWAPPATH to reflect at least the maximum swap file size you noted (<swapsize> is measured in kilobytes).


1. Monitor the size of the SWAPPER.DAT over the course of a normal day's work. A third-party utility for monitoring swap file size makes this task a bit easier.
;Caution:You MUST have enough free drive space to use this tip. If the size of the <swapsize> parameter violates the amount needed for the <minfree> parameter, your system will not boot.
2. Note the maximum size that SWAPPER.DAT reaches during normal usage.
3. Change the <swapsize> parameter of SWAPPATH to reflect at least the maximum swap file size you noted (<swapsize> is measured in kilobytes).
 
Caution:
 
You MUST have enough free drive space to use this tip. If the size of the <swapsize> parameter violates the amount needed for the <minfree> parameter, your system will not boot.


=Using SVGA.EXE under real DOS=
==Using SVGA.EXE under real DOS==
contributed by Jack Tan
''contributed by Jack Tan''


Running SVGA.EXE in a VDM usually results in a file called SVGADATA.PMI, which contains information which lets OS/2 access SVGA graphics modes.
Running SVGA.EXE in a VDM usually results in a file called SVGADATA.PMI, which contains information which lets OS/2 access SVGA graphics modes.
Line 241: Line 173:
Sometimes, SVGA.EXE has trouble "seeing" the video chip, and extended graphics modes won't work correctly. If so, try running SVGA.EXE under real DOS or a VMB. This will create a file named SVGADATA.DOS. Rename SVGADATA.DOS to SVGADATA.PMI and copy it into your \OS2 subdirectory.
Sometimes, SVGA.EXE has trouble "seeing" the video chip, and extended graphics modes won't work correctly. If so, try running SVGA.EXE under real DOS or a VMB. This will create a file named SVGADATA.DOS. Rename SVGADATA.DOS to SVGADATA.PMI and copy it into your \OS2 subdirectory.


=Loading a DOS device driver into high memory=
==Loading a DOS device driver into high memory==
contributed by Xavier Caballe
[[Image:Stupid07.png|thumb|DOS Settings for loading a device driver high.]]
''contributed by Xavier Caballe''


In order to load a DOS device driver into high memory in a particular DOS Session:
In order to load a DOS device driver into high memory in a particular DOS Session:
 
# Open the settings notebook for the DOS object.
1. Open the settings notebook for the DOS object.
# Choose the Session tab.
2. Choose the Session tab.
# Click on the DOS Settings button.
3. Click on the DOS Settings button.
# Highlight the DOS_DEVICE setting.
4. Highlight the DOS_DEVICE setting.
# Add 'SIZE=0' (without quotes) before the path and filename for the device driver to load in high memory. For example:
5. Add 'SIZE=0' (without quotes) before the path and filename for the device driver to load in high memory. For example:
SIZE=0 C:\OS2\MDOS\ANSI.SYS
 
      SIZE=0 C:\OS2\MDOS\ANSI.SYS
 
In this example, the ANSI.SYS will be loaded in the high memory area (if available).
In this example, the ANSI.SYS will be loaded in the high memory area (if available).


http://www.os2world.com/gallery2/d/4814-1/2_system_devhigh.jpg
==Fixing "locked" INI files==
 
''contributed by Jack Tan''
Screenshot: DOS Settings for loading a device driver high.
 
=Fixing "locked" INI files=
contributed by Jack Tan


If your INI files (OS2.INI and OS2SYS.INI) stop saving system changes, they may have been marked read-only. To reset the read-only attribute:
If your INI files (OS2.INI and OS2SYS.INI) stop saving system changes, they may have been marked read-only. To reset the read-only attribute:
1. Change to your \OS2 subdirectory.
# Change to your \OS2 subdirectory.
2. Type
# Type
attrib -r os2*.ini
at an OS/2 command prompt.
# You may have to shutdown and reboot.


    attrib -r os2*.ini
at an OS/2 command prompt.
3. You may have to shutdown and reboot.
Note: if using OS/2 2.0, you may have to boot OS/2 from your installation floppies in order to reset the attributes.
Note: if using OS/2 2.0, you may have to boot OS/2 from your installation floppies in order to reset the attributes.


=Playing audio CDs via REXX=
==Playing audio CDs via REXX==
contributed by Xavier Caballe
''contributed by Xavier Caballe''


The combination of REXX with MMPM/2 can be quite powerful, as demonstrated by CDPLAY.CMD, a "poor man's CD player."
The combination of REXX with MMPM/2 can be quite powerful, as demonstrated by CDPLAY.CMD, a "poor man's CD player."
Line 281: Line 206:


Related subject(s):
Related subject(s):
* Playing media files from the command line  
* Playing media files from the command line


=Playing media files from the command line=
==Playing media files from the command line==
contributed by Jack Tan
''contributed by Jack Tan''


Note: MMPM/2 is required.
Note: MMPM/2 is required.


6. To play a media file, use PLAY.CMD (included in MMPM/2, and requires REXX) or MPPM.EXE.
# To play a media file, use PLAY.CMD (included in MMPM/2, and requires REXX) or MPPM.EXE.
7. To play a media file immediately (i.e., no need to hit the "Play" button in the Media Player window) and close the session afterwards, use MPPM.EXE /SC <filename>, where <filename> is a WAV or AVI file.
# To play a media file immediately (i.e., no need to hit the "Play" button in the Media Player window) and close the session afterwards, use MPPM.EXE /SC <filename>, where <filename> is a WAV or AVI file.
8. To play a media file immediately, close the session afterwards, and not see the Media Player window, use START /MIN MPPM.EXE /SC <filename>, where <filename> is a WAV or AVI file.
# To play a media file immediately, close the session afterwards, and not see the Media Player window, use START /MIN MPPM.EXE /SC <filename>, where <filename> is a WAV or AVI file.


Related subject(s):
Related subject(s):
* Playing audio CDs via REXX  
* Playing audio CDs via REXX


=Determining if you have a buffered UART in your computer=
==Determining if you have a buffered UART in your computer==
A buffered UART (such as the 16550AF chip) is often necessary for error-free serial communications in a multitasking environment.
A buffered UART (such as the 16550AF chip) is often necessary for error-free serial communications in a multitasking environment.


Line 301: Line 226:
# Open an OS/2 command line session.
# Open an OS/2 command line session.
# Type
# Type
    MODE COMx
MODE COMx
where x is the number of the serial port you wish to check.
where x is the number of the serial port you wish to check.
# A list of current settings for the serial port should appear. If the line
# A list of current settings for the serial port should appear. If the line
    BUFFER=N/A
BUFFER=N/A
appears, you do not have a buffered UART. If the BUFFER line contains anything other than N/A, you have a buffered UART.
appears, you do not have a buffered UART. If the BUFFER line contains anything other than N/A, you have a buffered UART.


=Pooling multiple printers=
==Pooling multiple printers==
 
[[Image:Stupid08.png|thumb|Choosing multiple ports for the printer object.]]
If you have more than one printer that use the same printer driver, and each is attached to different parallel or serial ports, you can configure your printer object so that waiting print jobs will be sent to any free port.
If you have more than one printer that use the same printer driver, and each is attached to different parallel or serial ports, you can configure your printer object so that waiting print jobs will be sent to any free port.


Line 319: Line 244:
# Close the Settings notebook.
# Close the Settings notebook.


http://www.os2world.com/gallery2/d/4816-1/3_system_laser.jpg
==Viewing the Nowhere subdirectory==
 
Screenshot: Choosing multiple ports for the printer object.
 
=Viewing the Nowhere subdirectory=
Note: this trick does not appear to work in OS/2 Warp
Note: this trick does not appear to work in OS/2 Warp


Ever wonder what the subdirectory called Nowhere on your OS/2 boot drive is? The Nowhere subdirectory is a place where transient objects are stored.
Ever wonder what the subdirectory called Nowhere on your OS/2 boot drive is? The Nowhere subdirectory is a place where transient objects are stored.
 
[[Image:Stupid44.png|thumb]]
Since each directory represents a folder, you can view the Nowhere directory, and watch object appear and disappear in it:
Since each directory represents a folder, you can view the Nowhere directory, and watch object appear and disappear in it:
# Bring up the desktop's popup menu by clicking once on the desktop with mouse button 2.
# Bring up the desktop's popup menu by clicking once on the desktop with mouse button 2.
# Choose Find.
# Choose Find.
# In the entry box next to "Folder:" type
# In the entry box next to "Folder:" type <tt><drive>:\</tt> where <drive> is the letter of the drive on which OS/2 is installed.
            <drive>:\
where <drive> is the letter of the drive on which OS/2 is installed.
# Click on the Find button. All of the objects in the root directory of your OS/2 drive should appear in a folder.
# Click on the Find button. All of the objects in the root directory of your OS/2 drive should appear in a folder.
# Open the folder named "Nowhere." (Note: you may have to open it in Icon view via its popup menu, depending on how your system defaults are set.)
# Open the folder named "Nowhere." (Note: you may have to open it in Icon view via its popup menu, depending on how your system defaults are set.)
# You should see some objects in your open Nowhere folder.
# You should see some objects in your open Nowhere folder.
<b>Caution</b>
'''Caution'''
Do not manipulate any of the objects in the Nowhere folder! Simply observe!
Do not manipulate any of the objects in the Nowhere folder! Simply observe!
# Try opening and closing folders on your desktop; you should see objects appear and disappear from the Nowhere folder.
# Try opening and closing folders on your desktop; you should see objects appear and disappear from the Nowhere folder.
# When you are done watching the Nowhere folder, close it, then feel free to delete the Find Results folder, since the objects in it are only shadows, not the actual objects.
# When you are done watching the Nowhere folder, close it, then feel free to delete the Find Results folder, since the objects in it are only shadows, not the actual objects.


=Backing up INI files in the background=
==Backing up INI files in the background==
contributed by [[Jorge Omar]]
''contributed by Jorge Omar''


If you would like to backup your OS2.INI and OS2SYS.INI files in the background during the boot process:
If you would like to backup your OS2.INI and OS2SYS.INI files in the background during the boot process:
1. Create an OS/2 batch file named BACKINI.CMD:
1. Create an OS/2 batch file named BACKINI.CMD:
            ATTRIB -S <drive>:\OS2\OS2*.INI
ATTRIB -S <drive>:\OS2\OS2*.INI
            COPY <drive>:\OS2\*.BK1 <drive>:\OS2\*.BK2
COPY <drive>:\OS2\*.BK1 <drive>:\OS2\*.BK2
            COPY <drive>:\OS2\OS2*.INI <drive>:\OS2\*.BK1
COPY <drive>:\OS2\OS2*.INI <drive>:\OS2\*.BK1
            ATTRIB +S <drive>:\OS2\OS2*.INI
ATTRIB +S <drive>:\OS2\OS2*.INI
where <drive> is the drive on which OS/2 resides.
where <drive> is the drive on which OS/2 resides.
Note: the ATTRIB command is only needed for systems running OS/2 2.11 and higher.
Note: the ATTRIB command is only needed for systems running OS/2 2.11 and higher.
Line 357: Line 276:
4. In the Path and File name box, fill in the necessary information for BACKINI.CMD.
4. In the Path and File name box, fill in the necessary information for BACKINI.CMD.
5. Click on the Session tab.
5. Click on the Session tab.
6. Place a checkmark next to Start Minimized.
6. Place a check mark next to Start Minimized.
7. Close the Settings notebook.
7. Close the Settings notebook.


A variation of the above BACKINI.CMD uses XCOPY switches rather than using ATTRIB to reset the System attribute:
A variation of the above BACKINI.CMD uses XCOPY switches rather than using ATTRIB to reset the System attribute:
 
BACKINI.CMD:
      BACKINI.CMD:
  XCOPY <drive>:\OS2\*.BK1 <drive>:\OS2\*.BK1 /T /R /O
 
  XCOPY <drive>:\OS2\OS2*.INI <drive>:\OS2\*.BK1
      XCOPY <drive>:\OS2\*.BK1 <drive>:\OS2\*.BK1 /T /R /O
      XCOPY <drive>:\OS2\OS2*.INI <drive>:\OS2\*.BK1
 
Note: the files OS2.BK1, OS2.BK2, OS2SYS.BK1, OS2SYS.BK1 must exist in <drive>:\OS2\ before this will run!
Note: the files OS2.BK1, OS2.BK2, OS2SYS.BK1, OS2SYS.BK1 must exist in <drive>:\OS2\ before this will run!


Line 372: Line 288:
* Backing up the INI files
* Backing up the INI files


=Caching your cdrom drive=
==Caching your cdrom drive==
 
You can adjust the read cache for your CD-ROM drive. In your CONFIG.SYS, you can add a switch to the end of the cdrom IFS line:
You can adjust the read cache for your cdrom drive. In your CONFIG.SYS, you can add a switch to the end of the cdrom IFS line:
IFS=<drive>:\OS2\CDFS.IFS /C:<number>
 
      IFS=<drive>:\OS2\CDFS.IFS /C:<number>


where <drive> is the drive on which CDFS.IFS is located
where <drive> is the drive on which CDFS.IFS is located
<number> is the number of 64K segments used for the cache. The default is 2, or 128K (2 x 64K = 128K).
<number> is the number of 64K segments used for the cache. The default is 2, or 128K (2 x 64K = 128K).


=Resetting Boot Manager to have no default partition=
==Resetting Boot Manager to have no default partition==
contributed by [[Jack Tan]]
''contributed by Jack Tan''


Boot Manager can boot to the partition from which the system was last started, but once you select a default partition from which to boot in Boot Manager, you lose the ability. To reset Boot Manager so that it has no default value, issue the following command at an OS/2 prompt:
Boot Manager can boot to the partition from which the system was last started, but once you select a default partition from which to boot in Boot Manager, you lose the ability. To reset Boot Manager so that it has no default value, issue the following command at an OS/2 prompt:
      SETBOOT /0:
SETBOOT /0:


=Booting DOS from a C: partition within OS/2=
==Booting DOS from a C: partition within OS/2==
 
You can create a Virtual Machine Boot to boot real DOS from the C:. partition, rather than the typical floppy boot if you are running a Boot Manager system with real DOS on the primary (C:) partition. Point the Virtual Machine Boot at the C: partition by setting DOS_STARTUP_DRIVE to C:. OS/2 must be installed on a logical drive.
You can create a Virtual Machine Boot to boot real DOS from the C:. partition, rather than the typical floppy boot if you are running a Boot Manager system with real DOS on the primary (C:) paritition. Point the Virtual Mahcine Boot at the C: partition by setting DOS_STARTUP_DRIVE to C:. OS/2 must be installed on a logical drive.


Related subjects:
Related subjects:
* Using less memory for DOS images
* Using less memory for DOS images


=Resetting the boot record=
==Resetting the boot record==
contributed by [[Jack Tan]]
''contributed by Jack Tan''


If your boot record should become damaged, you can reset your boot record by typing the following at an OS/2 prompt:
If your boot record should become damaged, you can reset your boot record by typing the following at an OS/2 prompt:
FDISK /NEWMBR
==Stop DHCP Server Search at Boot==
It may happen that under a Wireless network when you boot OS/2 you will get a DHCP timer (60 secs) and you want to get rid of this message.
Open with the text edit the following file "X:\MPTN\BIN\SETUP.CMD" (where X is your OS/2 drive).
Search for the "dhcpstrt" line and change the default time to 0 by adding "-d 0".
It make look like:
dhcpstrt -i lan0 -d 0
This will stop the DHCP search on the OS/2 boot.


      FDISK /NEWMBR
[[Category:Stupid OS/2 Tricks]]

Latest revision as of 17:38, 19 March 2018

Stupid OS/2 Tricks

Keeping applications from restarting at boot

When OS/2 is started, it automatically opens applications which were open during the last OS/2 session. To keep applications from restarting on boot, you can use either the manual or automatic method.

Prevent restarting manually

To prevent applications from restarting during boot, hold down the Ctrl, left Shift, and F1 keys at the same time, beginning when the mouse pointer appears until the icons begin appearing on the desktop. If you find that disk activity stops, you may have to release the keys and then quickly hold them down again.

Prevent restarting automatically

Placing the line

SET RESTARTOBJECTS=STARTUPFOLDERSONLY,REBOOTONLY

into your CONFIG.SYS file will prevent any applications which had been open in the last session from opening, but will allow programs in the Startup folder to open. (this line may be order-dependent on some systems)

Shutting down without a mouse

To shut OS/2 down without a mouse, press Ctrl-Esc to bring up the Window List, choose the Desktop, press the Spacebar to deselect any icons, press Shift-F10 to pop up the Desktop's menu, choose Shutdown.

Rebooting from the command line

To reboot OS/2 down from the command line, type

SETBOOT /B

Note: the above only works with Boot Manager installed.

or

SETBOOT /IBD:<drive>

where <drive> is the letter of the drive or partition to which you wish to boot

Related subject(s):

  • Keeping applications from restarting at boot
  • SHUTDOWN.CMD

Finding settings for original objects

The settings for all of the objects which were created upon installation of your OS/2 system are contained in the INI.RC file, located in the \OS2 subdirectory. Those handy with REXX and the external REXXutils can use the information contained in the INI.RC file to rebuild the original OS/2 objects.

Related subject(s):

  • Replacing your Shredder if deleted

Controlling order of execution in Startup folder

Startup folder in Flowed view with item being dragged into it.

You can control the order in which objects in your Startup folder execute.

  1. Open the Startup folder in either Flowed or Non-flowed view.
  2. Drag objects or their shadows into the Startup Folder in the order you want them to execute.

Backing up the *.ini files

Much of your system's customization is stored in two files, OS2.INI and OS2SYS.INI. To back up these important files, add the following line to the beginning of your CONFIG.SYS:

CALL=<drive1>:\OS2\XCOPY.EXE <drive2>:\OS2\OS*.INI <drive3>:\<path>

where

<drive1> is the letter of the drive in which XCOPY.EXE is found
<drive2> is the letter of the drive in which the *.ini files are found
<drive3> is the letter of the drive in which you would like to locate the backups of the *.ini files
<path> is the path in which you would like to locate the backups of the *.ini files

Note: The 2.11 CSD adds the System attribute to OS2.INI and OS2SYS.INI. In order for this tip to work, you should use XCOPY's /T /R /O switches at the end of the CALL command above.

Related subject(s):

  • Restoring last desktop backup

Removing device drivers for better performance

contributed by Jack Tan

If you aren't using the DOS subsystem, you can improve performance by removing DOS-specific device drivers from loading in your CONFIG.SYS (they generally begin with the letter V). The same applies to Win-OS/2, HPFS, CD-ROM drivers as well.

Related subject(s):

  • Getting memory back from unused caches

Speeding up some IDE drives

contributed by Jack Tan

Try adding switches to the BASEDEV=IBM1S506.ADD line:

BASEDEV=IBM1S506.ADD /A:0 /U:0 /SMS

and use /V to see if the /SMS works (/V = verbose). This is supposed to speed up IDE drives that support this feature; otherwise, it will be ignored.

(note: the switches above affect the first drive on the first adapter in the system -- for more information on the switches, search for "basedev" in your online OS/2 Command Reference)

Disabling use of the floppy drives

by Darius Vaskelis

To prevent users from using the floppy drives under OS/2, such as in a workstation situation:

Remove the following line from your CONFIG.SYS:

BASEDEV=IBMxFLPY.ADD

Where x is 1 for ISA and EISA, or 2 for Microchannel.

Getting Epson ActionLaser 1500 to work

To get an Epson ActionLaser to work with OS/2 2.1:

  1. First, follow the standard steps for non-working printers under OS/2:
  2. Make sure you have a compliant cable. A parallel cable should have all 25 pins wired, unfortunately, a lot of cables currently manufactured only have 18 pins wired.
  3. Check your interrupts. ISA and EISA bus machines cannot share interrupts under OS/2. Often, a sound card will be set to the same interrupt as LPT1 (IRQ7), and must be changed.
  4. Get a compatible I/O card. Some parallel port cards don't seem to work correctly under OS/2.
  5. Finally, for the Epson ActionLaser, change the "Busy Delay" to +5 (covered in p.4-15 of the Epson's manual).

Getting memory back from unused caches

from the OS/2 2.1 Technical Reference

You can increase available resources by disabling unused caches. If you are running an HPFS-only system, remove (or REM) the DISKCACHE line in your CONFIG.SYS file. Similarly, if you are running a FAT-only system, remove (or REM) the IFS=<drive>:\OS2\HPFS.IFS line in your CONFIG.SYS.

Related subject(s):

  • Removing device drivers for better performance

Dealing with OS/2 !! SYS messages on boot

contributed by Jack Tan

The error message:

OS/2 !! SYS01475
OS/2 !! SYS02027

means that the system files can't be found. Try removing any diskettes from the disk drives. If this message appears when trying to boot from a hard disk, use SYSINSTX to restore the OS/2 system files.

Restoring last desktop backup

contributed by Jack Tan

To make the Alt-F1 trick restore your last desktop backup instead of the (ugly) default, replace the CONFIG.SYS, OS2.INI, and OS2SYS.INI in \OS2\INSTALL with the files from your last backup. Make sure to save the original files in \OS2\INSTALL before replacing them.

Related subject(s):

  • Backing up the *.ini files

Viewing *.inf files more conveniently

contributed by Jack Tan

Here are two tips to make viewing OS/2 *.inf files more convenient:

1. Put several INF files together using a plus sign. On the command line (or 'Parameters' field of the settings notebook), enter something such as:

e.g., <drive>:\BOOKS\FILE1.INF+<drive>:\BOOKS\FILE2.INF+ <drive>:\BOOKS\FILE3.INF.

The pathnames aren't necessary if the file is in a directory specified by the HELP environmental variable.

2. You can assign the book names to an environmental variable:

e.g., SET FILE=<drive>:\BOOKS\FILE1.INF+<drive>:\BOOKS\FILE2.INF+ <drive>:\BOOKS\FILE3.INF

and execute VIEW.EXE using the variable name (e.g., VIEW FILE).

Using less memory for DOS images

When you load a DOS image file (Virtual Machine Boot, or VMB), the entire diskette image is loaded into memory. Since the files on the DOS image diskette don't take up much room themselves, much of the memory used for the diskette is wasted. Therefore, in order to regain memory when loading the specific DOS session, try using double-density diskettes to make your DOS images, instead of high-density diskettes.

Booting OS/2 in full-screen mode

You can boot OS/2 in full-screen mode, and still retain Presentation Manager support for multiple sessions:

1. Change:

SET RUNWORKPLACE=<drive>:\OS2\PMSHELL.EXE

in your CONFIG.SYS file to:

SET RUNWORKPLACE=<drive>:\OS2\CMD.EXE /FS

where <drive> is the drive on which OS/2 resides.

2. Create the file STARTUP.CMD in your OS/2 boot drive's root directory. STARTUP.CMD should contain the following lines:

@ECHO OFF
START /FS
 EXIT

Related subject(s):

  • Using OS/2 without the Workplace Shell

Completing shutdown

If shutdown seems to "hang" at the first shutdown message box, this trick sometimes works:

  1. Press the Ctrl-Esc keys.
  2. Wait for about a minute.
  3. In many cases, a dialog box will pop up telling you that the Workplace Shell isn't responding to system requests, and will give you the choice of clicking on Enter to end the application, or Cancel.
  4. Click on the Enter box. The shutdown usually proceeds normally.

Adjusting your swap file

If you have disk space to spare, you can adjust the default startup size of your swap file (SWAPPER.DAT) to improve system performance.

The default startup size of SWAPPER.DAT is set in your CONFIG.SYS file with the line:

SWAPPATH=<drive>:\<path> <minfree> <swapsize>

where <swapsize> is the default startup size of SWAPPER.DAT.

To adjust the startup size for better performance:

  1. Monitor the size of the SWAPPER.DAT over the course of a normal day's work. A third-party utility for monitoring swap file size makes this task a bit easier.
  2. Note the maximum size that SWAPPER.DAT reaches during normal usage.
  3. Change the <swapsize> parameter of SWAPPATH to reflect at least the maximum swap file size you noted (<swapsize> is measured in kilobytes).
Caution
You MUST have enough free drive space to use this tip. If the size of the <swapsize> parameter violates the amount needed for the <minfree> parameter, your system will not boot.

Using SVGA.EXE under real DOS

contributed by Jack Tan

Running SVGA.EXE in a VDM usually results in a file called SVGADATA.PMI, which contains information which lets OS/2 access SVGA graphics modes.

Sometimes, SVGA.EXE has trouble "seeing" the video chip, and extended graphics modes won't work correctly. If so, try running SVGA.EXE under real DOS or a VMB. This will create a file named SVGADATA.DOS. Rename SVGADATA.DOS to SVGADATA.PMI and copy it into your \OS2 subdirectory.

Loading a DOS device driver into high memory

DOS Settings for loading a device driver high.

contributed by Xavier Caballe

In order to load a DOS device driver into high memory in a particular DOS Session:

  1. Open the settings notebook for the DOS object.
  2. Choose the Session tab.
  3. Click on the DOS Settings button.
  4. Highlight the DOS_DEVICE setting.
  5. Add 'SIZE=0' (without quotes) before the path and filename for the device driver to load in high memory. For example:
SIZE=0 C:\OS2\MDOS\ANSI.SYS

In this example, the ANSI.SYS will be loaded in the high memory area (if available).

Fixing "locked" INI files

contributed by Jack Tan

If your INI files (OS2.INI and OS2SYS.INI) stop saving system changes, they may have been marked read-only. To reset the read-only attribute:

  1. Change to your \OS2 subdirectory.
  2. Type
attrib -r os2*.ini

at an OS/2 command prompt.

  1. You may have to shutdown and reboot.

Note: if using OS/2 2.0, you may have to boot OS/2 from your installation floppies in order to reset the attributes.

Playing audio CDs via REXX

contributed by Xavier Caballe

The combination of REXX with MMPM/2 can be quite powerful, as demonstrated by CDPLAY.CMD, a "poor man's CD player."

Note: requires MMPM/2

Related subject(s):

  • Playing media files from the command line

Playing media files from the command line

contributed by Jack Tan

Note: MMPM/2 is required.

  1. To play a media file, use PLAY.CMD (included in MMPM/2, and requires REXX) or MPPM.EXE.
  2. To play a media file immediately (i.e., no need to hit the "Play" button in the Media Player window) and close the session afterwards, use MPPM.EXE /SC <filename>, where <filename> is a WAV or AVI file.
  3. To play a media file immediately, close the session afterwards, and not see the Media Player window, use START /MIN MPPM.EXE /SC <filename>, where <filename> is a WAV or AVI file.

Related subject(s):

  • Playing audio CDs via REXX

Determining if you have a buffered UART in your computer

A buffered UART (such as the 16550AF chip) is often necessary for error-free serial communications in a multitasking environment.

To determine if your computer has a buffered UART:

  1. Open an OS/2 command line session.
  2. Type
MODE COMx

where x is the number of the serial port you wish to check.

  1. A list of current settings for the serial port should appear. If the line
BUFFER=N/A

appears, you do not have a buffered UART. If the BUFFER line contains anything other than N/A, you have a buffered UART.

Pooling multiple printers

Choosing multiple ports for the printer object.

If you have more than one printer that use the same printer driver, and each is attached to different parallel or serial ports, you can configure your printer object so that waiting print jobs will be sent to any free port.

"Pooling" multiple printers:

  1. Open the Settings notebook for the printer object.
  2. Click on the Printer Driver tab.
  3. Highlight the desired printer driver.
  4. Click on the Output tab.
  5. Hold the Ctrl key while selecting all the desired ports with mouse button 1.
  6. Close the Settings notebook.

Viewing the Nowhere subdirectory

Note: this trick does not appear to work in OS/2 Warp

Ever wonder what the subdirectory called Nowhere on your OS/2 boot drive is? The Nowhere subdirectory is a place where transient objects are stored.

Since each directory represents a folder, you can view the Nowhere directory, and watch object appear and disappear in it:

  1. Bring up the desktop's popup menu by clicking once on the desktop with mouse button 2.
  2. Choose Find.
  3. In the entry box next to "Folder:" type <drive>:\ where <drive> is the letter of the drive on which OS/2 is installed.
  4. Click on the Find button. All of the objects in the root directory of your OS/2 drive should appear in a folder.
  5. Open the folder named "Nowhere." (Note: you may have to open it in Icon view via its popup menu, depending on how your system defaults are set.)
  6. You should see some objects in your open Nowhere folder.

Caution Do not manipulate any of the objects in the Nowhere folder! Simply observe!

  1. Try opening and closing folders on your desktop; you should see objects appear and disappear from the Nowhere folder.
  2. When you are done watching the Nowhere folder, close it, then feel free to delete the Find Results folder, since the objects in it are only shadows, not the actual objects.

Backing up INI files in the background

contributed by Jorge Omar

If you would like to backup your OS2.INI and OS2SYS.INI files in the background during the boot process: 1. Create an OS/2 batch file named BACKINI.CMD:

ATTRIB -S <drive>:\OS2\OS2*.INI
COPY <drive>:\OS2\*.BK1 <drive>:\OS2\*.BK2
COPY <drive>:\OS2\OS2*.INI <drive>:\OS2\*.BK1
ATTRIB +S <drive>:\OS2\OS2*.INI

where <drive> is the drive on which OS/2 resides. Note: the ATTRIB command is only needed for systems running OS/2 2.11 and higher. 2. Open the Templates folder. 3. Drag off a program template and place it into the Startup folder. A Settings notebook should open. 4. In the Path and File name box, fill in the necessary information for BACKINI.CMD. 5. Click on the Session tab. 6. Place a check mark next to Start Minimized. 7. Close the Settings notebook.

A variation of the above BACKINI.CMD uses XCOPY switches rather than using ATTRIB to reset the System attribute:

BACKINI.CMD:
 XCOPY <drive>:\OS2\*.BK1 <drive>:\OS2\*.BK1 /T /R /O
 XCOPY <drive>:\OS2\OS2*.INI <drive>:\OS2\*.BK1

Note: the files OS2.BK1, OS2.BK2, OS2SYS.BK1, OS2SYS.BK1 must exist in <drive>:\OS2\ before this will run!

Related subject(s):

  • Backing up the INI files

Caching your cdrom drive

You can adjust the read cache for your CD-ROM drive. In your CONFIG.SYS, you can add a switch to the end of the cdrom IFS line:

IFS=<drive>:\OS2\CDFS.IFS /C:<number>

where <drive> is the drive on which CDFS.IFS is located <number> is the number of 64K segments used for the cache. The default is 2, or 128K (2 x 64K = 128K).

Resetting Boot Manager to have no default partition

contributed by Jack Tan

Boot Manager can boot to the partition from which the system was last started, but once you select a default partition from which to boot in Boot Manager, you lose the ability. To reset Boot Manager so that it has no default value, issue the following command at an OS/2 prompt:

SETBOOT /0:

Booting DOS from a C: partition within OS/2

You can create a Virtual Machine Boot to boot real DOS from the C:. partition, rather than the typical floppy boot if you are running a Boot Manager system with real DOS on the primary (C:) partition. Point the Virtual Machine Boot at the C: partition by setting DOS_STARTUP_DRIVE to C:. OS/2 must be installed on a logical drive.

Related subjects:

  • Using less memory for DOS images

Resetting the boot record

contributed by Jack Tan

If your boot record should become damaged, you can reset your boot record by typing the following at an OS/2 prompt:

FDISK /NEWMBR

Stop DHCP Server Search at Boot

It may happen that under a Wireless network when you boot OS/2 you will get a DHCP timer (60 secs) and you want to get rid of this message.

Open with the text edit the following file "X:\MPTN\BIN\SETUP.CMD" (where X is your OS/2 drive). Search for the "dhcpstrt" line and change the default time to 0 by adding "-d 0". It make look like:

dhcpstrt -i lan0 -d 0

This will stop the DHCP search on the OS/2 boot.