X Window System graphic interface

X-windows (X11R6) is a software which supports graphical user interfaces (with multiple windows, menus, icons and the use of a mouse). 

X11R6 software consists of a an X-server and many X-clients.
X clients receives requests to display graphical information on a screen.
X-clients send such requests to an X-server, possibly over the network.

If your PC/Win, PC/Linux or Mac has an X-server and if it has an IP address, you will be able to invoke graphical utilities on ssh.cs.plattsburgh.edu and receive them on your screen. 

Some PC's in campus labs have Cygwin's X11. 

If you have at home a computer with an Internet access consider installing an X-server such as XWin32, MI/X or Cygwin's X11R6.

Notice that all computers in the PSU campus network, including, dormitories, have IP addresses. Also, if you are off-campus and if you dial to an Internet Service Provider using a modem, you establish a special connection (called PPP) and your computer receives a temporary Internet address for the duration of the session. In all such cases, if you add an X-server software to your computer you will be able to connect to ssh.cs.plattsburgh.edu from your computer with the full convenience of a graphical user interface (GUI). However, note that this will not be possible if you are off-campus and if you just dial the PSU modem number.

Graphic utilities

The following is a list of most important (standard or custom) commands which can be used under Unix in CS Lab to invoke X-clients:

It is best to type this commands with an & at the end -- this will allow you to use the shell which executes this command without waiting for the X-client to terminate. 

The following text based (custom) utilities will automatically open a separate window if you run them under X.

MULTIPLE WINDOWS

In Microsoft Windows you are used to invoking a text editor and opening there several documents. Under X-windows the idea is different: an invocation of emacs (or another editor) will give you just one window with a single document. However you can invoke emacs several times, every time with another document. This will give you several emacs windows with different documents. Notice that you can still copy in one window and paste in another -- this concerns both emacs windows and shell windows. Similarly, sometimes it can be convenient to open a second shell window -- with our customizations, you can do that by typing "shell" or "xterm &". While programming you may want to use several emacs windows to edit all files of your program, one gdb window for debugging, and one shell window to compile the program and see the warning messages.

MOUSE BUTTONS

X-windows are designed for operation with a mouse equipped with 3 buttons. In the case of a PC with Linux operating system and X-windows, or a PC with Microsoft Windows and an X-server software the missing button can be simulated by pressing both buttons together. Both buttons pressed together are used for pasting of text. Also, in some applications, a menu can be pulled down only by pressing both buttons together. In case of some free X-servers, there is no way to simulate the missing button -- this means that unless you purchase a 3-button mouse (under $10) you will be able to copy and paste text with your mouse but you will not be able to cut text that way. (Still you can cut in emacs by selecting cut from a menu or pressing appropriate keys.) The explanations below are formulated assuming a 3-button mouse. 

SCROLLBAR

Some windows have a scrollbar which sometimes is on the left-hand side and sometimes on the right-hand side. When your document becomes bigger than the window, you will notice a dark block on the scrollbar. The size of the block indicates how much of the document is visible in the window: if the block is small only a small part of the document is visible in the window; if the block fills almost entire scrollbar, almost entire document is visible in the window. The position of the block in the scrollbar indicates the position of the window with respect to the entire document: if the block is on the top of the scrollbar, you are viewing the beginning of the document; if the block is on the bottom of the scrollbar, you are viewing the end of the document. Clicking the left mouse button on the scrollbar moves you down in the document. Clicking the right mouse button on the scrollbar moves you up in the document. It is essential where you click on the scrollbar: clicking left or right mouse button near the top of the scrollbar moves the document just a little while doing the same near the bottom of the scrollbar moves the document in big jumps. Clicking the middle mouse button on the scrollbar brings you to the specific place in the document: clicking closer to the top of the scrollbar brings you closer to the beginning of the document; clicking closer to the bottom of the scrollbar brings you closer to the bottom of the document. If the pointer points to the top of the block on the scrollbar, if you press the middle button you will be able to drag the block to another place and scroll the document.

COPY,  CUT AND PASTE OPERATIONS 

COPYING a fragment of text to the paste buffer in any X window. There are two ways. 

  1. With the pointer at the beginning of the fragment press the left mouse button and drag it to the end of the fragment. The fragment will be highlighted and stored in the paste buffer. 
  2. With the pointer at the beginning of the fragment click the left mouse button; then move the pointer to the end of the fragment and click the right mouse button. The fragment will not always be highlighted but it will always be stored in the paste buffer. It is also possible to adjust (change) the size of the fragment you selected (copied to the paste buffer) -- this can be done by moving the pointer to another place and pressing the right mouse button again.

PASTING (YANKING) the contents of paste buffer into any X-window. With the cursor in the desired position, click the middle mouse button. This will paste the contents of paste buffer. Notice that you can paste the same fragment of text many times. You can also paste it to a different window!

CUTTING a fragment of text to the paste buffer in emacs. With the cursor at the beginning of the fragment click the left mouse button; then move the cursor to the end of the fragment and click the right mouse button twice. The fragment will be cut and stored in the paste buffer. This works in the emacs window but not in shell windows.

HINT: in some windows the copy/cut/paste operations can be performed only if the SHIFT button is depressed.

X-SERVER SOFTWARE FOR PERSONAL COMPUTERS

If you own a personal computer you can install an X-windows server software. Users of X-server software who connect from campus (dormitories) over the 10-100Mb/s Ethernet network commented favorably on this type of access. Users who live off campus and use X-windows over a phone line and 56Kb/s modem complained that the connection is slow -- a modem connection over a phone line is 100 times slower than the 10Mb/s Ethernet network on campus.

Please share your experiences with jan.plaza@plattsburgh.edu and send suggestions.

HOW TO USE AN X-SERVER

  1. At local computer, start an X-server.
    (In case of Cygwin, start Cygwin's bash shell and type: /usr/X11R6/bin/startxwin.bat)
  2. If you are running linux or Cygwin,  on the local computer, in a shell window under X, type: 
    xhost ssh.cs.plattsburgh.edu
    Skip this step if you are not using linux or Cygwin
    This tells the local computer it is OK to accept X-packets from ssh.cs.plattsburgh.edu.
  3. Open ssh connection to ssh.cs.plattsburgh.edu
    (In case of Cygwin, type: ssh -l <username> -X ssh.cs.plattsburgh.edu)
  4. On the remote computer, type: xterm &
    this will give your first shell from ssh.cs.plattsburgh.edu displayed on your local screen;
    you can invoke more X-clients from this shell.