Consultor Eletrônico



Kbase 10354: Openlook/Openwindows Frequently Asked Questions: V7
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/05/1998
Openlook/Openwindows Frequently Asked Questions: V7

920612-elp01
Subject: Openlook/Openwindows Frequently Asked Questions

If your question isn`t here, please try:
man openwin
man xnews
man 7 xview
and looking in the appropriate manuals listed in the Bibliography below

There are sets of Frequently Asked Questions for X11 and XView (?), posted to
comp.windows.x newsgroups and comp.windows.open-look respectively.

This is version: 1.29; Last posted version: 1.22

Contents: (in rn and trn you can use control-G to go to the next topic)

Subject: Terminology: OPEN LOOK, OpenWindows, X11, XView, (MO)OLIT, Motif
Subject: Window Managers -- olwm, olvwm
Subject: OpenWindows, Terminals, and Other Displays
Subject: Configuration Files: Getting started with OpenWindows
Subject: Key Bindings, Cut and Paste
Subject: Applications: General
Subject: Applications: PostScript previewers...
Subject: Applications: Application Builders
Subject: Applications: XView Extensions
Subject: Troubleshooting: It Won´t Let Me Type
Subject: Troubleshooting: Not authorized to use display
Subject: Trouble Shooting: other common problems
Subject: Trouble Shooting: XView problems
Subject: Fonts
Subject: Environment Variables
Subject: Where Can I get It? Ftp, implementations, etc...
Subject: Bibliography -- books, manuals, journals, papers, beer-mats
Subject: Getting this File, Revision History, Recent Changes


~Subject: Terminology: OPEN LOOK, OpenWindows, X11, XView, OLIT, MOOLIT, Motif

@ What is OPEN LOOK?
OPEN LOOK is a specification of a Graphical User Interface (GUI).
A GUI determines the `look and feel´ of a system -- the shape of
windows, buttons and scroll-bars, how you resize things, how you
edit files, etc.

The OPEN LOOK GUI is specified, developed and maintained jointly by
Sun Microsystems and AT&T.

See Also:
Bibliography

@ What is OpenWindows?
OpenWindows is a windowing environment that conforms to the OPEN LOOK
Graphical User Interface Specifications. It´s compatible with the
X11 window system from MIT as well as Sun´s NeWS and SunView, so you
can intermix programs written for any of those systems.
It comes from Sun and with System V Release 4 from certain vendors.
OpenWindows is sometimes also called openwin or xnews, after the
program used to start it and the main executable itself, respectively.
You can license the source from Sun.

See Also:
Mixing X11 and OpenWindows
Where can I get it?

@ What are OLIT, XView and TNT?
These are all toolkits for programmers to use in developing programs
that conform to the OPEN LOOK specifications. See the Bibliography
for documentation on the individual toolkits. Here´s a brief summary:

OLIT is AT&T´s OPEN LOOK Intrinsics Toolkit for the X Window system;
it uses a widget set, and is probably the easiest for people who are
already X11 programmers to learn. You can buy the source from AT&T.
Sun includes the OLIT library in OpenWindows (q.v.); it may also be
included in System V Release 4. It´s written in C. The current
version of OLIT (included in OpenWindows, or available from AT&T) is 2.5.
The release of OLIT in OpenWindows 3.0 is OLIT 3.0.
See also: MOOLIT [sic]

XView is Sun´s toolkit for X11, written in C. This one is more
obviously object-oriented than OLIT, and is similar in programmer
interface to SunView. There´s even a program to help migrate source
code from SunView to XView. XView is often said to be the easiest
toolkit to learn.
The XView toolkit is included in OpenWindows, and full source is
available by anonymous ftp from export.lcs.mit.edu (and elsewhere).
The current version of XView from Sun is 3.0.

The NeWS Toolkit (TNT) is an object-oriented programming system based
on the PostScript language and NeWS. TNT implements many of the
OPEN LOOK interface components required to build the user interface of
an application. It´s included in OpenWindows.
The current version of TNT from Sun is 3.0; Release 3.0 contains some
incompatibilities with tNt 1.0 [other than the NEW cApItAlIzAtIoN :-)].

The C++ User Interface Toolkit (UIT) consists of an object-oriented C++
class library layered on top of XView and a tool to generate code from
DevGuide 3 GIL files. The UIT also includes features that simplify
event management and the use of PostScript and color. It is said to be
compatible with OpenWindows V2 and V3, and presumably V3.0.1, since the
release mentions that it works on Solaris 2.
UIT is not an official Sun-supported product but an ongoing project of
various people within Sun. It can be found on export.lcs.mit.edu in
the MIT contrib directory as UITV2.tar.Z (use binary mode!).

@ Where does Motif fit in?
It doesn´t :-). Motif is an alternative Graphical User Interface that
is being developed by OSF. It has a `look and feel´ reminiscent of
Microsoft Windows and the OS/2 Presentation Manager. There are no non-
commercial Motif toolkits available, although the Motif source is sold
reasonably cheaply by OSF. Although Motif is currently available on
more platforms than OpenWindows, the OPEN LOOK GUI is almost certainly
used on many more machines, simply because Sun (and SysVR4) have such a
large installed base.
Sun´s CD/WARE Volume 2 contains a roadmap for improving Motif applications
by converting them to OLIT [:-)]; there are also notes in the `Periodic
Table´ OLIT demo in $OPENWINHOME/demo.

@ What is MOOLIT?
MOOLIT is a version of OLIT from AT&T that lets users choose between a
Motif and an OPEN LOOK UI feel at run-time. It will be part of System V
Release 4.2, which may also contain an X11R5 that supports Adobe´s Type
Manager (ATM). It isn´t clear whether MOOLIT will replace OLIT.
Contact: Joanne Newbauer, jo@usl.com, (908) 522-6677

~Subject: Window Managers -- olwm, olvwm

@ What are olwm and olvwm?
They are window managers. A window manager is the part of the X Window
system (e.g. X11) that is responsible for deciding how to lay out windows
on the screen, and for managing the user´s interaction with the windows.

Olwm is the standard OPEN LOOK window manager.
It´s included with all of the OpenWindows (q.v.) implementations, and
you can also get the source by ftp, since Sun donated it.

Olvwm is a version of olwm that manages a `virtual desktop´ (hence the
`v´ in its name). It shows a little map on the screen, with the
currently displayed area represented by a little rectangle. You can
move around by dragging the rectangle or with the arrow keys. This
lets you run several clients (applications) and move the display around
from one to the other. Olvwm was derived from the OpenWindows 3.0 olwm
by Scott Oaks; you need to have XView 3.0 to compile it.
Get olvwm from an ftp site such as export.lcs.mit.edu (in the contrib
directory).

@ Can I use my favorite window manager with OpenWindows instead of olwm?
Yes. If you use twm, for example, or mwm, you won´t be able to use
the Pin and Unpin feature of olwm, and you (probably) won´t see the
footers some windows use to display certain messages.

If you use twm, you´ll want to use the f.delete function to unpin menus
and get rid of programs that don´t have a `quit´ button when not run
under olwm. See the manual page for your window manager (twm, etc).

More OPEN LOOK programs are listed under Applications below.

~Subject: OpenWindows, Terminals, and Other Displays

@ Can I use olwm and olvwm without OpenWindows or on an X Terminal?
The OpenWindows xnews server combines SunView, NeWS (PostScript) and X11.
This means that it can run programs compiled for any of those systems.
Unfortunately, it means that some OpenWindows programs need either NeWS
or SunView support, and thus won´t run on an X terminal. This includes
pageview in particular.

You can use olwm or olvwm (see above) on an X terminal or a non-Open-
Windows display, and most OPEN LOOK clients (e.g. OLIT or XView ones)
will work perfectly well. You may find that you get complaints about
fonts not being found. If so, see the Fonts section below.
If you are running the window manager built-in to an NCD terminal, you
may have problems with input focus; setting *Input: True in the terminal´s
XDefault file in /usr/lib/X11/xdm may or may not help.

See Also:
Applications: PostScript previewers


~Subject: 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 .Xdefaults.
Don´t put comments in .Xdefaults, since `props´ deletes them.

.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:
Troubleshooting: It Won´t Let Me Type
Troubleshooting: Is there an easy way to edit Xdefaults?
Environment Variables

@ How can I configure OPEN LOOK for a left-handed mouse and keyboard?
It´s probably best to wait for OpenWindows 3.0, since some of the
functions are hard-coded and can´t be changed. In the mean-time, you
can use xmodmap to change the mouse buttons, but be prepared for one
or two occasional surprises.

@ 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´.

~Subject: Key Bindings, Cut and Paste

[please tell me if this section is useful! -- Lee, lee@sq.com]

@ How do I cut and paste between XTerm and OpenWindows programs?

To go from XTerm to textedit (say):
* Select the text you want to copy by dragging the SELECT mouse button
in xterm
* Press COPY in the XTerm (this key is L6, or Meta+c (the O´Reilly
XView manual gets this wrong)
* Move to the textedit window, and press PASTE (L8 or Meta+v)

If this doesn´t work, see Troubleshooting: Cut and Paste

To go the other way, from textedit to XTerm:
* Select the text in textedit. No need to use COPY
* Move to the XTerm window and press ADJUST (the middle mouse button).
* You can also use the COPY/CUT and PASTE buttons.

@ COPY/PASTE is boring. What short-cuts are available?

Quick Copy within textedit, mailtool, etc:
* Click SELECT to get a text caret where you want the copied text to go
* Press and HOLD DOWN the COPY (or CUT) button
* Select the text you want to copy/move. You´ll see that it´s underlined
or crossed out, as appropriate. (In the jed demo it goes grey)
* Let go of the COPY or PASTE button.
* The text you underlined or crossed out appears at the insert caret.

Drag and Drop to Move a Selection
* Select the text you want to copy or move, by dragging or miltiple-
clicking the SELECT or ADJUST mouse button
* Put the mouse pointer anywhere within the selection
* Press and HOLD DOWN down the SELECT mouse button, and move the mouse
pointer a little to the right; you´ll see the cursor changes to be the
first 3 letters of the text (or some other icon).
* Still holding SELECT down, move the mouse over the point where you want
to drop the text
* You may see the mouse pointer change to a rifle-sight or target, to show
that it´s OK to drop things here
* Let go of SELECT, and the text is moved. This works in text fields of
dialogue boxes as well as in text subwindows.

Drag and Drop to Copy a Selection
* This is the same as using Drag and Drop to Move a Selection, except that
you must hold the CONTROL key down as well as the SELECT mouse button.

@ What are the default key bindings in textedit and elsewhere?

See the man page for textedit(1) for some of them.
In general, the editing/moving commands go in the opposite direction when
shifted - e.g. Ctrl+w deletes a word, and Ctrl+W deletes the word to the
right of the insert point.

Meta-i - include file Meta-f - find selection (forward/backward)

Ctrl-a - start of line Ctrl-< - back word
Ctrl-e - end of line Ctrl-> - forward word
Ctrl-w - delete word Ctrl-u - delete to start/END of line
Ctrl-Return - move to end/START of document

See the O´Reilly XView Reference Manual for a list of some of the default
keys; see also the olwm or olvwm manual page.

@ What can I put in my .ttysrc? Where is it documented?

Beats me.


~Subject: Applications: General

contool (ftp from export.lcs.mit.edu)
a special-purpose console-window that can filter out or take special
action on specified console messages; written by Chuck Musciano.
ftptool (ftp from export.lcs.mit.edu)
an OPEN LOOK front-end to ftp (it uses XView)
Maestro (ftp from sioux.stanford.edu)
Multimedia authoring tools, including support for sound, text & video.
Spider (Included in OpenWindows under `demo´ and `share/src´)
A patience-style card game with two packs of cards and
excellent bitmap cards. I suggest recompiling to allow the cards to
have rounded edges.
xvnews (ftp from export.lcs.mit.edu)
An xview-based newsreader for netnews.
xvttool (ftp from titan.rice.edu:sun-source)
A vt100/102 emulator, in both XView and SunView versions. Includes
buttons for the PF keys, etc.
Commercial:
Unfortunately it isn´t possible to include commercial OPEN LOOK
applications here, because of usage restrictions on networks.
Contact SunSoft (or Sun) and ask for the Catalyst OPEN LOOK guide,
which lists over 200 pages of applications.

You can also get the free CDWare CD/ROM, which contains demo versions
of several popular OPEN LOOK applications. Once you´ve done this,
you can simply contact the vendor concerned to have the license
upgraded from demo, and receive the full product documentation.

~Subject: Applications: PostScript previewers...

pageview (included with OpenWindows)
Only runs under OpenWindows. No Type 1 font support
A good thing to try with colour OpnWindows 3 is pageview -aa -dpi 150.
xps (included with OpenWindows under demo and share/src)
Only runs under OpenWindows.
psh (included with OpenWindows)
simple interface to NeWS and the OpenWindows server
Note that pageview, xps and psh are simply front ends to the X11/NeWS
server in OpenWindows, and thus won´t run on an X terminal or other
non-OpenWindows server.

ralpage (ftp from export.lcs.mit.edu in contrib/clients)
Crispin Goswell´s PostScript interpreter, much hacked.
Not OPEN LOOK compliant. No Type 1 font support.
There are other versions of this called `xps´, `postscript´, etc.;
don´t confuse this `xp´ with the one mentioned above.
ghostscript (from the Free Software Foundation)
Supports Type 1 fonts.

~Subject: Applications: Application Builders

DevGuide 3.0 (from Sun) [commercial]
lets you use Drag and Drop to create an OPEN LOOK application with
XView, OLIT, UIT or TNT (see Toolkits above). Very easy to use.

XVT (from XVT Systems) [commercial]
Lets you write code to a common subset of OPEN LOOK, Motif, Microsoft
Windows, the Macintosh GUI, and even terminals (using curses). You
buy an XVT toolkit for each environment. The XVT programmer´s
interface was recently selected by an IEEE committee as the basis for
a portable GUI standard.

ExoCode (from Expert Object) [commercial]
was one of the first third-party GUI builders to support OPEN LOOK,
using the XView toolkit. It was reviewed in SunExpert magazine
in 1990.

uib (from Solbourne) [commercial]
uib is a user interface builder which supports building applications
that support both OPEN LOOK and Motif. It generates code for
Solbourne´s OI C++ toolkit and can use user created subclasses.
It is available from Solbourne.
Contact Debra Frances debra@Solbourne.COM, +1 303 678-4626

There are OPEN LOOK versions of dirt and wcl either in progress or
already available.

~Subject: Applications: XView Extensions

Slingshot provides rectangles (like the Xt Intrinsics´ RectObj gadget),
drag-and-drop-aware images, icons and text, trees, lines, arrows...
You will need a total of 3.3 Megabytes of disk space to compile the
library and the example programs.

Get it by ftp from export.lcs.mit.edu, in /contrib/slingshot-pkgs.tar.Z
(remember to use binary mode in ftp!). You can also get it by sending mail
to archive-server@gazooch.eng.sun.com with the body of each message
containing a line like
send sspkg Part01 Part02
going up to
send sspkg Part15 Part16
You can ask for one file at a time to reduce the impact on intermediate
mail sites. Ask the mail server for help with the Subject line: "help".
A human can be reached at archive-manager@gazooch.eng.sun.com.

There are also a number of commercial XView extensions, again listed
in the Catalyst OPEN LOOK guide, such as XRT/Graph (for bar charts etc.).

If you send me details, I will make a list of commercial products.

~Subject: Fonts

@ Does OpenWindows support Type 1 PostScript fonts?
No. If you have FrameMaker there is a utility to import them, I´m told.
The 57 fonts supplied with OpenWindows are fully hinted, though, and
comparing them to the Microsoft Windows and Apple TrueType fonts is
interesting... The F3 font format is described in a publication from the
Sun OpenFonts group, listed in the Bibliography below. Documentation on
the unbundled version of TypeScaler is also available from Sun OpenFonts.

Sun has a program that converts Type 1 fonts to Folio format, but it´s
not cheap. You can buy Folio fonts, although the Sun sales office I
called weren´t able to help me do so :-(

The latest release of Sun´s NeWSPrint supports Type 1 fonts.

@ Improving font rendering time
Although the Sun type renderer (TypeScaler) is pretty fast, it´s not as
fast as loading a bitmap :-). You can pre-generate bitmap fonts for sizes
that you use a lot, and you can also alter and access the font cache
parameters. If you have a lot of memory you might want to increase the
font cache size.
$ psh -i
Welcome to X11/NeWS Version3 <--- psh will say this at you
currentfontmem = % type this line ...
300 % and here´s whai my server was using -- 300 Kbytes
1024 setfontmem
% Just to check:
currentfontmem =
1024
See pp. 328ff of the NeWS 3.0 Programmer´s Guide. You need to say psh -i
so that the PostScript packages are loaded - see the psh man page.

@ Making bitmap fonts for faster startup:
$ mkdir $HOME/myfonts
$ cd $HOME/myfonts
$ makeafb -20 -M $OPENWINHOME/lib/fonts/Bembo.f3b
Creating Bembo20.afb
$ convertfont -b Bembo20.afb
Bembo20.afb->./Bembo20.fb
Chars parameter greater than number of characters supplied.
$ ls
Bembo20.afb Bembo20.fb Synonyms.list
$ bldfamily
* Bembo ./Bembo.ff (Encoding: latin)
cat: ./Compat.list: No such file or directory
$ xset +fp `pwd`
$ xset fp rehash

If you want the server to see your new font directory every time,
add this directory to your FONTPATH environment variable in one
of your start-up files, e.g. .login or .profile.

@ Converting between font formats (convertfont, etc.)
You can also use Folio fonts with an X11 server, by converting them to a
bitmap (X11 bdf format) first. Your licence forbids you from using the
fonts on another machine, and unless you have NeWSPrint you shouldn´t
use them for printing. Having said all that... you can use makeafb and
convertfont to generate bdf files that you can compile with bdftosnf or
bdftopcf.

Use mftobdf (from the SeeTeX distribution) to convert TeX pk fonts to
X11 bdf format, which you can then use with either X11 or OenWindows.

@ Xview/OLIT fonts at 100 dpi
There aren´t any. More precisely, the various text fonts, such as
Lucida Typewriter Sans, are available at 100 dpi, and in fact are
scalable under OpenWindows. The glyph fonts are bitmaps, and don´t
scale very well.

~Subject: Troubleshooting: It Won´t Let Me Type

@ When I try to type into some programs, I just get beeps or nothing happens
It is a good idea to include at least:
OpenWindows.FocusLenience: true
*Input: TRUE
in your .Xdefaults file, as these allow non-ICCCM-compliant programs to
receive input even if they forget to ask for it.
See the next item for editing .Xdefaults

~Subject: Troubleshooting: Cut and Paste not working

@ I can´t paste between xterm and XView or deskset programs
Under OpenWindows 2, you need to add the following either to your
$HOME/.Xdefaults file, or to $OPENWINHOME/lib/app-defaults/XTerm instead:

XTerm*VT100.Translations: #override <Key>L6:select-set(CLIPBOARD)\n <Key>L8:insert-selection(CLIPBOARD)

Under OpenWindows 3, this is already in the app-defaults file, so if it
isn´t working, check that XFILESEARCHPATH is set to
/usr/openwin/lib/%T/%N%S
and if it isn´t, either set it or copy/merge the above lines from
$OPENWINHOME/lib/app-defaults/XTerm into /usr/lib/X11/app-defaults/XTerm.

@ I always get the same piece of text whn I press PASTE (L8, Meta+v)
Remove the file /tmp/textsw_shelf and see if that helps; see also the
next item.

* Cut Copy and Paste don´t work at all (OpenWindows only)
Oh dear. Use ps -xuaww | grep xv to check that sv_xv_sel_svc is running
and that either you or root started it, depending on whether you started
OpenWindows with "openwin" or by logging in through xdm.
If not, start it. If it dies, check that there is no /tmp/.sv_xv_sel_svc
before restarting it - you may need to be root to remove it, or you can
reboot your workstation.
Check that there is space in /tmp (use "df /tmp"), and also see if there
are a lot of files there with names like /tmp/tty.txt.a01246; if there are
several hundred of them, cut and paste may take so long that it times out.

Quit any deskset tools such as mailtool, filemgr and cm (calendar), start
a terminal emulator and remove and /tmp/tty.txt* and /tmp/Text* files
that are still there. It´s simplest to quit openwin and start it again
after doing that, if cut and paste was broken, but if it starts working
again you can just carry on. Note that files in /tmp not owned by you
might be in use by another worker comrade, so don´t remove thos without
checking first!

~Subject: Troubleshooting: Not authorized to use display

If you get error messages that look like
Xlib: connection to ":0.0" refused by server
Xlib: Internal error during connection authorization check
Error: Can´t Open display
try, on the machine running OpenWindows or X11,
xhost +machine
where "machine" is the computer on which you ran the command that failed.
If you want to let other users run programs on the same machine as you,
using your display, you will have to type the bizarre-looking
xhost +`hostname`
(or xhost +happyboy, if happyboy is the name of your workstation).
This lets ANY user on `happyboy´ access your display.

With OpenWindows 3.0 you can also use xauth, and the Programmer´s Guide
describes how to do this in Chapter 8, p. 101. This is more secure.
[Also note that there is a CERT advisory notice and a Sun patch for users
of OpenWindows 3.0 under SunOS 4.1.1 to fix a serious security problem.]

On an X Terminal, there may be a setup menu that lets you change or
disable the list of hosts that can access the display.

~Subject: Trouble Shooting: other common problems

@ I get console error messages on my screen and they don´t go away (Sun 3 or 4)
use (for example) openwin -dev /dev/cgfour0 -dev /dev/bwtwo0
to start OpenWindows on a Sun 4/110 or 3/60. If you move the mouse off
the edge of the screen, you get a whole new display, "unix:0.1".
Start an olwm (or olvwm) on the second display from your .xinitrc with
(
eval `svenv -display unix:0.1 -env`
olvwm -display unix:0.1
) &
You only need to do this with OpenWindows 2, and then only if you have
a xgfour frame buffer.

@ Is there an easy way of editing .Xdefaults?
Use `props´, which appears in the default root menu as `properties´.
This starts `props´, a property editor which will re-write your .Xdefaults
after removing comments. It then applies any changes.

@ How do I get the File manager to use emacs instead of textedit?
set the default editor to
sh -c "exec emacs -font lucidasanstypewriter-18 \"$FILE\""
(you can change the font if you prefer a smaller one)

@ How do I run OpenWindows in inverse video?
This tends not to work under OpenWindows 2. With OpwnWindows 3.0,
there are various ways, including using -bg and -fg options. If you´re
using OpenWindows 2 on a Sun 3 , probably the best you can do (short of
upgrading the workstation to a SPARC!) is to use xterm instead of cmdtool.

@ Why don´t flat check-boxes work?
A known bug may make Guide´s output dump core if you use these.
A workaround is to edit the Guide output, as it´s only Guide´s output
that´s broken, not the actual check-box code.
This applies only to versions of DevGuide before Devguide 3.0. If you´re
still using an ancient DevGuide, you should upgrade as soon as possible;
the new one is fantastic!

@ When I leave OpenWindows, my screen goes blank or my mouse cursor stays
on the screen.
Try running clear_colormap; if this helps, put it as the last line in
the shell script you use to start OpenWindows (e.g. `openwin´).

@ When I use snapshot, the system crashes, or the server hangs, or something.
This was a bug related to some systems only. The only work-round was to
use some other screen dump program, such as xwd, xv 2.21 or xgrabsc.

@ Why have some of my function keys stopped working?
Keys F11 and F12 changed from SunF36 and SunF37 to SunXK_F36 and SunXK_F37
respectively in OpenWindows 3. Applications must be recompiled, or you
might be able to use xmodmap or the public domain xkeycaps program to
change your keyboard layout back again.

@ When I type shelltool or cmdtool or textedit, I get the Sunview version
Set your path so that $OPENWINHOME/bin and $OPENWIN/bin/xview come before
/bin (or /usr/bin, they´re the same), or you´ll get the SunView versions
of mailtool, cmdtool, shelltool, etc.

(see also next item)

@ Mixing X11 and OpenWindows
(see also next item)

Note that OpenWindows 3.0 includes the X11R4 core distribution (to patch
level 18), but not the contrib directory. These notes apply to
OpenWindows 2.0, although you could also the same sort of thing with
OpenWindows 3.0 and X11R5.

Install the X11 libraries in /usr/lib/X11. You can intermix OpenWindows
and X11R4 or X11R5, they´re all compatible in this respect.
Put the X11 binaries in (for example) /usr/bin/X11.

Put /usr/bin/X11 last in your PATH, so that you get OpenWindows versions
of programs instead of X11 ones where appropriate, although this is a
matter of preference. In any event, put the OpenWindows bin directory
first -- see the preceding item for more details on that. If you have
/bin (or /usr/bin, they´re the same directory on SunOS) earlier in
your PATH than $OPENWINHOME/bin/xview, you´ll get SunView programs instead
of OpenWindows ones!

Set LD_LIBRARY_PATH so that /usr/openwin/lib is last, after the X11
library directory. This doesn´t matter with OpenWindows 3.0, but with
older versions you´ll get error messages from X11 programs if you don´t
do this. The messages are generally harmless (see next item), although
xdm core dumps if this isn´t right.

Set OPENWINHOME to the directory containing OpenWindows if it isn´t
/usr/openwin.

See Also:
Environment Variables

@ I get error messages on my screen about ld.so: libX11.so.4 not found
set LD_LIBRARY_PATH to be /usr/openwin. If you also use X11, use
/usr/lib:/usr/5lib:/usr/openwin/lib
If you put this in a shell script or your .profile, use
${OPENWINHOME-/usr/openwin}/lib instead of /usr/openwin; this is for
/bin/sh; for csh it is different.

@ I launch my filemgr and I get ld.so:map heap error (9) at /dev/zero
Your system needs to be patched. Look in $OPENWINHOME/lib/OSpatches
and install the patch.

@ Why doesn´t AnswerBook run for me?
You must be running OpenWindows to use AnswerBook. It won´t run under
X11 (on an X terminal or on anything else) because it uses NeWS to draw
the PostScript text and pictures.
If you are using OpenWindows 3.0, you need to use the OpenWindows 3.0
compatible navigator; it´s called .navigator.ow3 on the AnswerBook CD/ROM.
If all AnswerBook users are using OpenWindows 3.0, you can replace
navigator wih .navigator.ow3 altogether (rename the old one first to
satisfy your sense of paranoia!)
The navigator.ow3 binary is also on CD/Ware Vol 2.

@ Why is the Properties choice disabled in the Window menu?
It isn´t implemented yet.

@ File completion in the C-shell is broken in cmdtool
Sadly true, but use shelltool or xterm instead and it´s fine. It also
works if you run command tool on a remote machine.

@ XDM breaks things
Command tool doesn´t like being run without a Unix `controlling terminal´.
Use /etc/setsid to start your command tools and all will be well.
SunView applications may need to be run with svenv, as in
svenv -exec /usr/bin/traffic
because xdm won´t set the necessary environment variables.
Note that the MIT xdm starts up the X server as root, which is a security
hole for OpenWindows; use the OpenWindows 3.0 xdm or be aware that your
users can access files and start Unix processes ass root...

@ Function keys 11 and 12 stopped working
In OpenWindows 3.0, the X11 names ("keysyms") for these keys was changed
to SunXK_F36 and SunXK_F37. Code which uses them should be recompiled,
or you might be able to get away with
xmodmap -e ´keysym SunXK_F36 = SunF36´

~Subject: Trouble Shooting: XView problems
This section is here only until an XView FAQ appears, which has been
promised, but hasn´t reached here. Note that there is also a usenet
newsgroup, alt.toolkits.xview, although it doesn´t sem to have very
wide distribution and has triffic of the order of one or two articles
per month. You should also look at the FAQ in comp.windows.x.

@ how do I set the font of individual Scrolling List items?
PANEL_LIST_FONT takes an int row_number and an Xv_opaque font_handle.
PANEL_LIST_FONTS take a NULL terminated list of Xv_opaque font_handles.
There is no easy way to make an entire list fixed width font.
You have to make sure that you always specify PANEL_LIST_FONT when you
insert a new row into that list, or write a convenience function
insert_row(list, row, string) that hides the nasty bits.

~Subject: Environment Variables

Environment variables, and plausible values to use -- this list doesn´t
take into account any local changes that you might have made, of course.
This list is for OpenWindows 3.0 -- differences for OpenWindows 2.0 are
marked, and I´ve added some comments for users of X11R4, too.

DISPLAY The name of the X Windows Display to use
:0.0 (on the local machine, the one actually running X11 or xnews)
:0.1 (on a Sun for a second, monochrome screen)
machine-running-unix:0.0 (on other machines)
(You may need to do "xhost +other-machine" to let programs on other
machines use your display; see also under Troubleshooting, and see
the section on xauth in the OpenWindows Version 3 Programmer´s Guide,
p. 101 and following)
FONTPATH Where xnews searches for fonts
/usr/openwin/lib/fonts
(you can also use "xset fp+ dir" to add a directory to the font path,
but you may have to do "xset fp rehash" afterwards. This is fine
under OpenWindows, but many X11 servers have font problems)
HELPPATH Where XView looks when you press the Help key (or F1)
/usr/openwin/lib/locale:/usr/openwin/lib/help
(On SunOS 4.0.*, or with OpenWindows 2.0, omit the first entry, which
is for sites using a local other than "C" or "USA").
LD_LIBRARY_PATH Where to look to find shared C libraries
/usr/lib:/usr/5lib:/usr/openwin/lib:/usr/CC/`arch`
(the /usr/CC/`arch`/lib entry is only needed if you use C++ programs)
OPENWINHOME Where OpenWindows lives
/usr/openwin
KEYBOARD, MOUSE -- serial devices to use instead of the console
(don´t set these for normal use; /dev/kbd and /dev/mouse)
PATH Where the Shell searches for programs to run
$(OPENWINHOME)/bin:$(OPENWINHOME)/bin/xview:/usr/local/bin:. $HOME/bin.`arch`:/usr/ucb:/usr/bin:/usr/bin/X11:/usr/hosts: (you will certainly want to change this example! There is no
$(OPENWINHOME)/bin/xview in OpenWindows 3.0)
XFILESEARCHPATH Where programs look for app-defaults files
/usr/openwin/lib/%T/%N%S
(This is set automatically in OpenWindows 3.0)

~Subject: Where Can I get It? Ftp, implementations, etc...

XView 3.0 is available by anonymous ftp from export.lcs.mit.edu and
elsewhere.

OLIT can be bought from AT&amp;T in source form.

OpenWindows can be obtained from Sun, or you can get the source from
Interactive Systems Inc. It is also included in some vendors´ System V
Release 4 implementations, although that´s not always the latest version.
The current release of OpenWindows from Sun for supported architectures
is 3.0; for the Sun 3 series it is frozen at OpenWindows 2.0.
Note that Sun includes OpenWindows with SunOS, and it is also included as
the windowing system for Solaris.

There are said (by Sun) to be over 35 ports of OpenWindows either
available now or in progress. Contact Anthony Flynn at Open Vistas
International (anthony@ovi.com) for more information.

~Subject: Bibliography: books, manuals, journals, papers, beer-mats

The OPEN LOOK (tm) Graphical Interface is documented in two books:
Sun Microsystems Inc., ``OPEN LOOK Graphical User Interface Application
Style Guidelines´´, Addison Wesley, 1989
and
Sun Microsystems Inc., ``OPEN LOOK Graphical User Interface Functional
Specification´´, Addison Wesley

The Main documentation for the X Window system comes from
O´Reilly &amp; Associates in about nine or ten volumes.
The most useful for OPEN LOOK users are:
Volume 1: XLib Programming Manual
Volume 2: XLib Reference Manual
Volume 3: X Window System User´s Guide
(An OPEN LOOK edition of Volume 3 should appear later this year)
Volume 7: XView Programmer´s Manual [Dan Heller]
Companion to Volume 7: XView Reference Manual [Ed. Thomas Van Raalte]

The Companion to Volume 7 is an expanded version of the Attribute
Summary from the previous edition of the XView Programming Manual,
together with other reference information, so that in practice you
have to buy both books.

O´Reilly also have a thinnish orange book on the differences between
X11R4 and RX115.

OLIT programmers will also want the Xt books - volumes 4 and 5.
There is a new big fat green Vol 5 updated for X11R5.

A journal, The X Resource, may also be of interest.

O´Reilly &amp; Associates, 103 Morris Street, Suita A, Sebastopol, CA 95472
+1 707 829-0515, or, in the USA and Canada only, 1-800-998-9938
Fax: +1 707-829-0104.
Email nuts@ora.com or uunet!ora!nuts.
For other distributors: mail, FAX, or call +1 707-829-0515.

The System V Release 4 Documentation from Prentice Hall may also include
a section on OpenWindows.

David Miller describes programming with OLIT in his
``An OPEN LOOK At Unix´´ (M&amp;T press).

Nabajyoti Brkakati gives an excellent introduction to X and to OLIT
programming, as well as setting up and using X and OpenWindows, in:
``Unix[R] Desktop Guide to OPEN LOOK´´
SAMS, 1992 ISBN 0-672-30023-0

Also about using OLIT, and Xt in particular:
The X Window System: Programming and Applications with Xt,
OPEN LOOK Edition,
Doug Young and John Pew, Prentice Hall, 1992,
ISBN 0-13-982992-X
There are also HP Widgets and Motif (ugh) versions of this book.
The example source code in this book can be obtained by ftp from
export.lcs.mit.edu, file "contrib/young.pew.olit.Z".

There is an introduction to XView in
``Writing Applications For Sun Systems´´, Vol 1, ``A Guide for
Macintosh(R) Programmers´´ (Sun Microsystems, pub. Addison Wesley)

To learn more about the NeWS and PostScript languages, see

The NeWS Book, Springer Verlag, 1989 (sadly, a little out of date)

PostScript Language Reference Manual, Second Edition,
Adobe Systems Inc., Addison Wesley, 1990 ["the Red Book"]
Note that OpenWindows 3 is a level 1 PostScript implementation,
with certain Level 2 features (such as Composite Fonts) to some
degree.

PostScript Language Tutorial and Cookbook,
Adobe Systems Inc., Addison Wesley, 1985 ["The blue book"]

There´s at least one book on using Solaris (i.e. SunOS).

Sun also supplies a large amount of documentation with OpenWindows,
although you may have to order it separately. Here´s what I have; they
are each a little over 21 cm square (wider than A4 paper), and vary from
about 1 cm to about 3cm thick. They say `User´s Guide´ or `Programmer´s
Guide´ on the front. The User manuals have a red stripe on the bottom,
and the Programmer ones have a green stripe.

800-6006-10 OpenWindows Version 3 Release Manual
800-6029-1- OpenWindows Version 3 Installation and Start-Up Guide
??????? OpenWindows Version 3 DeskSet Reference Guide (does this exist?)
800-6618-10 OpenWindows Version 3 User´s Guide
800-6323-10 Desktop Integration Guide
800-6027-10 Programmer´s Guide
800-6005-10 OpenWindows Version 3 Reference Manual [the man pages]
800-6319-10 The NeWS Toolkit 3.0 Reference Manual
800-6736-10 NeWS 3.0 Programming Guide
800-6055-10 OLIT 3.0 Widget Set Reference Manual
800-6198-10 XView 3.0 Reference Manual: Converting SunView Applications

800-6854-10 F3 Font Format Specification [order separately]

There are also some other sets of documentation, including the TypeScaler
documentation from the OpenFonts group, for example. There doesn´t seem
to be a complete list anywhere.

??????????? ToolTalk 1.0 Setup and Administration Guide (SunSoft, 1991)
800-6093-10 ToolTalk 1.0 Programmer´s Guide (SunSoft, 1991)
There might be documentation about the Link Manager somewhere, too.

AT&amp;T includes several large thorny bushes´ worth of paper with OLIT.

Several other books are in the works...


~Subject: Getting this File, Revision History, Recent Changes

Mail lee@sq.com to ask for it. Douglas N. Arnold (dna@math.psu.edu)
keeps an up-to-date copy on ftp.math.psu.edu (currently 128.118.24.22) in
the file ~ftp/pub/FAQ/open-look.
The net.answers archives and servers may or may not know about this file,
since they´ve just changed hands and this file was previously in one
archive but not the other.

$Id: open-look.faq,v 1.29 92/06/03 22:22:46 lee Exp $


Acknowledgements:
Bruce Barnett (barnett@alydar.crd.ge.com)
Mike Carney (mike@cray.com)
Charles Ditzel (Charles.Ditzel@West.Sun.COM)
Frank Greco (uunet.uu.net!slcpi!fis1026!fgreco)
David Harrison (harrison@faraday.physics.utoronto.ca)
Rick Heli (Rick.Heli@Eng.Sun.CO)
Jonathan B. Horen (horen@rs.com)
Warner Losh (imp@Solbourne.COM)
Mark Smith (smith@canon.co.uk)
Laura Owens (laurao@northeast.East.Sun.COM)

Progress Software Technical Support Note # 10354