4.1.2 Loading and storing saved sessions
The next part of the Session configuration panel allows you to save your preferred PuTTY options so they will appear automatically the next time you start PuTTY. It also allows you to create saved sessions, which contain a full set of configuration options plus a host name and protocol. A saved session contains all the information PuTTY needs to start exactly the session you want.
•To save your default settings: first set up the settings the way you want them saved. Then come back to the Session panel. Select the ‘Default Settings’ entry in the saved sessions list, with a single click. Then press the ‘Save’ button.
If there is a specific host you want to store the details of how to connect to, you should create a saved session, which will be separate from the Default Settings.
•To save a session: first go through the rest of the configuration box setting up all the options you want. Then come back to the Session panel. Enter a name for the saved session in the ‘Saved Sessions’ input box. (The server name is often a good choice for a saved session name.) Then press the ‘Save’ button. Your saved session name should now appear in the list box.
You can also save settings in mid-session, from the ‘Change Settings’ dialog. Settings changed since the start of the session will be saved with their current values; as well as settings changed through the dialog, this includes changes in window size, window title changes sent by the server, and so on.
•To reload a saved session: single-click to select the session name in the list box, and then press the ‘Load’ button. Your saved settings should all appear in the configuration panel.
•To modify a saved session: first load it as described above. Then make the changes you want. Come back to the Session panel, and press the ‘Save’ button. The new settings will be saved over the top of the old ones.
To save the new settings under a different name, you can enter the new name in the ‘Saved Sessions’ box, or single-click to select a session name in the list box to overwrite that session. To save ‘Default Settings’, you must single-click the name before saving.
•To start a saved session immediately: double-click on the session name in the list box.
•To delete a saved session: single-click to select the session name in the list box, and then press the ‘Delete’ button.
Each saved session is independent of the Default Settings configuration. If you change your preferences and update Default Settings, you must also update every saved session separately.
Saved sessions are stored in the Registry, at the location
HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
If you need to store them in a file, you could try the method described in
section 4.28
.
4.1.3 ‘Close Window on Exit’
Finally in the Session panel, there is an option labelled ‘Close Window on Exit’. This controls whether the PuTTY terminal window disappears as soon as the session inside it terminates. If you are likely to want to copy and paste text out of the session after it has terminated, or restart the session, you should arrange for this option to be off.
‘Close Window On Exit’ has three settings. ‘Always’ means always close the window on exit; ‘Never’ means never close on exit (always leave the window open, but inactive). The third setting, and the default one, is ‘Only on clean exit’. In this mode, a session which terminates normally will cause its window to close, but one which is aborted unexpectedly by network trouble or a confusing message from the server will leave the window up.
4.2 The Logging panel
The Logging configuration panel allows you to save log files of your PuTTY sessions, for debugging, analysis or future reference.
The main option is a radio-button set that specifies whether PuTTY will log anything at all. The options are:
•‘None’. This is the default option; in this mode PuTTY will not create a log file at all.