Trouble Shooting: other common problems

@ I get console error messages on my screen and they don't go away (Sun 3 or 4)
    If "refresh" makes the messages vanish, but new ones come along later,
	you need to run "xterm -C" from your .xinitrc, or start one up in
	the background and then  choose Save Workspace from the
	Workspace->Utilities menu.  Better still, pick up "contool" and run
	that.  Get it from in the contrib directory.  It
	will monitor the console and open, flash its icon or beep when a
	message appears; it's very easy to configure.

    If "refresh" from the Workspace->Utilities menu doesn't make the messages,
    go away...
	a Sun with a cg4 frame buffer has two screens - you can move the
	mouse off the right-hand (by default) edge of the screen and onto
	a whole new (but monochrome) display, called ":0.1".  See the man.
	page for openwin; I have a shell script that checks for this and,
	if there's a /dev/cgfour0, does
		openwin -dev /dev/cgfour0 -dev /dev/bwtwo0
	If you are running X11 or OpenWindows 2, you might need to add this
	to your .xinitrc or other startup file:
	    eval `svenv -display unix:0.1 -env`
	    olvwm -display unix:0.1
	) &
	Later releases of olwm and olvwm do this automatically.
	You can also run switcher -e 0 to get rid of the messages.  Also, see
	the note about contool, above.

@ 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.
    Keep comments by using "comment." instead of "!", for example,
	comment.*.font: Palatino-Italic-37

@ 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
    See under "Trouble Shooting: Strange Error Messages" below.

    (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 do 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

	OpenWindows 3.3 is based on X11R5, so you don't need to do this.
	In fact, you might as well simply stick to the Xsun server provided
	by Sun, unless it turns out to be buggy.  OpenWindows 3.3 (or 4.0?)
	will probably be released (with Solaris 2.3?) later this year.

    See Also:
	Environment Variables (especially XFILESEARCHPATH).

@ I get error messages on my screen about not found
    set LD_LIBRARY_PATH to be /usr/openwin.  If you also use X11, use
    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 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.
    Note that the data files are in PostScript, so you can look at them with
    a PostSript viewer (q.v.).

@ Why aren't there any fish in realxfishdb?
    A fixed version of realxfishdb is available by ftp from [] as /pub/realxfishdb.Z

@ Why is the Properties choice disabled in the Window menu?
    It isn't implemented yet.  Many programs do respond to the Properties
    Key (L3), though, or have a pop-up menu with Properties on it.
    Under Solaris 2, programs using the NeWS toolkit (TNT, q.v.) take one
    last sneer at X by providing a Properties menu that lets you rotate or
    scale the window!  Try $OPENWINHOME/demo/{rap,jet,jed,text} for example.

@ 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.
    Fixed in Solaris 2, and presumably in the XView 3.2 distribution.

@ When I run OLIT programs, some of the widgets are red!
    Release 3 of OLIT added mouseless operation; action widgets can be
    selected via the keyboard.  The currently selected item is highlighted
    in red (the `Red Stain') to show that it has the input focus.
    To disable it in most places, add this to your $HOME/.Xdefaults file:
	*traversalOn: off
	*TextEdit.traversalOn: on
	*TextField.traversalOn: on
    You can change the color using (for example)
	*InputFocusColor: grey50
	*input*FocusColor: green
	*List*inputFocusColor: <your background color>
    See the man page resources(3w), at the start of the OLIT 3 Widget Set
    Reference Manual included in the OpenWindows 3 programmer documentation.
    Meanwhile contact your distributor and ask for patch id 100451-30, the
    OLIT/3.0 CTE Jumbo Patch.

    Solaris 2 includes an OLIT that uses the Giant Caret, just like XView.

@ When I run several programs, the colors on the screen all change when
  I move into a different window! ("colormap flashing")
    This is becasue most hardware can only display a few colors at a time.
    However, you can minimise the effect with the following procedure:
    *  Start all the applications with colors that you wish to reserve.
    *  Run
	cmap_compact save
       to create the .owcolors file
    *  Put the line
	cmap_compact init
       near the start of your start-up file (.xinitrc or .openwin-init) if
       it is not already there.
    *  Exit and then restart the window system.
    *  cmap_compact init will push those colors .owcolors to the end of
	the colormap and reserves them.

    Also note that control-L2 locks the colors of the current window, and
    Control-L4 unlocks them -- this is described in the olwm manual page.

@ pageiew uses the wrong colors, or makes the colormap flash (see above):
    This problem was reported by people for some reason running the Motif
    window manager (mwm) with OpenWindows.
    Try running pageview like this:
	$OPENWINHOME/bin/reservecolors -svmono
	$OPENWINHOME/bin/reservecolors -discard

@ 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.
    (You can't run SunView programs on an X terminal, of course!)
    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 as 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'

@ Motif applications make my screen hang
   Apply patch 100444-77.
   Note that Motif menus that lock up the screen can be taken down by
   pressing Escape at them.

[the xview section is now posted separately]

Parent document is top of "OPEN LOOK GUI FAQ 01/04: General"
Previous document is "Trouble Shooting: Not authorized to use display"
Next document is "Environment Variables"