How to use PuTTY.exe
PuTTY is a program that makes it possible to work on a remote Linux machine from a Windows PC computer.
How to use PuTTY.exe
You need two files, PuTTY.exe and psftp.exe. They can both be found and downloaded from the same site.
What is PuTTY.exe and psftp.exe?
PuTTY.exe is a program that makes Windows users establish a secure connection to Unix (and Linux) terminals, among other things. psftp.exe is a program that makes it possible to copy files from victorio to your local machine and vice versa.
How to get the programs
They are found may places, a.o. at here, earlier also here. Search for "putty download" if the links are broken. Go to the Download page, download both PuTTY.exe and psftp.exe, and put them in a folder where you store your programs. Make an alias somewhere (e.g. on the desktop, or drag them to the taskbar on the bottom of your screen) so that you can find it later.
How to set up PuTTY and connect to victorio
Doubleclick on the PuTTY.exe icon, and get a small box in return. To the right, you are prompted for "Host Name". Write user@victorio.uit.no (where user is your username). Give the connection a name, e.g. "victorio" (in the space one field down). Then, click Terminal to the left, and choose UTF-8 (or, in recent versions: In the leftmost box (Category) of the Putty settings box, under Window choose Translation. The default translation is ISO-8859-1, you should open the list and choose UTF-8. Font size 8 gives you a normal amount on text, and most monitors give you 50 lines of text. After having made these choices, go back to the first (or rightmost) menu, and click on save in the menu to the rignt. Make sure SSH is chosen under "Protocol", and click on "Open" at the bottom of the window.
If everything is ok, you will find a new window in front of you, prompting for your user name. Write it, and then press the ENTER key, and write your password, followed by ENTER. Then you are logged in.
This presupposes that you have a Sámi keyboard on your PC. From 2004 onwards all new Windows XP systems have Sámi keyboards installed, you may find it by right-clicking the keyboard symbol, or via the Control Panel.
NOTE! There is a bug in the present PuTTY version: All Sámi characters work perfectly, except the č character (c-caron), for some strange reason (what you get is plain c), even though č works in other programs. TODO: Report and fix.
After the session, remember logging out by writing logout. Also, remember that you may have several windows open at the same time (just open the second, third etc. in the same way as the first).
How to copy files between victorio and your own machine
On the gyron download page referred to above, doubleclick on the psftp.exe icon. Write "open victorio.uit.no" at the prompt. Give your user name and password. To get files from victorio, you write "get", and to copy files to victorio, you write "put". The syntax is "get sourcefile resultfile" (and the same for put). In order to copy e.g. the file gt/sme/src/noun-sme-lex.txt, write this command:
get gt/sme/src/noun-sme-lex.txt noun.txt
Since it easy to get confused with the get and put commands, I always use another filename for the file I copy to. If you use the same name twice, and copy the wrong direction, then the old file will replace the new one, and your work will be lost.
Note that psftp.exe makes it possible to use standard unix commands. Cf. the psftp.exe help file for a list of commands.
Copy many files at the same time with psftp.exe
The psftp.exe program cannot use the * notation when copying files, one must write the name of each file separately. The way of copying many files in one operation is to use putty.exe to lump them together in one archive file, and then use psftp.exe to move that file to your local machine, and unpack it there. We give two actual examples. The first copies all the html files from the doc catalog, and the other one copies all the txt file from the sme/src catalog. The first step is to open a window with putty.exe, and make two archive files. We assume that you stand in your home directory, and write the following commands, the first to copy the html files, the second to copy the program's source files.
tar cf - gt/doc/*html | gzip > d.tar.gz
tar cf -
gt/sme/src/*txt | gzip > s.tar.gz
The file names d and s are chosen arbitrarily in order to avoid writing long names, the suffixes .tar and .gz indicates the file type (the files are compressed twice, first by tar and then by gzip). If you want to actually see what files you copy, you may write cvf instead of cf after tar, the v instructs the tar command to tell what it does. If you only copy small files, or have a very fast computer, the gzip part is not necessary, then a simpler "tar cf d.tar gt/doc/*html" will do, the gzip part of the command just makes download time 1/3 shorter than tar only).
Then you must copy the files to your local machine. In order to do that, open a window in psftp.exe, and give the following command, just as described before (note that s.tar is so big that it might take some time to download it.):
get d.tar.gz d2.tar.gz
get s.tar.gz s2.tar.gz
The files d2.tar and s2.tar may then be opened on your local Windows machine with the winzip program (doubleclick on the d2.tar and s2.tar files, and Winzip will open. Answer yes to open the .gz file, then select all the files that will appear as a list (ctrl-A) and click on "Extract"), and as a result you have all the documentation files, and all the source text files, on your local Windows PC.
Last modified: $Date: 2008-11-05 18:52:54 +0100 (ons, 05 nov 2008) $, by $Author: boerre $
by Trond Trosterud

