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