- Computer ScienceComputer Science
- Fall 2014 Course Evals
- Faculty & Staff
- Job Opening
- Computing Resources
- Learning Goals
- Comprehensive Exam
- Honors Projects
- Recent Theses
- Graduate School
- Study Abroad
- Links to Professional Organizations and Other Web Resources
Using X Windows
Submitted on Thursday, 1/23/2014, at 10:10 AM
Students in introductory computer science classes work on two Unix systems, remus.amherst.edu and romulus.amherst.edu. The two machines are interchangable, so you can work on whichever one you want. In general you can refer to the machines by their short names when you are on-campus and by their full names, including the amherst.edu suffix, when you are off-campus.
Students in advanced classes may use systems managed by our own department. Most of the ideas mentioned here can be applied equally well to our departmental systems.
One way to access the Unix systems is with X windows. When you use a connection of this kind, you have one or more windows to the other machine, which appear as part of your Mac or Windows desktop.
Once you have your first terminal window to the Unix server...
Create another one, the one in which you'll work, with the command
In the new white window, you can begin to issue Unix commands. Here are some examples:
emacs Whatever.java &gnome-terminal &xeyes &ls
The emacs command runs the editor, the gnome-terminal command opens an extra terminal window, xeyes is a cool little graphical application, and ls lists the files in your directory. The ampersand tells the terminal window that you would like to run the program "in the background," meaning that you can immediately issue more commands in the terminal window.
You can change the font size in a white terminal window by choosing "View" from the menu bar and then zooming in or out.
You can work on the client machine, too.
It's possible, of course, to switch between running Unix programs and using applications directly on your client machine. If you happen to close all of your terminal windows to your Unix machine, you can create a new terminal connection without closing and reopening the X windows application. See the Mac or Windows pages for more information.
When you're done with your Unix session...
Simply exit each of your Unix applications, for example by using the Exit menu item in Unix or by typing "exit" in the terminal windows. You might get a complaint in a terminal window if you try to exit before the programs running in the background, i.e. the ones started with &, have been closed. You can then close X windows application.
If you're off-campus...
If you do use X windows, you may find it advantageous to run emacs, our text editor, directly within a terminal window. By avoiding using a separate window for emacs, you may find the editor to be a bit more responsive. The downside is that you'll need to use special emacs keycodes to do things within the window. The emacs tutorial will tell you more about the codes. Don't worry too much about trying this out right away, but it's worth remembering that there is a way to get more sprightly performance if you need it. To run emacs in the terminal window, issue the command
emacs -nw Whatever.java &
in a terminal window for a Unix machine.
Questions or suggestions on this page?
Send email to lamcgeoch or talk to any of the computer science faculty.