Add a new chapter full of intermediate-useful-things, somewhere
[sgt/putty] / doc / using.but
CommitLineData
fc5a8711 1\versionid $Id: using.but,v 1.1 2001/11/25 18:59:12 simon Exp $
2
3\C{using} Using PuTTY
4
5This chapter provides a general introduction to some more advanced
6features of PuTTY. For extreme detail and reference purposes,
7\k{config} is likely to contain more information.
8
9\H{using-session} During your session
10
11A lot of PuTTY's complexity and features are in the configuration
12panel. Once you have worked your way through that and started
13a session, things should be reasonably simple after that.
14Nevertheless, there are a few more useful features available.
15
16\S{using-selection} Copying and pasting text
17
18Often in a PuTTY session you will find text on your terminal screen
19which you want to type in again. Like most other terminal emulators,
20PuTTY allows you to copy and paste the text rather than having to
21type it again. Also, copy and paste uses the Windows clipboard, so
22that you can paste (for example) URLs into a web browser, or paste
23from a word processor or spreadsheet into your terminal session.
24
25PuTTY's copy and paste works entirely with the mouse. In order to
26copy text to the clipboard, you just click the left mouse button in
27the terminal window, and drag to select text. When you let go of the
28button, the text is \e{automatically} copied to the clipboard. You
29do not need to press Ctrl-C or Ctrl-Ins; in fact, if you do press
30Ctrl-C, PuTTY will send a Ctrl-C character down your session to the
31server where it will probably cause a process to be interrupted.
32
33Pasting is done using the right button (or the middle mouse button,
34if you have a three-button mouse and have set it up; see
35\k{config-mouse}). When you click the right mouse button, PuTTY will
36read whatever is in the Windows Clipboard and paste it into your
37session, \e{exactly} as if it had been typed at the keyboard.
38(Therefore, be careful of pasting formatted text into an editor that
39does automatic indenting; you may find that the spaces pasted from
40the clipboard plus the spaces added by the editor add up to too many
41spaces and ruin the formatting. There is nothing PuTTY can do about
42this.)
43
44If you double-click the left mouse button, PuTTY will select a whole
45word. If you double-click, hold down the second click, and drag the
46mouse, PuTTY will select a sequence of whole words. If you
47\e{triple}-click, or triple-click and drag, then PuTTY will select a
48whole line or sequence of lines.
49
50If you want to select a rectangular region instead of selecting to
51the end of each line, you can do this by holding down Alt when you
52make your selection. (You can also configure rectangular selection
53to be the default, and then holding down Alt gives the normal
54behaviour instead. See \#{FIXME} for details.)
55
56If you have a middle mouse button, then you can use it to adjust an
57existing selection if you selected something slightly wrong. (If you
58have configured the middle mouse button to paste, then the right
59mouse button does this instead.) Click the button on the screen, and
60you can pick up the nearest end of the selection and drag it to
61somewhere else.
62
63\S{using-scrollback} Scrolling the screen back
64
65PuTTY keeps track of text that has scrolled up off the top of the
66terminal. So if something appears on the screen that you want to
67read, but it scrolls too fast and it's gone by the time you try to
68look for it, you can use the scrollbar on the right side of the
69window to look back up the session history and find it again.
70
71As well as using the scrollbar, you can also page the scrollback up
72and down by pressing Shift-PgUp and Shift-PgDn. These are still
73available if you configure the scrollbar to be invisible.
74
75By default the last 200 lines scrolled off the top are
76preserved for you to look at. You can increase (or decrease) this
77value using the configuration box; see \k{config-scrollback}.
78
79\S{using-sysmenu} The System menu
80
81If you click the left mouse button on the icon in the top left
82corner of PuTTY's window, or click the right mouse button on the
83title bar, you will see the standard Windows system menu containing
84items like Minimise, Move, Size and Close.
85
86PuTTY's system menu contains extra program features in addition to
87the Windows standard options. These extra menu commands are
88described below.
89
90\S2{using-eventlog} The PuTTY Event Log
91
92If you choose \q{Event Log} from the system menu, a small window
93will pop up in which PuTTY logs significant events during the
94connection. Most of the events in the log will probably take place
95during session startup, but a few can occur at any point in the
96session, and one or two occur right at the end.
97
98You can use the mouse to select one or more lines of the Event Log,
99and hit the Copy button to copy them to the clipboard. If you are
100reporting a bug, it's often useful to paste the contents of the
101Event Log into your bug report.
102
103\S2{using-newsession} Starting new sessions
104
105PuTTY's system menu provides some shortcut ways to start new
106sessions:
107
108\b Selecting \q{New Session} will start a completely new instance of
109PuTTY, and bring up the configuration box as normal.
110
111\b Selecting \q{Duplicate Session} will start a session with
112precisely the same options as your current one - connecting to the
113same host using the same protocol, with all the same terminal
114settings and everything.
115
116\b The \q{Saved Sessions} submenu gives you quick access to any
117sets of stored session details you have previously saved. See
118\k{config-saving} for details of how to create saved sessions.
119
120\S2{using-changesettings} Changing your session settings
121
122If you select \q{Change Settings} from the system menu, PuTTY will
123display a cut-down version of its initial configuration box. This
124allows you to adjust most properties of your current session. You
125can change the terminal size, the font, the actions of various
126keypresses, the colours, and so on.
127
128Some of the options that are available in the main configuration box
129are not shown in the cut-down Change Settings box. These are usually
130options which don't make sense to change in the middle of a session
131(for example, you can't switch from SSH to Telnet in mid-session).
132
133\S2{using-copyall} Copy All to Clipboard
134
135This system menu option provides a convenient way to copy the whole
136contents of the terminal screen and scrollback to the clipboard in
137one go.
138
139\S2{reset-terminal} Clearing and resetting the terminal
140
141The \q{Clear Scrollback} option on the system menu tells PuTTY to
142discard all the lines of text that have been kept after they
143scrolled off the top of the screen. This might be useful, for
144example, if you displayed sensitive information and wanted to make
145sure nobody could look over your shoulder and see it. (Note that
146this only prevents a casual user from using the scrollbar to view
147the information; the text is not guaranteed not to still be in
148PuTTY's memory.)
149
150The \q{Reset Terminal} option causes a full reset of the terminal
151emulation. A VT-series terminal is a complex piece of software and
152can easily get into a state where all the text printed becomes
153unreadable. (This can happen, for example, if you accidentally
154output a binary file to your terminal.) If this happens, selecting
155Reset Terminal should sort it out.
156
157\S2{using-fullscreen} Full screen mode
158
159If you find the title bar on a maximised window to be ugly or
160distracting, you can select Full Screen mode to maximise PuTTY
161\q{even more}. When you select this, PuTTY will expand to fill the
162whole screen and its borders, title bar and scrollbar will
163disappear. (You can configure the scrollbar not to disappear in
164full-screen mode if you want to keep it.)
165\#{FIXME, document how and xref to it from here!}
166
167When you are in full-screen mode, you can still access the system
168menu if you click the left mouse button in the \e{extreme} top left
169corner of the screen.
170
171\H{using-logging} Creating a log file of your session
172
173For some purposes you may find you want to log everything that
174appears on your screen. You can do this using the \q{Logging} panel
175in the configuration box.
176
177To begin a session log, select \q{Change Settings} from the system
178menu and go to the Logging panel. Enter a log file name, and select
179a logging mode. (You can log all session output including the
180terminal control sequences, or you can just log the printable text.
181It depends what you want the log for.) Click \q{Apply} and your log
182will be started. Later on, you can go back to the Logging panel and
183select \q{Logging turned off completely} to stop logging; then PuTTY
184will close the log file and you can safely read it.
185
186See \k{config-logging} for more details and options.
187
188\H{using-translation} Altering your character set configuration
189
190If you find that special characters (accented characters, for
191example) are not being displayed correctly in your PuTTY session, it
192may be that PuTTY is interpreting the characters sent by the server
193according to the wrong \e{character set}. There are a lot of
194different character sets available, so it's entirely possible for
195this to happen.
196
197If you click \q{Change Settings} and look at the \q{Translation}
198panel, you should see a large number of character sets which you can
199select. Now all you need is to find out which of them you want!
200
201\H{using-forwarding} Port forwarding and X forwarding in SSH
202
203\# using X forwarding
204
205\# using port forwarding
206
207\H{using-rawprot} Making raw TCP connections
208
209\# Raw protocol