Re: X Windows
On Tue, 14 May 1996, Susan G. Kleinmann wrote:
> > I installed fvwm2 but still get the xterm that comes as the default.
> If you start X with 'xinit' or 'startx' and do _not_ have an X startup
> script in your home directory, you will be punished by being presented with
> an X term that could only be read by people under the age of 20.
> You can circumvent this by including a file called ".xinirc" or ".xsession"
> in your home directory. I recommend .xsession, since all of the three
> X startup methods (xinit, startx, and xdm) look for it.
> Below please find my simple .xsession file. It invokes 2 xterms, both with
> fonts big enough for me to see:
> # This file is called by /etc/X11/xinit/xinitrc
> xrdb -load $HOME/.Xdefaults
> oclock -g +1152+0 &
> xterm -sb -sl 1500 -fn 12x24 -g 80x24+9+1 &
> xterm -sb -sl 1500 -fn 12x24 -g 80x24+291+418 &
> xsetroot -solid SteelBlue
I'd suggest "exec fvwm" rather than "fvwm". Why waste memory or swap
for the /bin/sh when it's no longer needed?
Here's my .xsession. I've edited it to put extra comments in to explain
what's going on.
# all client programs (xterm, xbiff, tkdesk etc) should be run in
# background with &
# the window manager MUST NOT be run in background or xinit will think
# the X session is over as soon as it's loaded.
# explanation: startx kills the X server when the .xsession script
# returns...if fvwm is backgrounded it will return when fvwm has been
# executed, otherwise it won't return until fvwm exits.
# load my resource database
xrdb -load ~/.Xdefaults
# allow gw.taz.net.au to open windows on my screen
# steelblue makes a nice background colour
xsetroot -solid steelblue
# biff me
xbiff -geometry 48x48+925+1 -shape &
# run tkdesk desktop/file manager
# give me an xterm
# and finally, run my window manager.
It's also useful to set the XTerm resource defaults in ~/.Xdefaults:
here's a sample .Xdefaults file which sets the defaults for XTerms and
also does some neat stuff for keyboard maps in motif applications.
Thanks to someone on this list for the keybinding stuff - i can't
remember who it was but they posted it here a few days ago.
The "!" lines are comments.
! Xterm resources
! key bindings
*defaultVirtualBindings: osfPageUp: <Key>Prior \n\
osfPageDown: <Key>Next \n\
osfEndLine: <Key>End \n\
osfBeginLine: <Key>Home \n\
osfBackSpace: <Key>Delete \n\
osfDelete: <Key>Delete \n\
osfInsert: <Key>Insert \n\
osfLeft: <Key>Left \n\
osfUp: <Key>Up \n\
osfDown: <Key>Down \n\
osfRight: <Key>Right \n\
osfCancel: Ctrl <Key>g \n\
osfCut: Ctrl <Key>w \n\
osfCopy: Ctrl <Key>c \n\
osfPaste: Ctrl <Key>y \n\
osfClear: Ctrl <Key>k