Configuration Files: Getting started with OpenWindows
@ What configuration files do I need to know about?
.xinitrc and .xsessionrc
The first time you run OpenWindows, a .xinitrc file will be created in
your login directory ($HOME). If it already exists, you might have to
edit it somewhat; it's simplest to move it and any other old X11 files
you have to another directory, and then merge the old and new files.
If your site uses xdm, you should use .xsession instead of .xinitrc,
since xdm doesn't look at your .xinitrc file.
.openwin-init, .openwin-menu and .openwin-sys
These are optional files you can create in your $HOME directory,
depending on which version of olwm or olvwm you use.
Look in $OPENWINHOME/lib (normally /usr/openwin/lib) for these files
without the leading . and copy any you want to change. You may need
to edit your .xinitrc to get them recognized. If you are not on an
X terminal, you will want to run a console window (such as cmdtool -C,
shelltool -C, xterm -C) or Chuck Musciano's "contool" program so that
system output will be directed there instead of writing over your screen.
Note that .openwin-sys is not executed unless you edit .xinitrc.
.Xdefaults
You can put X Windows resource specifications in here. In particular,
it is a good idea to include at least:
OpenWindows.FocusLenience: true
*Input: TRUE
These allow non-ICCCM-compliant programs to receive input even if they
forget to ask for it.
Props, the program that runs when you select `properties' from the default
root menu under olwm or olvwm, writes your choices into either
.Xdefaults or, in newer versions, a file called .OWdefaults instead.
Don't put comments in .Xdefaults, since `props' and other programs
that re-write the file delete comments (this is an X problem, not a
Sun-specific bug...). You can use resources like
comment.001 This is a comment
comment.002 Actually, it's an X default, but unless you have an
comment.003 X program called comment, it's pretty safe.
.startup.ps
This is the NeWS user profile file, read by OpenWindows (actually xnews)
on startup. This is documented in the NeWS programming manual, near the
back. The most useful thing to put here is PostScript code to change
the keyboard repeat rate, although you must be very careful, since a
syntax error in the PostScript means that xnews will either not start up
at all or will get broken in strange ways. The NeWS manual gives code
that is both incorrect and insufficient.
WARNING: things in this file rarely work on both OpenWindows 2 and 3.
Note that the mouse speed is best set in your .xinitrc with xset m; see
the man page for xset ("man xset", and "xset -help") for more information.
Here's what $HOME/.startup.ps should look like if you want a delay of
about a third of a second (300000 microseconds), and a repeat rate of
twenty or so keys per second (30000 microseconds between repeats) for
OpenWindows 3. You'll have to experiment a bit because the RepeatTime
is the delay between keys sent, and thus doesn't include the time to
process each key, which is probably higher on my 4/110 than on your
SuperSPARC 10/51 GTi injection :-) Again, this is for OpenWindows 3...
% don't want the demos - see p. xxxii of NeWS Toolkit Reference Manual
% /IncludeDemos? false def
UserProfile begin
/KeyRepeatThresh 0 300000 timeval storetimeval def
/KeyRepeatTime 0 30000 timeval storetimeval def
% Note: 300000 and 30000 differ greatly...
end
You must also have a .user.ps file in the same directory, like this:
/NeWS 3 0 findpackage beginpackage
/TNTCore 3 0 findpackage beginpackage
/TNT 3 0 findpackage beginpackage
ClassRepeatKeys pop % force repeat.ps to autoload
endpackage endpackage endpackage
If you change these parameters, you can test them without restarting the
OpenWindows server like this:
$ psh -i .startup.ps
Welcome to X11/NeWS Version3
$ psh -i
Welcome to X11/NeWS Version3
/classinit ClassRepeatKeys send
%%% now press control-D
You can also either of these two files (.startup.ps and .user.ps) to make
the root window be "retained", so that a PostScript drawing on the
background won't be erased when you move windows:
frambuffer /Retained true put
will do this. Note that this may increase the amount of memory used
by the NeWS server (xnews) dramatically.
See also:
Trouble Shooting: It Won't Let Me Type
Trouble Shooting: Is there an easy way to edit Xdefaults?
Environment Variables
@ How can I configure OPEN LOOK for a left-handed mouse and keyboard?
You can use xmodmap to change the mouse buttons, but be prepared for one
or two occasional surprises. See also "man 7 xview" for a list of
keybindings you can change, at least for XView programs.
With OpenWindows 2.0, you can use defaultsedit to set the mouse mappings
and then let SunView handle them. The status returned by svenv should
tell you whether your server is running under SunView or not; put this
in your .xinitrc:
if eval `svenv -env`
then
xmodmap -e "pointer = 1 2 3"
input_from_defaults
else
xmodmap -e "pointer = 3 2 1"
fi
@ How can I get the screen to go blank when the system is idle?
Run screenblank from /etc/rc.local if you can; it's a boring but
effective screen saver. See `man screenblank'.
Under Solaris 2 you'll need to copy screenblank from an older system, as
it's not supplied. Then add a new file in /etc/rc2.d to make the system
run screenblank automatically.
You can also pick up a replacement screenblank by
Jef Poskanzer (<jef@acme.com> or <jef@netcom.com>):
ftp://ftp.netcom.com/pub/je/jef/screenblank.tar.Z
ftp://ftp.ee.lbl.gov/screenblank.tar.Z
Parent document is top of "OPEN LOOK GUI FAQ 01/04: General"
Previous document is "OpenWindows, Terminals, and Other Displays"
Next document is "Key Bindings, Cut and Paste"