First, I created a .xsession file:
#!/bin/sh # # X startup - xdm session # xrdb -load $HOME/.Xresources xbiff -geometry 60x60-0+0 & ./luna & ./lunatr & ./dtmail & netscape -iconic & /opt/local/X11R5/bin/mwmIt is important that you have one command in this file that does not terminate! (In this case, it is the call to mwm, the windows manager. You can have an xterm; in that case, when you exit the "magic" xterm, the session is over). If you accidentally create a .xsession file with everything running in the background, .xsession will exit as soon as everything is loaded, and you can't do anything! To fix this, log in as normal, except that after you enter your password, press the F1 key instead of enter. This will open a small xterm window (with no special path or anything) that you can use to fix your .xsession. In an extreme emergency, just rename it; that way you will get a default configuration (at UQ, this is with one 80x4 window).
Note the calls to script files here: luna, lunatr, and dtmail. I like to start xterm windows with scripts, so that I can have a title without extra typing. (Luna is the name of the server I log into). Sometimes I log into agua; in that case, I use the "agua" script which uses -T agua to change the title, so I know what window is on what server. (The agua script also uses "-e rlogin agua"). Here is the luna script:
xterm -T Luna -sl 400 -sb -sf -ls -geometry 80x50 -fn "-*-lucida sans typewriter-medium-r-*-*-12-*-*-*-*-70-*-*" &The "-fn blah" option sets the font; use the xfontsel application to hunt down a readable font.
I'm not sure if I want the "-ls" switch; it says to make the shell a login type (i.e. it reads .profile every time).
The "-sl 400" and "-sb" provide a 400 line scroll back facility.
The "-geometry 80x50" says make it an 80x50 character window. (Most x applications interpret those co-ordinates as pixels, not characters). In the lunatr script, the geometry line is "-geometry 80x50-0+60" to make it appear near the top right of the screen. Note that netscape (which takes many seconds to load) starts iconified. I wish I could do the same for dtmail, but it doesn't seem to recognise the command.
I have included the lines starting with "xrdb" and "xbiff" because as soon as you have a .xsession file at all, you don't seem to read the standard file (probably /opt/local/etc/defaults/.xsession at UQ), so if you want your resources read and xbiff, you have to copy them to your own .xsession file.
I prefer "sunmouse" (where the focus goes to the window with the mouse pointer, and I like that window in front. To achieve this, I put this in my .Xresources file:
Mwm*keyboardFocusPolicy: pointer Mwm*focusAutoRaise: True Mwm*autoRaiseDelay: 0I use a bash shell. The system default is kshell. I found that if I tried to run bash from my .profile I ended up in all sorts of strife (e.g. I'd get a bash shell every time I use the "r" command in gdb). So I ended up asking the administrator to change my default shell. (We don't seem to have chsh).
