Added mention of rlogin, and a few words on VT100+ and SCO function
[sgt/putty] / doc / config.but
CommitLineData
e5b0d077 1\C{config} Configuring PuTTY
2
55ba634a 3This chapter describes all the configuration options in PuTTY.
4
5PuTTY is configured using the control panel that comes up before you
6start a session. Some options can also be changed in the middle of a
7session, by selecting \e{Change Settings} from the window menu.
8
9\H{config-session} The Session panel
10
11The Session configuration panel contains the basic options you need
12to specify in order to open a session at all, and also allows you to
13save your settings to be reloaded later.
14
15\S{config-hostname} The host name section
16
17The top box on the Session panel, labelled \q{Specify your
18connection by host name}, contains the details that need to be
19filled in before PuTTY can open a session at all.
20
21\b The \e{Host Name} box is where you type the name, or the IP
22address, of the server you want to connect to.
23
24\b The \e{Protocol} radio buttons let you choose what type of
350ee898 25connection you want to make: a raw connection, a Telnet connection, an
26rlogin connection or an SSH connection. \#{ FIXME: link to sections on
27these? }
55ba634a 28
29\b The \e{Port} box lets you specify which port number on the server
350ee898 30to connect to. If you select Telnet, Rlogin, or SSH, this box will be
31filled in automatically to the usual value, and you will only need to
55ba634a 32change it if you have an unusual server. If you select Raw mode, you
33will almost certainly need to fill in the \e{Port} box.
34
35\S{config-saving} Loading and storing saved sessions
36
37The next part of the Session configuration panel allows you to save
38your preferred PuTTY options so they will appear automatically the
39next time you start PuTTY. It also allows you to create \e{saved
40sessions}, which contain a full set of configuration options plus a
41host name and protocol. A saved session contains all the information
42PuTTY needs to start exactly the session you want.
43
44\b To save your default settings: first set up the settings the way
45you want them saved. Then come back to the Session panel. Select the
46\q{Default Settings} entry in the saved sessions list, with a single
47click. Then press the \e{Save} button.
48
49\b To save a session: first go through the rest of the configuration
50box setting up all the options you want. Then come back to the
51Session panel. Enter a name for the saved session in the \e{Saved
52Sessions} input box. (The server name is often a good choice for a
53saved session name.) Then press the \e{Save} button. Your saved
54session name should now appear in the list box.
55
56\b To reload a saved session: single-click to select the session
57name in the list box, and then press the \e{Load} button. Your saved
58settings should all appear in the configuration panel.
59
60\b To modify a saved session: first load it as described above. Then
61make the changes you want. Come back to the Session panel,
62single-click to select the session name in the list box, and press
63the \e{Save} button. The new settings will be saved over the top of
64the old ones.
65
66\b To start a saved session immediately: double-click on the session
67name in the list box.
68
69\b To delete a saved session: single-click to select the session
70name in the list box, and then press the \e{Delete} button.
71
72Each saved session is independent of the Default Settings
73configuration. If you change your preferences and update Default
74Settings, you must also update every saved session separately.
75
76\S{config-closeonexit} \q{Close Window on Exit}
77
78Finally in the Session panel, there is a check box labelled \q{Close
79Window on Exit}. If this is turned on, the PuTTY session window will
80disappear as soon as the session inside it terminates. Otherwise,
81the window will remain on the desktop until you close it yourself,
82so you can still read and copy text out of it.
83
84\H{config-terminal} The Terminal panel
85
86The Terminal configuration panel allows you to control the behaviour
87of PuTTY's terminal emulation.
88
89\S{config-autowrap} \q{Auto wrap mode initially on}
90
91Auto wrap mode controls what happens when text printed in a PuTTY
92window reaches the right-hand edge of the window.
93
94With auto wrap mode on, if a long line of text reaches the
95right-hand edge, it will wrap over on to the next line so you can
96still see all the text. With auto wrap mode off, the cursor will
97stay at the right-hand edge of the screen, and all the characters in
98the line will be printed on top of each other.
99
100If you are running a full-screen application and you occasionally
101find the screen scrolling up when it looks as if it shouldn't, you
102could try turning this option off.
103
104Auto wrap mode can be turned on and off by control sequences sent by
105the server. This configuration option only controls the \e{default}
106state. If you modify this option in mid-session using \e{Change
107Settings}, you will need to reset the terminal \#{ FIXME } before
108the change takes effect.
109
110\S{config-decom} \q{DEC Origin Mode initially on}
111
112DEC Origin Mode is a minor option which controls how PuTTY
113interprets cursor-position control sequences sent by the server.
114
115The server can send a control sequence that restricts the scrolling
116region of the display. For example, in an editor, the server might
117reserve a line at the top of the screen and a line at the bottom,
118and might send a control sequence that causes scrolling operations
119to affect only the remaining lines.
120
121With DEC Origin Mode on, cursor coordinates are counted from the top
122of the scrolling region. With it turned off, cursor coordinates are
123counted from the top of the whole screen regardless of the scrolling
124region.
125
126It is unlikely you would need to change this option, but if you find
127a full-screen application is displaying pieces of text in what looks
128like the wrong part of the screen, you could try turning DEC Origin
129Mode on to see whether that helps.
130
131DEC Origin Mode can be turned on and off by control sequences sent by
132the server. This configuration option only controls the \e{default}
133state. If you modify this option in mid-session using \e{Change
134Settings}, you will need to reset the terminal \#{ FIXME } before
135the change takes effect.
136
137\S{config-crlf} \q{Implicit CR in every LF}
138
139Most servers send two control characters, CR and LF, to start a new
140line of the screen. The CR character makes the cursor return to the
141left-hand side of the screen. The LF character makes the cursor move
142one line down (and might make the screen scroll).
143
144Some servers only send LF, and expect the terminal to move the
145cursor over to the left automatically. If you come across a server
146that does this, you will see a stepped effect on the screen, like
147this:
148
149\c First line of text
150\c Second line
151\c Third line
152
153If this happens to you, try enabling the \q{Implicit CR in every LF}
154option, and things might go back to normal:
155
156\c First line of text
157\c Second line
158\c Third line
159
160\S{config-beep} \q{Beep enabled}
161
162This option lets you turn off beeps in PuTTY. If your server is
163beeping too much or attracting unwelcome attention, you can turn the
164beeps off.
165
166\S{config-erase} \q{Use background colour to erase screen}
167
168Not all terminals agree on what colour to turn the screen when the
169server sends a \q{clear screen} sequence. Some terminals believe the
170screen should always be cleared to the \e{default} background
171colour. Others believe the screen should be cleared to whatever the
172server has selected as a background colour.
173
174There exist applications that expect both kinds of behaviour.
175Therefore, PuTTY can be configured to do either.
176
177With this option disabled, screen clearing is always done in the
178default background colour. With this option enabled, it is done in
179the \e{current} background colour.
180
181\S{config-blink} \q{Enable blinking text}
182
183The server can ask PuTTY to display text that blinks on and off.
184This is very distracting, so PuTTY allows you to turn blinking text
185off completely.
186
187\S{config-localterm} \q{Use local terminal line discipline}
188
189Normally, every character you type into the PuTTY window is sent
190straight to the server.
191
192If you enable local terminal line discipline, this changes. PuTTY
193will let you edit a whole line at a time locally, and the line will
194only be sent to the server when you press Return. If you make a
195mistake, you can use the Backspace key to correct it before you
196press Return, and the server will never see the mistake.
197
198Since it would be hard to edit a line locally without being able to
199see it, local terminal line discipline also makes PuTTY echo what
200you type. This makes it ideal for use in raw mode \#{ FIXME } or
201when connecting to MUDs or talkers.
202
203\S{config-logging} Controlling session logging
204
205PuTTY has the ability to log the output from your session into a
206file. You might want this if you were saving a particular piece of
207output to mail to somebody, for example in a bug report.
208
209You can choose between:
210
211\b not logging anything (the default)
212
213\b logging only the printable characters in a session (ignoring
214control sequences to change colours or clear the screen)
215
216\b logging everything sent to the terminal by the server.
217
218You can turn logging on and off in mid-session using \e{Change
219Settings}.
220
221\H{config-keyboard} The Keyboard panel
222
1630bb61 223The Keyboard configuration panel allows you to control the behaviour
224of the keyboard in PuTTY.
225
55ba634a 226\S{config-backspace} Changing the action of the Backspace key
227
1630bb61 228Some terminals believe that the Backspace key should send the same
229thing to the server as Control-H (ASCII code 8). Other terminals
230believe that the Backspace key should send ASCII code 127 (usually
231known as Control-?) so that it can be distinguished from Control-H.
232This option allows you to choose which code PuTTY generates when you
233press Backspace.
234
235If you are connecting to a Unix system, you will probably find that
236the Unix \c{stty} command lets you configure which the server
237expects to see, so you might not need to change which one PuTTY
238generates. On other systems, the server's expectation might be fixed
239and you might have no choice but to configure PuTTY.
240
241If you do have the choice, we recommend configuring PuTTY to
242generate Control-? and configuring the server to expect it, because
243that allows applications such as \c{emacs} to use Control-H for
244help.
245
55ba634a 246\S{config-homeend} Changing the action of the Home and End keys
247
1630bb61 248The Unix terminal emulator \c{rxvt} disagrees with the rest of the
249world about what character sequences should be sent to the server by
250the Home and End keys.
251
252\c{xterm}, and other terminals, send \c{ESC [1~} for the Home key,
253and \c{ESC [4~} for the End key. \c{rxvt} sends \c{ESC [H} for the
254Home key and \c{ESC [Ow} for the End key.
255
256If you find an application on which the Home and End keys aren't
257working, you could try switching this option to see if it helps.
258
55ba634a 259\S{config-funkeys} Changing the action of the function keys and keypad
260
1630bb61 261This option affects the function keys (F1 to F12) and the top row of
262the numeric keypad.
263
264\b In the default mode, labelled \c{ESC [n~}, the function keys
265generate sequences like \c{ESC [11~}, \c{ESC [12~} and so on. This
266matches the general behaviour of Digital's terminals.
267
268\b In Linux mode, F6 to F12 behave just like the default mode, but
269F1 to F5 generate \c{ESC [[A} through to \c{ESC [[E}. This mimics the
270Linux virtual console.
271
272\b In Xterm R6 mode, F5 to F12 behave like the default mode, but F1
273to F4 generate \c{ESC OP} through to \c{ESC OS}, which are the
274sequences produced by the top row of the \e{keypad} on Digital's
275terminals.
276
277\b In VT400 mode, all the function keys behave like the default
278mode, but the actual top row of the numeric keypad generates \c{ESC
279OP} through to \c{ESC OS}.
280
350ee898 281\b In VT100+ mode, the function keys generate \c{ESC OP} through to
282\c{ESC O[}
283
284\b In SCO mode, the function keys F1 to F12 generate \c{ESC [M}
285through to \c{ESC [X}. Together with shift, they generate \c{ESC [Y}
286through to \c{ESC [j}. With control they generate \c{ESC [k} through
287to \c{ESC [v}, and with shift and control together they generate
288\c{ESC [w} through to \c{ESC [\{}.
289
1630bb61 290If you don't know what any of this means, you probably don't need to
291fiddle with it.
292
55ba634a 293\S{config-appcursor} Controlling Application Cursor Keys mode
294
1630bb61 295Application Cursor Keys mode is a way for the server to change the
296control sequences sent by the arrow keys. In normal mode, the arrow
297keys send \c{ESC [A} through to \c{ESC [D}. In application mode,
298they send \c{ESC OA} through to \c{ESC OD}.
299
300Application Cursor Keys mode can be turned on and off by the server,
301depending on the application. PuTTY allows you to configure the
302initial state, and also allows you to disable application mode
303completely.
304
55ba634a 305\S{config-appkeypad} Controlling Application Keypad mode
306
1630bb61 307Application Keypad mode is a way for the server to change the
308behaviour of the numeric keypad.
309
310In normal mode, the keypad behaves like a normal Windows keypad:
311with NumLock on, the number keys generate numbers, and with NumLock
312off they act like the arrow keys and Home, End etc.
313
314In application mode, all the keypad keys send special control
315sequences, \e{including} Num Lock. Num Lock stops behaving like Num
316Lock and becomes another function key.
317
318Depending on which version of Windows you run, you may find the Num
319Lock light still flashes on and off every time you press Num Lock,
320even when application mode is active and Num Lock is acting like a
321function key. This is unavoidable.
322
323Application keypad mode can be turned on and off by the server,
324depending on the application. PuTTY allows you to configure the
325initial state, and also allows you to disable application mode
326completely.
327
55ba634a 328\S{config-nethack} Using NetHack keypad mode
329
1630bb61 330PuTTY has a special mode for playing NetHack. You can enable it by
331selecting \q{NetHack} in the \q{Initial state of numeric keypad}
332control.
333
334In this mode, the numeric keypad keys 1-9 generate the NetHack
335movement commands (\cw{hjklyubn}). The 5 key generates the \c{.}
336command (do nothing).
337
338Better still, pressing Shift with the keypad keys generates the
339capital forms of the commands (\cw{HJKLYUBN}), which tells NetHack
340to keep moving you in the same direction until you encounter
341something interesting.
342
343For some reason, this feature only works properly when Num Lock is
344on. We don't know why.
345
55ba634a 346\S{config-compose} Enabling a DEC-like Compose key
347
1630bb61 348DEC terminals have a Compose key, which provides an easy-to-remember
349way of typing accented characters. You press Compose and then type
350two more characters. The two characters are \q{combined} to produce
351an accented character. The choices of character are designed to be
352easy to remember; for example, composing \q{e} and \q{`} produces
353the \q{\u00e8{e-grave}} character.
354
355If you enable the \q{Application and AltGr act as Compose key}
356option, the Windows Application key and the AltGr key will both have
357this behaviour.
358
55ba634a 359\H{config-window} The Window panel
360
1630bb61 361The Window configuration panel allows you to control aspects of the
362PuTTY window and its behaviour.
363
55ba634a 364\S{config-winsize} Setting the size of the PuTTY window
365
1630bb61 366The \e{Rows} and \e{Columns} boxes let you set the PuTTY window to a
367precise size. Of course you can also drag the window to a new size
368while a session is running.
369
370If you are running an application which is unable to deal with
371changes in window size, you might want to enable the \q{Lock window
372size against resizing} option, which prevents the user from
373accidentally changing the size of the window.
374
55ba634a 375\S{config-scrollback} Controlling scrollback
376
1630bb61 377Text that scrolls off the top of the PuTTY terminal window is kept
378for reference. The scrollbar on the right of the window lets you
379view the scrolled-off text. You can also page through the scrollback
380using the keyboard, by pressing Shift-PgUp and Shift-PgDn.
381
382The \q{Lines of scrollback} box lets you configure how many lines of
383text PuTTY keeps. The \q{Display scrollbar} option allows you to
384hide the scrollbar (although you can still view the scrollback using
385Shift-PgUp and Shift-PgDn).
386
387If you are viewing part of the scrollback when the server sends more
388text to PuTTY, the screen will revert to showing the current
389terminal contents. You can disable this behaviour by turning off
390\q{Reset scrollback on display activity}. You can also make the
391screen revert when you press a key, by turning on \q{Reset
392scrollback on keypress}.
393
55ba634a 394\S{config-warnonclose} \q{Warn before closing window}
395
1630bb61 396If you press the Close button in a PuTTY window that contains a
397running session, PuTTY will put up a warning window asking if you
398really meant to close the window. A window whose session has already
399terminated can always be closed without a warning.
400
401If you want to be able to close a window quickly, you can disable
402the \q{Warn before closing window} option.
403
55ba634a 404\S{config-altf4} \q{Window closes on ALT-F4}
405
1630bb61 406By default, pressing ALT-F4 causes the window to close (or a warning
407box to appear; see \k{config-warnonclose}). If you disable the
408\q{Window closes on ALT-F4} option, then pressing ALT-F4 will simply
409send a key sequence to the server.
410
55ba634a 411\S{config-altspace} \q{System menu appears on ALT-Space}
412
1630bb61 413If this option is enabled, then pressing ALT-Space will bring up the
414PuTTY window's menu, like clicking on the top left corner. If it is
415disabled, then pressing ALT-Space will just send \c{ESC SPACE} to
416the server.
417
55ba634a 418\S{config-altonly} \q{System menu appears on Alt alone}
419
1630bb61 420If this option is enabled, then pressing and releasing ALT will
421bring up the PuTTY window's menu, like clicking on the top left
422corner. If it is disabled, then pressing and releasing ALT will have
423no effect.
424
55ba634a 425\S{config-alwaysontop} \q{Ensure window is always on top}
426
1630bb61 427If this option is enabled, the PuTTY window will stay on top of all
428other windows.
429
55ba634a 430\H{config-appearance} The Appearance panel
431
1630bb61 432The Appearance configuration panel allows you to control aspects of
433PuTTY's appearance.
434
55ba634a 435\S{config-cursor} Controlling the appearance of the cursor
436
26c8f51a 437The \q{Cursor appearance} option lets you configure the cursor to be
438a block, an underline, or a vertical line. A block cursor becomes an
439empty box when the window loses focus; an underline or a vertical
440line becomes dotted.
441
442The \q{Cursor blinks} option makes the cursor blink on and off. This
443works in any of the cursor modes.
55ba634a 444
445\S{config-font} Controlling the font used in the terminal window
446
26c8f51a 447
448
55ba634a 449\S{config-title} Controlling the window title
450
451\H{config-translation} The Translation panel
452
1630bb61 453The Translation configuration panel allows you to control the
454translation between the character set understood by the server and
455the character set understood by PuTTY.
456
55ba634a 457\S{config-linedraw} Line drawing characters
458
459\S{config-outputtrans} Character set translation of output data
460
461\S{config-inputtrans} Character set translation of input data
462
463\H{config-selection} The Selection panel
464
1630bb61 465The Selection panel allows you to control the way copy and paste
466work in the PuTTY window.
467
55ba634a 468\S{config-mouse} Changing the actions of the mouse buttons
469
470\S{config-charclasses} Configuring word-by-word selection
471
472\H{config-colours} The Colours panel
473
1630bb61 474The Colours panel allows you to control PuTTY's use of colour.
475
55ba634a 476\S{config-boldcolour} \q{Bolded text is a different colour}
477
478\S{config-logpalette} \q{Attempt to use logical palettes}
479
480\S{config-colourcfg} Adjusting the colours in the terminal window
481
482\H{config-connection} The Connection panel
483
1630bb61 484The Connection panel allows you to configure options that apply to
485more than one type of connection.
486
55ba634a 487\S{config-termtype} \q{Terminal-type string}
488
489\S{config-username} \q{Auto-login username}
490
491\S{config-keepalive} Using keepalives to prevent disconnection
492
493\H{config-telnet} The Telnet panel
494
1630bb61 495The Telnet panel allows you to configure options that only apply to
496Telnet sessions.
497
55ba634a 498\S{config-termspeed} \q{Terminal-speed string}
499
500\S{config-environ} Setting environment variables on the server
501
502\S{config-oldenviron} \q{Handling of OLD_ENVIRON ambiguity}
503
504\H{config-ssh} The SSH panel
505
1630bb61 506The SSH panel allows you to configure options that only apply to
507SSH sessions.
508
55ba634a 509\S{config-command} Executing a specific command on the server
510
511\S{config-auth} SSH authentication options
512
513\S{config-protocol} SSH protocol options
37c6fce1 514
515\H{config-file} Storing configuration in a file
516
517PuTTY does not currently support storing its configuration in a file
518instead of the Registry. However, you can work around this with a
519couple of batch files.
520
521You will need a file called (say) \c{PUTTY.BAT} which imports the
522contents of a file into the Registry, then runs PuTTY, exports the
523contents of the Registry back into the file, and deletes the
524Registry entries. This can all be done using the Regedit command
525line options, so it's all automatic. Here is what you need in
526\c{PUTTY.BAT}:
527
528\c @ECHO OFF
529\c regedit /s putty.reg
530\c regedit /s puttyrnd.reg
531\c start /w putty.exe
532\c regedit /e puttynew.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY
533\c copy puttynew.reg putty.reg
534\c del puttynew.reg
535\c regedit /s puttydel.reg
536
537This batch file needs two auxiliary files: \c{PUTTYRND.REG} which
538sets up an initial safe location for the \c{PUTTY.RND} random seed
539file, and \c{PUTTYDEL.REG} which destroys everything in the Registry
540once it's been successfully saved back to the file.
541
542Here is \c{PUTTYDEL.REG}:
543
544\c REGEDIT4
545\c
546\c [-HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
547
548Here is an example \c{PUTTYRND.REG} file:
549
550\c REGEDIT4
551\c
552\c [HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]
553\c "RandSeedFile"="a:\putty.rnd"
554
555You should replace \c{a:\\putty.rnd} with the location where you
556want to store your random number data. If the aim is to carry around
557PuTTY and its settings on one floppy, you probably want to store it
558on the floppy.