Using Linux over Telnet

Revised January 16, 2001. Press your browser's Reload or Refresh button to get the latest version.


Telnet

The telnet program enables you to use almost any Internet-connected computer to use a (suitably configured) remote system that is also connected to the Internet. For example, you can run telnet on your home computer (running Windows perhaps) and work on the Evergreen lab computers running Linux, almost as if you were sitting right there in the ACC lab. Each telnet session provides you with a text-only terminal window. This enables you to use a Linux shell and a text editor such as emacs or vi. However, you cannot use a graphical desktop such as KDE or Gnome over telnet.

Start telnet, connect, and log in

Here are the instructions for using telnet to connect to the Evergreen Linux systems from a computer running Windows:

  1. Connect to your Internet Service Provider. (If you have an "always on" DSL or cable modem connection this step may not be necessary.)
  2. Run telnet from the Windows Start menu: Click Start, Click Run, in the dialog box type telnet, Click OK The telnet window appears.
  3. In the telnet window, select the Terminal window, select Preferences. Make sure VT-100/ANSI is checked (not VT52). On my system the arrow keys work if VT100 Arrows is not checked. You may wish to select a font etc. I like Font: FixedSys, Font Style: Regular, Size: 14, black letters on white bckground
  4. In the telnet window, select the Connect menu. Select Remote System. In the dialog box, type grace.evergreen.edu to connect to the Evergreen Linux systems, click on Connect.
  5. You should see some messages, then the login: prompt.
  6. Type your username and password at the prompts. Use the same username and password that you use in the ACC lab. After you successfully log in, you should see a Unix shell prompt.
  7. Now you can type any Unix shell command. Try pwd and ls first, to get oriented.
  8. When you are done, type logout at the shell prompt.
  9. To exit telnet, select the Connect menu, then Exit.

Alternatively, you may be able to connect using the browser (Internet Explorer, Netscape, or ...) by typing in the URL telnet:/grace.evergreen.edu/. If you use the DOS command prompt, you can just type telnet or telnet grace.evergreen.edu

You may run several telnet sessions to obtain several terminal windows on the remote system. Many telnet users like to have one window for the shell and another for the editor.

Configure your telnet session

Some Linux commands and programs will not work properly over some telnet sessions unless you tweak the configuration. The easiest way to do this is to execute commands in a shell script. I have placed the commands in the script in ~jackyj/.bashrc.telnet Copy this script into your login directory. Then, type this command right after you log in using telnet (but not when you log in at the ACC lab using the Linux login screen):


   source .bashrc.telnet

These are the commands in .bashrc.telnet at this writing:


   export TERM=vt100

   alias emacs='emacs -nw -l ~/.emacs.telnet' 

You should not put these commands in your .bashrc because they should not be in effect when you work in the ACC lab. (If you really understand .bash_profile and .bashrc you can tinker with both so you don't need to type the source command when you log in using telnet -- but don't try that until you're an expert).

Edit using emacs

Emacs will not work properly over some telnet sessions unless you tweak the configuration. The easiest way to do this is to place the configuration commands in an emacs startup script. I have placed them in ~jackyj/.emacs.telnet Copy this script into your login directory. Then, to start emacs, just type emacs. The alias defined in .bashrc.telnet should load the script.

Emacs behaves a bit differently over a telnet session. The main difference is that C-h does not invoke help, it now invokes backspace (just like the backspace key). To get emacs help over a telnet session, use M-? instead. If that doesn't work, use M-x help.

Other emacs commands that may present problems over telnet are C-SPC (set mark) and C-s (search forward). If these don't work, you can use M-x set-mark-command and M-x search-forward.

These are the commands in .emacs.telnet at this writing:


   (global-set-key "\C-h" 'backward-delete-char) ; backspace not help

   (global-set-key "\M-?" 'help-command) ; this is help instead

   (menu-bar-mode nil) ; menu bar is useless over telnet

You should not put these commands in your .emacs because they should not be in effect when you work in the ACC lab.

FTP

If you prefer not to edit over telnet, there is an alternative. You can edit text files on your own computer (using a text editor such as Notepad, not a word processor such as Word or Wordpad), then copy the files to Evergreen using ftp (file transfer program).

The easiest way to use ftp from a Windows system is to bring up a DOS command prompt (Start->Run, type Command), then type ftp grace.evergreen.edu. Here is a sample session:


   C:\fofc> ftp grace.evergreen.edu

   Connected to grace.evergreen.edu. 

   220 grace.evergreen.edu FTP server (Version wu-2.4.2-VR17(1) Mon Apr 19 09:21:53 EDT 1999) ready.

   Name (grace.evergreen.edu:jon): jackyj

   331 Password required for jackyj. Password: 

   230 User jackyj logged in. 

   Remote system type is UNIX. Using binary mode to transfer files. 

   ftp> ascii 

   200 Type set to A.

   ftp> put telnet.html

   local: telnet.html remote: telnet.html

   200 PORT command successful.

   150 Opening ASCII mode data connection for telnet.html.

   226 Transfer complete.

   5784 bytes sent in 0.00218 secs (2.6e+03 Kbytes/sec)

   ftp> quit                                                


Jon Jacky, jackyj@evergreen.edu