PTC MKS Toolkit Knowledge Base

Product:MKS Toolkit (All)
Keywords:customize, settings, environment
Category:Utilities/Knowledge Base

How can I customize my MKS KornShell and get it to remember the changes?

When you start a login shell, either with sh -L or by using the shortcut installed for the MKS KornShell, two scripts are run in your HOME directory. They are profile.ksh and environ.ksh.

This script is run for every sub-shell of a login shell. Use it to to define functions and alias or for any other settings that aren't inherited by a sub-shell.

This script is not run for each sub-shell. Use it to define things like exported variables which are automatically inherited by a sub-shell.

In MKS Toolkit 5.2 and above there is a command called gset. It is located on the toolbar under Windows 9x and ME and can be used to make customizations to the KornShell. If the options Save Option Settings and Use Saved Options are checked under the Persistence tab, then the settings will be saved to the registry and reloaded the next time you start the shell.

In addition to these, you can use the mks_env built-in command to save and restore your complete MKS KornShell environments. This allows you to set up shortcuts, for example, to your build environment, test environment, etc.. Refer to the mks_env reference page for more information.