Popular X Window Programs

Help Center Introduction to Unix Popular X Window Programs

Xterm

Xterm is a terminal program similar to the SSH programs provided by the UW in the UWICK Kit. However, xterm is not just a text terminal, but a graphical terminal. For example, if you have defined colors for your Unix profile, they will show up in your xterm, unlike strict text terminals like SSH Telnet. Also, conceptually, since this is a X-Window program, it is running on the host server, not on your local computer.

XTerm Window

Emacs

To quote the Emacs Manual:
"Emacs is the extensible, customizable, self-documenting real-time display editor."

One way to describe Emacs is that Emacs is a highly customizable text editor that uses a dialect of Lisp called Emacs Lisp (or Elisp) as an extension language. However, I prefer to describe Emacs as a work environment written in a dialect of Lisp. Naturally, Emacs has the features you would expect in a programmer's text editor: syntax-based indentation, syntax highlighting, parens/braces matching, quick navigation among functions in a file, etc. But you can also tell Emacs to run your compiler for you, parse the compiler's error messages, and take you to the file and line the error occurred on. Or you can run your debugger from within Emacs, and have Emacs display the currently executing portion of your code. Or you can use Emacs to manage files, both on the machine you are currently logged in to and on remote machines. You can also use Emacs to run your shell, read mail and news, and even browse the Web. Granted, you may want to use Emacs just as text editor, and choose to never explore its other capabilities. But even if you only use Emacs as a text editor, it helps to have some appreciation of the facilities available to you, and more importantly, of the design that makes it possible for Emacs to provide all those foptions. Emacs, a powerful editor through a terminal, becomes the ultimate editor for programming of any kind when used in a X Window on a Unix box.


Emacs Splash Screen

Emacs and C code

Below is a picture of Emacs being used to edit C code (click on the image to see a larger version). Notice the text highlighting; you can edit your .emacs file to use different text colors for most text properties you could imagine, including: variables, constants, # statements, function names, and comments.

C Code in Emacs
Click on image for larger version

Emacs and HTML

Below is an image of Emacs being used to create HTML documents for the internet. The document in the picture below is a capture of this HTML page you are reading right now. I created this entire site using the Emacs editor primarily because it allows real-time editing; any changes that I make to the file is immediately viewable on the internet and I don't ever have to upload new documents to see how they will actually look inside a browser (click on the image for a larger version).

HTML Code in Emacs

Mozilla or Netscape

You can browse the internet through an X Window using Netscape Navigator or Mozilla, depending on which department's server you are connected to (Dante uses Netscape, while the CSE server Ceylon uses Mozilla). The advantages of this are not readily apparent, as every modern Windows box has an integrated browser, and since you are connecting to a remote server you most likely have an internet connection (how else would you connect to the server??). However, once you begin downloading files you will see where the advantages lie. Since the browser is running on the remote server itself, any files that you want to upload or download come directly from your remote account, and not from your local computer. So, if you have a file you want to download to the remote server, or you want to upload a file from it, you can simply use the browser instead of, say, the SSH FTP program provided by the UWICK and thus save time (click on the image for a larger version).

Mozilla Browser



Note: When running X Window programs, do not forget to include an & symbol after the command. The ampersand forces the process into the background. Telling Unix to launch the program in the background is essential because your terminal will lock up if you attempt to run remote processes normally. If you forget to launch a program in the background, you can force it there by stopping it and then using the bg command to put it in the background.

Example:

% emacs
(Ctrl-Z)
[1]+ Stopped emacs
% jobs
[1]+ Stopped emacs
% bg 1
[1]+ emacs &