Stupid OS/2 Tricks/WorkPlace Shell Tips

Return to OS/2 Stupid Tricks Main Page

This section covers tips and tricks which relate to the Workplace Shell.

Saving desktop without shutting down
by Jack Tan

To save the settings of your desktop without shutting down OS/2:
 * 1) Open the Settings folder for the Desktop.
 * 2) Choose the Window tab.
 * 3) Under Object Open Behavior, choose Create New Object.
 * 4) Close the Settings folder.
 * 5) Click on the arrow next to Open in the Desktop's popup menu; choose Icon View.
 * 6) A folder of your Desktop should appear. You can arrange this folder any way you wish.
 * 7) Close the folder of your Desktop to save its settings. The icon positions will be saved.
 * 8) Change the Object Open Behavior to Display Existing Window.
 * 9) To activate the newly-saved Desktop, use a kill utility to kill the second PMSHELL process. The Workplace Shell will restart with your newly-saved icon settings.

Related subject(s)
 * Recovering after an accidental Arrange

Adding an "open folder" entry to the desktop's popup menu
To add an entry to the desktop's popup menu which allows you to open a specific folder:
 * 1) Create a REXX script,
 * 2) OPEN.CMD to open the folder. Open the Templates folder.
 * 3) Use the right mouse button to drag a copy of the Program template to the desired final location. Its Settings notebook should open.
 * 4) Fill in the path and file name (OPEN.CMD) on the Programs page. Complete the General page as desired.
 * 5) Close the Settings notebook.
 * 6) Open the Settings notebook for the Desktop.
 * 7) Choose the Menu tab.
 * 8) If using OS/2 v2.1, drag the icon of your newly-created OPEN.CMD object onto the box underneath "Actions on menu: Primary pop-up menu." If using OS/2 v2.0, click on the Create Another button and fill in the proper information.
 * 9) The menu choice for your OPEN.CMD object should now be available on the desktop's popup menu.

Note: If you repeat the "call SysSetObjectData" line a second time, the folder will open in the foreground.

Related subject(s):
 * Adding command sessions to the desktop's popup menu
 * Opening multiple command line sessions from the desktop menu
 * Adding INF files to the desktop popup menu
 * BITMAP.CMD
 * SETPTR.CMD
 * SETFONT.CMD
 * CHKDRIVE.CMD
 * SHUTDOWN.CMD
 * SHREDDER.CMD
 * SLEEP.CMD
 * LARGE.CMD
 * EVAL.CMD
 * BIGDOS.CMD
 * PUTLONG.CMD

Changing color of shadow icon text
To change the color of the shadow icon text:
 * 1) Open the Scheme Palette.
 * 2) Choose Shadow Text.
 * 3) Choose the desired color from the color wheel.
 * 4) Close the Scheme Palette.
 * 5) Drag (or Alt-drag) the desired scheme to the desired folder with the right mouse button.

Related subject(s):
 * Changing icon text color

Moving icon a small distance
from Timothy F. Sipples' FAQ

To move an icon a small distance, "grab" the outer edge of the icon with the mouse and drag it to the new position.

Changing desktop bitmaps randomly at specified interval
The Desktop bitmaps can be changed via a REXX script, BITMAP.CMD. Note that this script does not support tiling of bitmaps.

Changes to bitmap.cmd (thanks to Jack Tan) added so that bitmap subdirectory is no longer hard-coded into the script.

Other REXX scripts:
 * OPEN.CMD
 * SETPTR.CMD
 * SETFONT.CMD
 * CHKDRIVE.CMD
 * SHUTDOWN.CMD
 * SHREDDER.CMD
 * SLEEP.CMD
 * LARGE.CMD
 * EVAL.CMD
 * BIGDOS.CMD
 * PUTLONG.CMD

Changing the standard mouse pointer
contributed by Jack Tan; original by Dann Lunsford

You can replace the various mouse pointers with your own customized creations, and can remove the customized pointers.
 * 1) Use the Icon Editor to create a mouse pointer file with the extension *.PTR.
 * 2) Create the REXX script, SETPTR.CMD
 * 3) Type SETPTR.CMD /? for help.


 * Caution:Do not move the *.ptr file after assigning the mouse pointer! You will not be able to boot your machine if the *.ptr file is missing or invalid.

Other REXX scripts:
 * OPEN.CMD
 * BITMAP.CMD
 * SETFONT.CMD
 * CHKDRIVE.CMD
 * SHUTDOWN.CMD
 * SHREDDER.CMD
 * SLEEP.CMD
 * LARGE.CMD
 * EVAL.CMD
 * BIGDOS.CMD
 * PUTLONG.CMD

Making an object prompt for a parameter
To make an object prompt for a parameter when invoked
 * 1) Open the Settings notebook for the object.
 * 2) In the Parameters field of the Program page, enter a left square bracket, a space, then a right square bracket, i.e., [ ]
 * 3) If you want text to appear along with parameter prompting, insert the desired text between the square brackets.

Finding a "covered" icon
The disadvantage of having many windows open on the desktop is that icons on the desktop can often get covered. To find an icon more easily:
 * 1) Click the right mouse button on a clear space on the desktop.
 * 2) Click on the arrow next to Open on the popup menu.
 * 3) Choose Tree or Details View (Icon View can only be selected if the Desktop's object open behavior has been set to Create New Window); this will open up a new view of your desktop from which you can find the icon you want.

Changing icon text color


The color of the icon text on your desktop can be changed as follows:
 * 1) Open the Color Palette.
 * 2) Hold the Ctrl key.
 * 3) Use the right mouse button to drag the desired color to the desktop.

Related subject(s):
 * Changing color of shadow icon text

Recovering after an accidental Arrange
To regain your desktop's icon positions after an accidental Arrange, use a third-party utility which can kill processes to kill the second instance of PMSHELL. The Workplace Shell will restart with your old icon positions.

Related subject(s):
 * Saving desktop without shutting down

Creating an onscreen "app bar"
You can create something that acts a little like an "app bar":
 * 1) Create a new folder.
 * 2) Size the folder so that it has the shape and size that you like, then position it where you like.
 * 3) Set the folder's view to either Flowed or Non-flowed.
 * 4) Drag shadows of your most-used applications to the folder.
 * 5) Drag a shadow of your "app bar" folder to your Startup folder.
 * 6) You now have a folder of your most-used apps that will open at boot. You can further customize the "app bar" with a utility that will cause the folder to "float" on top of other windows so that it will be more accessible.

Creating a "trash can"
You can create a trash can-like icon on your desktop:
 * 1) Open the Templates folder and make a copy of the Folder template.
 * 2) You should now have a template called Folder&colon.1; rename it to Trash, or whatever you like.
 * 3) Attach you favorite trash can icon to your Trash template.
 * 4) To create a trash can, use your right mouse button to drag a Trash folder from your Trash template onto your desktop.
 * 5) Drag objects to the Trash as you see fit.
 * 6) When you want to empty the Trash can, simply delete the folder, then replace it with a new Trash can by pulling one off of your Trash template.
 * 7) The advantage of using the Trash can over the shredder is that you can open your Trash can and observe the contents, and remove what you don't want deleted.

contributed by Chris Corzine

Another trash can tip:
 * 1) Create a subdirectory called :\DESKTOP\TRASH (where is the drive on which OS/2 resides).
 * 2) Create a batch file called EMPTRASH.CMD. It should contain the line
 * DEL :\DESKTOP\TRASH /N
 * 1) Add EMPTRASH.CMD to the menu of your trash folder and call the menu choice "Empty Trash."
 * 2) Your trash folder should now have an Empty Trash choice on its menu.

Selecting objects without mouse
You can select objects in folders or the Deskop without a mouse. Simply type the first letter of the object, and the object will be highlighted. Hit Enter to open the object. If more than one object begins with the same letter, subsequent typing of the same letter will jump between each object that begins with that letter.

Related subject(s):
 * Selecting listbox entries without a mouse

Hiding a folder
You can hide folder icons on the desktop so that others can't see them:
 * 1) Open the Settings notebook of the folder which you wish to hide.
 * 2) Click on the File tab, then click on the right arrow in the lower right corner to turn to the second page of the File tab.
 * 3) Place a check mark next to Hidden under the Flags section. The folder should now be hidden.

To view the folder's icon once again: -Property to be considered = Flags
 * 1) Open the Settings notebook for the Desktop.
 * 2) Click on the Include tab.
 * 3) Click on the right arrow in the lower right corner to turn to the second page of the Include tab.
 * 4) Click on Change. A new dialog box will appear.
 * 5) In the dialog box, choose the following settings:
 * 1) -Comparison type = Not equal -Comparison value = H Click on Change.
 * 2) Close Settings notebook. The icon should now be visible.

Creating a system file editor object
You can create an object which, when opened, will open your system setup files for editing, through the aid of a Work Area folder:


 * 1) Open the Settings notebook for the System Editor.
 * 2) Click on the Association tab.
 * 3) If Plain Text does not appear in the Current Types box, use the Add button to add it from the Available Types box. Close the Settings notebook.
 * 4) Create a new folder.
 * 5) Open the Settings notebook for the new folder.
 * 6) Click on the File tab.
 * 7) Place a check in the box next to Work Area. Close the Settings notebook.
 * 8) Open the Drives object, then open the drive(s) with the CONFIG.SYS, WIN.INI, and SYSTEM.INI files.
 * 9) Open the Settings notebook for the CONFIG.SYS file.
 * 10) Click on Association.
 * 11) If Plain Text does not appear in the Current Types box, use the Add button to add it from the Available Types box. Close the Settings notebook. Repeat for the Settings notebook for the WIN.INI and SYSTEM.INI files.
 * 12) Drag shadows of the CONFIG.SYS, WIN.INI, and SYSTEM.INI files into the new folder.
 * 13) Open the new folder if not already open.
 * 14) Use the right mouse button on the CONFIG.SYS shadow object to popup the menu. Click on the arrow next to Open, choose System Editor. Your CONFIG.SYS should be loaded into the System Editor. Repeat for WIN.INI and SYSTEM.INI.
 * 15) Leaving the three System Editor windows open, close the new folder.
 * 16) You should now have a folder object that will open up your system files automatically when the folder is opened.

Retrieving a "changed" icon
In OS/2 2.1, making changes to an object's settings often causes the object's icon to revert to its default icon. To retrieve your customized icon, this usually works:
 * 1) Open the object's Settings notebook.
 * 2) Choose the General tab.
 * 3) Click on the Undo button.

Note: this behavior is fixed in the 2.11 CSD.

Related subject(s):
 * Managing your icons

Associating data files with programs
Want to be able to double click on a data file object and have it open in its appropriate application? Try setting up associations in your applications:
 * 1) Open the Settings notebook for the application.
 * 2) Choose the Association tab.
 * 3) Under Available Types, see if you can find the file type appropriate for your application. If so, highlight the file type, and press the Add button to the right of the box.
 * 4) If the file type you need doesn't exist under Available Types, and the data files you wish to have associated have a common file extension or name, enter the common part of the filename (with appropriate wildcards) in the New Name box. Click on the Add button to the right of the box.
 * 5) If neither of the above two situations applies, open up the Settings notebook for each data file you wish to associate, and set up the association there.

Note that this does not work for all programs.

Creating new printer objects
To create a new printer object:
 * 1) Open the Templates folder.
 * 2) Drag a new printer object out from the Printer template with the right mouse button.
 * 3) Customize the settings for your printer.

Creating your own templates
You can create your own templates for customized uses. For example, you can create a template of a word processor file with boilerplate text for business letters. The next time you want to write a new business letter, just drag a copy off of your customized template, and the file, complete with your pre-defined settings, will be ready to edit.

To create a customized template:
 * 1) Customize your data file (such as a wordprocessor file) to the way you want it. Save the file.
 * 2) Open the Drives object and find the file you just created.
 * 3) Make a copy of the file object; you can either use Copy from the object's pop-up menu, or hold down the Ctrl key while dragging off a copy with your right mouse button.
 * 4) Open the Settings notebook for the copy you just made.
 * 5) Choose the General tab.
 * 6) Place a check mark next to Template. Close the notebook.
 * 7) When you want to use the new template, just use your right mouse button and drag a copy off of the template.

Related topic(s):
 * Moving a template object without creating a copy

Replacing your Shredder if deleted
Did you somehow manage to shred your Shredder? If so, SHREDDER.CMD can replace it.

CAUTION: This REXX script does not check to see if you already have a Shredder present, and will replace one if it exists.

Related subject(s):
 * Finding settings for original objects
 * OPEN.CMD
 * BITMAP.CMD
 * SETPTR.CMD
 * SETFONT.CMD
 * CHKDRIVE.CMD
 * SHUTDOWN.CMD
 * SLEEP.CMD
 * LARGE.CMD
 * EVAL.CMD
 * BIGDOS.CMD
 * PUTLONG.CMD

Deleting "undeletable" objects
If you find you have an undeletable object, this trick sometimes (but not always) works.


 * 1) Insert a floppy disk in a floppy drive.
 * 2) Open the Drives object.
 * 3) Drag the undeletable object to the floppy drive object. Make sure that you are moving the object (you can ensure this by holding the Shift key while dragging).
 * 4) Format the floppy disk.

Managing your icons
contributed by George Orvis


 * 1) To manage your icons more easily: Place your icons (*.ICO) into a subdirectory (or several subdirectories, if you have a large number of icons).
 * 2) Create an object of that directory
 * 3) Open the Drive object of the drive in which the icon subdirectory is located.
 * 4) Drag a shadow of the icon subdirectory into the desired location.
 * 5) Set view of the folder to Icon View.
 * 6) You now have a handy folder full of icons. If you double click on an icon, it starts the icon editor.
 * 7) To change an object's icon (OS/2 2.1):
 * 8) Open the Settings notebook of the object.
 * 9) Choose the General tab.
 * 10) Drag an icon out of your icon folder with the right mouse button, and drop it onto the icon on the General page of the Settings notebook.

Related subject(s):
 * Retrieving a "changed" icon

Editing object names on the desktop
contributed by Lt. Rob Targosz

You can change the icon text as follows:
 * 1) Select the icon.
 * 2) Press Shift-F9 on your keyboard, or hold the Alt key and click on the icon text with mouse button 1.
 * 3) Type in the new icon text.
 * 4) Click on the screen with your mouse away from the icon.

contributed by Jack Tan

When editing the name of an object on the desktop, use the main keyboard "Enter" key to add a newline to the name. Use the keypad "Enter" key to signal the end of editing.

Note: this may not be supported on all keyboards.

Moving a template object without creating a copy
contributed by Nathan Hamblen

To move a template object without dragging off a copy of the template, hold down the Shift key while dragging the template with mouse button 2.

Related topic(s):
 * Creating your own templates

Changing the long name of a file or folder without changing the real name
contributed by Bill Parrill

The long name, or icon text, of a file or folder can be changed without changing its real name with PUTLONG.CMD, where myfil.ext can either be a filename or the full path to a subdirectory which represents a folder.

Other REXX scripts:
 * OPEN.CMD
 * BITMAP.CMD
 * SETPTR.CMD
 * SETFONT.CMD
 * SHREDDER.CMD
 * CHKDRIVE.CMD
 * SHUTDOWN.CMD
 * SLEEP.CMD
 * LARGE.CMD
 * EVAL.CMD
 * BIGDOS.CMD

Adding INF files to the desktop popup menu


INF files are those that are viewed with OS/2's VIEW.EXE. If an INF file is added to a popup menu via the regular procedure, attempts to open the INF file will result in a "Topic not found" error message. To add an INF file to the desktop's popup menu: :\OS2\VIEW.EXE where is the drive on which OS/2 resides.
 * 1) Create a viewable INF object:
 * 2) Open the Templates folder. Drag a Program template off with mouse button 2. A Settings notebook will open.
 * 3) On the Program page, under Path and file name, type
 * 1) In the Parameters box, enter the path and name of the INF file, then append a percent sign (%) to the end of the file name.
 * 2) Close the Settings notebook for the INF object.
 * 3) Add the INF file to the desktop's popup menu:
 * 4) Open the Settings notebook for the desktop.
 * 5) Click on the Menu tab.
 * 6) With mouse button 2, drag the INF object onto the box under Actions on Menu.
 * 7) Close the Settings notebook for the desktop.
 * 8) You should now have a menu choice for the INF file.

Related subject(s):
 * Adding an "open folder" entry to the desktop's popup menu
 * Adding command sessions to the desktop's popup menu

Recreating a "lost" template
contributed by Jack Tan

To recreate a lost template:
 * 1) Find an object on your system which is of the same type as the one that was lost.
 * 2) Pop up the menu of the object by clicking on the same object once with mouse button 2.
 * 3) Select Create Another from the menu.
 * 4) Open the Settings notebook for the new object.
 * 5) Click on the General tab.
 * 6) Place a check mark next to Template.
 * 7) Close the Settings notebook for the object.
 * 8) You should now have a template object.

Associating icon with executable
contributed by Jack Tan

To associate an icon with an executable:
 * 1) Copy the icon file to the same directory as the executable.
 * 2) Rename the icon file to the same base name as the executable, except with the extension *.ICO.

Shortening Pulldown Menus
contributed by Jack Tan

To shorten the popup/pulldown menus, add: SET MENUSTYLE=SHORT to your CONFIG.SYS. Several menu choices will be removed, including Help, Create another, Create Shadow, Copy, Move, Delete, and Find.

Removing the Drive B Icon from the Drives Object
contributed by Timur Tabi

If you have only one floppy drive, but the Drives object still insists on having a Drive B object, you can remove it as follows:
 * 1) Open the Settings notebook for the Drives object.
 * 2) Choose the Include page.
 * 3) Delete the existing criterion.
 * 4) Add new criteria with the following values:
 * 5) *Attribute = Object Title
 * 6) *Comparison = is equal to
 * 7) *Comparison Value = drive b
 * 8) *Use of criteria = E - exclude
 * 9) Close the Settings notebook.

Creating a Program Object from Executables
contributed by Timur Tabi

Easily create program objects from executable files with PROGRAM.CMD.
 * 1) Create a program object called "Make Object."
 * 2) In the Path and filename box, enter the path and name of PROGRAM.CMD.
 * 3) In the Parameters box, put:
 * %* [What is the name of this object?]
 * 1) Choose the Session page.
 * 2) Check the Start Minimized box.
 * 3) Choose the Associations page.
 * 4) Add associations for files matching the *.EXE, *.CMD, *.BAT and *.COM file extensions.
 * 5) Close the Settings notebook.
 * 6) Each *.EXE, *.CMD, *.BAT and *.COM file should now have a "Make Object" choice on the Open menu. Additionally, the program icon can be dragged and dropped onto the Make Object icon. A program object for the desired program will be created on your desktop.