After typing in your login and password, XDM checks your home directory for a .xsession file. If you have a .xsession file, it is executed. If you do not have a .xsession file, then the file /usr/local/X11R5/lib/X11/xdm/.xsession is executed. In order to change the Window Manager that is started, or to modify the other programs that are started when you log in, you must have a .xsession file in your home directory.
The CS department supports one Window Manager: twm
.
If you want to customize your X environment, you may copy the default startup files and modify them accordingly. Make sure you know what you are doing before modifying the default setup, because it is very easy to make a mistake that will prevent you from logging in. When in doubt, ask the tutor for assistance.
The .xsession files support two Xresources files. The system keeps a Xresources file in /usr/local/X11R5/lib/X11/Xresources. You may have your own customized Xresources file in your home directory.
Warning:
If you modify your .xsession file, make sure that you do not remove
the line that loads the system Xresources; things will stop working
if you do not load the system Xresources.
The system default .twmrc file may be found in /usr/local/X11R5/lib/X11/twm. To customize the action and feel of TWM, you must first copy the .twmrc file to your home directory. To do this, type the following: cp /usr/local/X11R5/lib/X11/twm/system.twmrc $HOME/.twmrc
The features included in the standard .twmrc are described here.
To see the pop-up menus, press one of the mouse buttons while the mouse cursor is located in the root (grey background) window.
The first menu is reached by pressing the left mouse button, while the mouse cursor is in the root window. It is labeled Window Options. This menu contains things you can do, such as Refresh the screen, Focus on a window, Move or Destroy a Window, Show or Hide the Icon Manager Window(usually located in the upper right corner of your screen), Reread the .twmrc file (useful if you've made some changes and you want to see the results without logging out and back in), and Exit TWM, the Tom's Window Manager program.
The second pop-up menu, reached by pressing the center mouse button while the cursor is located in the root window, is the Hosts menu. With this menu you can open a window on a particular computer host, such as Sirius, Jove, Csqr, Odin, or the PSU library, if you have an account on that machine. You will be given a login prompt for typing in your account name and password.
The third menu, reached with the right mouse button, is the Applications menu, giving you the option of opening certain applications, such as a calculator, a man page reader, a mail reader (elm), etc. Not all of these work on every machine. Xman is one that you may want to take notice of. It opens a window in which you can look at man pages.
The set of menus described in the previous section pop-up when the mouse cursor is on the root window. There is another set of menus that pop-up when the mouse cursor is on a window and the control key is pressed while a mouse button is being pressed.
Pressing the left mouse button while the cursor is within a window and you are also pressing the control key gives you a menu of Main Options, such as redrawing a window, or sending a kill signal to destroy the window.
Using the middle mouse button with the control key gives you some options for controlling the window you are currently in, such as changing to reverse video, or enabling the visual bell (the window will flash instead of beep when you make an error).
If you press the right mouse button while pressing the control key, you will be given the option of changing the size of the font in the window you are currently in, making it smaller or larger.
If you have several windows open and want to copy some text from one window to the other you can use the cut and paste feature of X.
First select the text in one window using the first mouse button (left). Then go to the window you want to paste that text to and press the second mouse button (center). The text will appear in the window just as if you had typed it yourself.
Below is a chart of what happens when the mouse keys are pressed. Different things happen depending on where the mouse is and what keys are pressed at the time.