Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z - Internet FAQ Archives Frequently Asked Questions (FAQ) 6/7

( Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - MultiPage )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Restaurant inspections ]
Archive-name: x-faq/part6
Last-modified: 1996/09/26

See reader questions & answers on this topic! - Help others by sharing your knowledge

Subject: 111) Where can I find X tools callable from shell scripts? I want to have a shell script pop up menus and yes/no dialog boxes if the user is running X. Several tools in the R3 contrib/ area were developed to satisfy these needs: yorn pops up a yes/no box, xmessage displays a string, etc. There are several versions of these tools; few, if any, have made it to the R4 contrib/ area, though they may still be available on various archive sites. XScript, a collection of X shell scripts, is on under /pub/motif/xscript and also on; it includes several stand-alone X applications which can be embedded in shell scripts. XScript requires tclMotif 1.0 or later. In addition, Richard Hesketh ( has posted the xmenu package to comp.sources.x ("v08i008: xmenu") for 1-of-n choices. [7/90] Two versions of XPrompt have been posted to comp.sources.x, the latter being an unauthorized rewrite. [R. Forsman (, 1/91] There is a version of XMenu available from comp.sources.x; it is being worked on and will likely be re-released. xp-1.1.tar.Z, xpick-1.1.tar.Z and xzap-1.1.tar.Z on's R5contrib/ are tools by which act as X versions of the simple display and choice-making tools in K&P. [4/92]
Subject: 112)! Where can I get an X-based debugger? The Data Display Debugger (DDD) is a Motif user interface to GDB and DBX. DDD provides a graphical data display in which data structures are displayed as graphs. A simple mouse click dereferences pointers or views structure contents. Sources are available via FTP from [4/96]; binaries (Sun, Linux, and others) are available from . See also for reference information. Cygnus Support puts out GDBtk, which is a tcl/tk based interface that is compiled into GDB. GDBtk 4.15.1 is available from, as pub/gdbtk/gdbtk-4.15.1.tar.gz. [4/96] UPS is a source-level debugger which runs under the X11 (and SunView) window systems on Sun, DEC, and Linux platforms. It is available from , along with several binaries. Also in that archive is a 3.14 beta and a 3.7 alpha [7/95]. Rod Armstrong ( has made some unofficial enhancements; they are at and . xdbx, an X interface to the dbx debugger, is available via ftp from . The current and apparently final version [1/91] is 2.1 patchlevel 2. An X interface to gdb called xxgdb is similar to xdbx 2.1.2. Sources are on [3/96]. mxgdb is a Motif interface to gdb by Jim Tsillas (; version 1.2.1 is on [3/96]. Also: Certain vendors (MIPS, Sun, SCO) ship X-based debuggers. Sun's SPARCworks is an integrated development environment. CenterLine's CodeCenter (617-498-3000) source-level debugger, available on most major platforms, includes an X-based interface. The PDB debugger is part of the OI distribution. The Energize Programming System developed by Lucid and now sold by Tartan is a tightly-integrated development environment for C and C++ programs. Energize incorporates a graphical user interface on top of an extended version of gdb. Info:, +1 412-856-3600.
Subject: 113) Is there a "pseudo-tty" or fake X display I can use? Applications often have a need to run against an X display which isn't tied to a physical display -- perhaps to make a screendump, or to run when the software expects to have an open display. In these cases, the X Virtual Frame Buffer can be used. It is a full X server which doesn't open any devices (the output can be a memory-mapped file) but which otherwise behaves as an X display. It is also useful for testing. The Xvfb is part of the X11R6 distribution, in programs/Xserver; set the configuration option in config/{machine}.cf to build the distribution with this server.
Subject: 114)! How can I "tee" an X program identically to several displays? There are several protocol multiplexor tools which provide for the simultaneous display of X clients on any number of machines. This ability to echo one display onto another is useful for demo purposes, for teaching, and for testing. Other related programs are useful as conferencing mechanisms; they typically involve several parties, with the results of the electronic conference visible on all screens: XMX (an X Protocol Multiplexor) is a standalone utility for sharing an X Window System session on multiple displays. XMX takes advantage of the networked nature of the X Window System by acting as an intermediary between X clients and X servers. In this way, XMX works with any X clients and any X servers, without the need to modify either. XMX accepts multiple X client connections, and displays client graphics on multiple X displays. XMX paints the same graphics on all servers, providing a WYSIWIS (What You See Is What I See) environment. An upcoming version is being developed. In the current version, one machine controls input while all others are passive observers, an arrangement which does not allow private work. XMX version 1 multicasts a complete X session (as opposed to individual windows) to any number of X servers. The X server which provides input to the shared X client applications (the "master") is established at setup time and remains fixed throughout the session. Similarly, the "slave" servers which participate in the multicast are established at the start. There is no facility for adding or removing a server to or from the session. The software is available at . For more info see . [6/96] XTV is a conference program which can be used to duplicate the "chalkboard" on several displays. Release 1 is available on the X11R5 contrib tapes; a more recent version [7/95] is on ; binaries for several systems and source are there. Information: [6/96] Shared X, a modified X library to give dynamic multi-display support, by Michael Altenhofen (, was done as part of the NESTOR project being conducted at Digital CEC Karlsruhe in collaboration with the University of Karlsruhe. (The NESTOR project is described in "Upgrading A Window System For Tutoring Functions", Michael Altenhofen et al., in the proceedings of the EXUG Conference 11/90.) It provides "naive" X applications with the capability to work with several displays simultaneously, dynamically add and remove new displays and hand input control from display to display. shX was mainly intended to be used in a student/tutor environment, where the tutor would need to see the students current work, make some modifications to it on-line and would then drop out of the application again. It may be generally useful for group work and presentations. Sources are on . [6/96] Modifications to shX for color mapping and private color allocation by Mark J. Handley ( are on . XTrap is an extension to X that facilitates user emulation; it can be used to record and then replay an X session. Device input synthesis, device input monitoring, and grapics request output monitoring are supported by XTrap. XTrap comes with a client-side library which makes the new functionality easier to use in an X application. XTrap also comes with sample clients which demonstrate the various capabilities of the extension and library. Please see the man page within programs/xtrap/ for more information. It is available as . (Note: the XTEST and RECORD extensions in R6 provide input synthesis and protocol recording respectively. Taken together, they provide functionality similar to XTrap.) [6/96] The program "wscrawl" is a demo of the networking capabilities of X-Windows. Wscrawl can be thought of as a paint program shared between multiple people, displays, and workstations. Any number of people can draw independently of each other, yet they all work on the same picture. The word "wscrawl" stands for "window-scrawl". The user may think of wscrawl as a paint program shared by any number of people at the same time. When wscrawl is run, it opens up a separate window on each participant's display. From that point onward, each participant sees the actions and ideas of every other participant as they occur. Each individual may simply watch, or participate at any moment. Any individual may exit out of the session at any time without affecting the other participants. Sources are on . [6/96] Shdr (by Rank Xerox EuroPARC) implements a simple shared whiteboard, with scribble-style drawing and text drawing. The drawing surface is entirely shared and entirely unstructured, being simply a bit plane. The mouse acts either as a pen (in 'draw') mode or an eraser (in 'erase' mode). When no mouse button is pressed, it acts as a pointing device; movements are echoed on the remote screen. It features continuous telepointing to both sides, so there's no mode switch between marking, pointing and entering text. There's no chalk-passing mechanism; both sides can make/erase marks at once. The drawing object is replicated on both sides, so that the network traffic is reduced. Sources are on 1.3a appears to be the final version. [6/96] xmove is a pseudoserver (aka proxy server) which allows you to dynamically move an X application between servers See The X Resource (Summer 1994) for an article on the motivation for and construction of xmove. Version 1.2f is current [6/96]; sources are on . Vartalaap is a multiparty multimedia conferencing system that works over Unix sockets; the interface is based on XView. It's available at Collage is a synchronous collaborative data analysis tool for use over the Internet. Features include a shared whiteboard, screen capture/sharing, a shared text editor, and data-analysis tools. Sources are on . TeamRooms provides "shared spaces" on the Internet allowing groups to share information. These electronic team rooms provide places to meet in real-time, or a common locale to leave information for other collaborators. TeamRooms combines real-time groupware technologies such as shared whiteboards, chat rooms, and customizable groupware applets with a persistent work environment. A beta 1.0 is at , for several systems. [8/96] GroupKit is a Tcl/Tk extension that provides facilities for building real-time groupware applications such as shared whiteboards, meeting tools, games, discussion tools, etc. The package comes with over 30 sample groupware applications/demos. . [9/96] GroupKit is a Tcl/Tk extension that provides facilities for building real-time groupware applications such as shared whiteboards, meeting tools, games, discussion tools, etc. Version 3.2 was released 8/96. Sources are on . Also of use [commercial products not recently confirmed]: X/TeleScreen is a commercial implementation of a "tee"ing program. Information: Hewlett-Packard Co. has a commercial product, "HP SharedX" which works under HP-UX currently on their 300, 400, and 700 series workstations and their HP 700/RX X Stations. Machines receiving shared windows can be any X server. HP SharedX consists of a server extensions and a Motif based user interface process. Contact your local HP sales rep. for more information. IBM offers a commercial product. Sun offers multi-user confering software called ShowMe. InSoft (Mechanicsburg, PA, USA, 717-730-9501) offers multi-user conferencing software called Communique. Version 3.0 is available on Sun and HP platforms. TeamConference is a product which allows real-time sharing of X windows. For more info: . [Thanks in part to (Tim Scott), 5/91, and to Peter Cigehn (, 8/92 ]
Subject: 115)! Can I use C++ with X11? Motif? XView? The X11R4 and later header files are compatible with C++. The Motif 1.1 header files are usable as is inside extern "C" {...}. However, the definition of String in Intrinsic.h can conflict with the libg++ or other String class and needs to be worked around. Some other projects which can help: WWL, a set of C++ classes by Jean-Daniel Fekete to wrap X Toolkit widgets, is available via anonymous FTP from as R5contrib/WWL-1.2.tar.Z or ( as pub/WWL-1.2.tar.Z. It works by building a set of C++ classes in parallel to the class tree of the widgets. The C++ InterViews toolkit is obtainable via anonymous FTP from InterViews uses a box/glue model similar to that of TeX for constructing user interfaces and supports multiple looks on the user interfaces. Some of its sample applications include a WYSIWIG document editor (doc), a MacDraw-like drawing program (idraw) and an interface builder (ibuild). Many of the ideas in InterViews are being folded into Fresco. THINGS, a class library written at the Rome Air Force Base by the Strategic Air Command, available as freeware on archive sites. Motif++ is a public-domain library that defines C++ class wrappers for Motif 1.1 and 1.2; it adds an "application" class for, e.g., initializing X, and also integrates WCL and the Xbae widget set. This work was developed by Ronald van Loon <> based on X++, a set of bindings done by the University of Lowell Graphics Research Laboratory. The current sources are available from ( in /pub/X11/motif++.28.jul.93.tar.gz; in the UK check Send to to be added to the mailing list. Xm++ is a user interface framework for C++ using the Motif and Athena toolkits. Source is on as contrib/devel_tools/Xm++.0.62.tar.Z; or email to YACL, Yet Another Class Library, by M. A. Sridhar ( implements a general-purpose programming library, using X/Motif and MSWindows for graphical-user-interface needs. Sources are on (, in /pub/yacl. Version 1.5 was released 3/96. Qt is a complete and well-developed object-oriented framework for developing graphical user interface applications using C++. Version 1.0 was released 8/96. For information, contact Troll Tech at, fax +47 22646949, or . A mailing list exists; send the single word "subscribe" to Modello is an object-oriented interface to the Display PostScript System that is designed to provide a foundation for WYSIWYG applications and the tools to built support them. Files are in . A beta release became available 4/96. V is a portable C++ GUI Framework intended to develop a wide variety of applications on different graphical interface platforms. Most standard GUI objects are supported by V, including windows with menus, status bars, tool bars, and a drawing canvas; modal and modeless dialogs with the most common controls (buttons, lists, labels, text entry, check and radio buttons, etc.); and portable printing support. Sources are on and on . Version 1.05 was released 2/96. Xl is a protocol implementor for C++; see . The xarm C++ wrapper to Motif is at 1.2.1 [12/95]; it is at . The Theseus++ User Interface Toolkit Release 2.5.2 is a copylefted C++ user-interface toolkit for X and Motif. Sources are on in /pub/Theseus++/theseus++-2.5.2. The source code examples for Doug Young's "Object-Oriented Programming with C++ and OSF/Motif" [ISBN 0-13-630252-1] do not include "widget wrappers" but do include a set of classes that encapsulates higher-level facilities commonly needed by Motif- or other Xt-based applications; check in R5contrib/young.cxx.tar.Z. This software is now being produced commercially as "ViewKit" by SGI; ICS is a reseller ( ). The Hungry Programmers have written a ViewKit toolkit; the Hungry ViewKit is available under Gnu Public License terms from: . Info: UIT is a set of C++ classes embedding the XView toolkit; it is intended for use with Sun's OpenWindows Developers Guide 3.0 builder tool. Sources are on as R5contrib/UIT.tar.Z. This tool may since have become GIT (GNU Interactive Tools). The Andrew User Interface System provides a rich C++ toolkit. Version 6.3 is on the R6 tapes. You may be able to use the Remote Andrew Demo service to try this software; try "finger" for help. Version 7.4 is now [8/96] available; see . The DD++ library is a C++ wrapper for the Motif 1.2 drag and drop preregister protocol; sources are on [3/95]. A "minimal Motif C++ library wrapper" (using GNU Public License terms) is available from in as /pub/products/Xad. Information is available from Rogue Wave offers "View.h++" for C++ programmers using Motif. Info: 1-800-487-3217 or +1 503 754 2311. wxWindows from the Artificial Intelligence group at Edinburgh University is available for Motif and Windows NT/95. It includes a GUI builder. A product called "Commonview" by Glockenspiel Ltd, Ireland, apparently is a C++-based toolkit for multiple window systems, including PM, Windows, and X/Motif. This product is one of an increasing number of C++ toolkits which offer X (typically Motif) as one user-interface choice. Xv++ is sold by Qualix (415-572-0200; fax -1300); it implements an interface from the GIL files that Sun's OpenWindows Developers Guide 3.0 produces to Xview wrapper classes in C++. The Microsoft Foundation Class (MFC) library from Bristol ( is a GUI class library for Windows, Mac, and Motif applications. Pure Software's (formerly ParcPlace's; formerly Solbourne's) Object Interface is a full user-interface toolkit (from Xlib up) developed for C++; it offers both OpenLook and Motif visuals. The OI package includes a builder.
Subject: 116) Where can I obtain alternate language bindings to X/Xt/Motif? Versions of the CLX Lisp bindings are part of the X11 core source distributions. A version of CLX is on the R5 tape; version 5.0.2 [9/92] is on in R5contrib/CLX.R5.02.tar.Z. GNU SmallTalk has a beta native SmallTalk binding to X called STIX (by Steven.Byrne@Eng.Sun.COM). It is still in its beginning stages, and documentation is sparse outside the SmallTalk code itself. The sources are available as /pub/gnu/smalltalk-1.1.1.tar.Z on ( or ( Xm++ for Smalltalk is a class library for building Motif or Athena applications. It can be used with GNU Smalltalk (1.1.1). The main sources are on ( in /pub/Xm++. Prolog bindings (called "XWIP") written by Ted Kim at UCLA while supported in part by DARPA are available by anonymous FTP from [4/93]. These prolog language bindings depend on having a Quintus-type foreign function interface in your prolog. The developer has gotten it to work with Quintus and SICStus prolog. Inquiries should go to Elk, the Extension Language Kit, is a Scheme implementation with Scheme bindings to Xlib, the Programmer's Interface of Xt, the Athena widget set, and the OSF/Motif widget set. Sources are in as contrib/devel_tools/elk-3.0.tar.gz. For more information see also . TCL bindings to Motif 1.[12] by Jan Newmarch ( are on and (in contrib/devel_tools/tclMotif*). Version 1.4 was released 4/95. x-scm, a bolt-on accessory for Aubrey Jaffer's "scm" Scheme interpreter that provides an interface to Xlib, Motif, and OpenLook, is now available via FTP from and Poplog V14.2 is offered by Integral Solutions Ltd. (Phone +44 (0)256 882028; Fax +44 (0)256 882182; Email isl@integ.uucp); it is an integrated programming environment consisting of the programming languages Pop-11, Prolog, Standard ML, and Lisp which are compiled to machine code via a common virtual machine. Pop-11 provides an interface to the X Toolkit which can be accessed from all other Poplog languages. The OLIT, Motif, and Athena widget sets are supported, in addition to the custom Poplog (Xpw) widget set. High-level Pop-11 libraries allow graph drawing, turtle graphics, and the simple creation of basic button/menu based interfaces. WINTERP is an Xlisp-based Motif toolkit (by Niels Mayer) allowing for rapid prototyping and interpretive programming. Its interactive application development and delivery environment features a high-level object-oriented interface to the OSF/Motif Widgets and Xtoolkit, a high-level object-oriented 2.5D graphics/animation widget based on Xtango's path-transition animation paradigm, and facilities for communicating with other Unix processes and data. WINTERP's interpreter is "serverized" so that other applications can communicate with WINTERP-based applications via unix domain sockets, or optionally, through internet domain sockets. WINTERP's built-in interpreter is based on XLISP-PLUS, which is a small, fast, portable, C-implemented interpreter providing a subset of Common-Lisp functionality and a Smalltalk-inspired object system. A major new release, WINTERP 2.03, is on the X11R6 contrib tapes; version 2.03 [7/94] is on in contrib/devel_tools/. Info: See also . The SAIC Ada-X11 (for Ada 83) bindings are through anonymous ftp in /pub from ( and ( There is an X/Ada study team sponsored by NASA JSC, which apparently is working out bindings. Information: Ada bindings to Motif, explicitly, will eventually be made available by the Jet Propulsion Laboratories, probably through the normal electronic means. Advance information can be obtained from, who may respond as time permits. AdaMotif is a complete binding to X and Motif for the Ada language (Ada 83?), for many common systems; it is based in part upon the SAIC/Unisys bindings and also includes a UIL to Ada translator. Info: Systems Engineering Research Corporation, 1-800-Ada-SERC (well! Free Ada95 X11 bindings were commissioned along with the 1995 update of the language definition and are now available as stable beta software from Mitch Gart of Intermetrics (; they are due on the Intermetrics web site very soon. These offer complete thin bindings to Xlib, Xt and Motif. As thin bindings, the normal X documentation (e.g. the O'Reilly series) applies unchanged. Common problems such a string handling and variadic arguments to functions have been solved and are fully described in the accompanying documentation. [Thanks to, 12/95.] There is a binding for X11 and Motif which is in the public domain and takes advantage of Ada 95 features. Although it is still [3/96] being fine tuned, it is largely complete, and is well on it way to becoming the de facto standard for Ada binding to X. Developers around the world are starting to churn out some very impressive demonstration programs, both original and ported from X and Motif demos. For general information on all varieties of Ada bindings including X, check The X11 Ada95 bindings in particular can be located at: The home page for X/Ada development is at [thanks to G. Vincent Castellano,] The X Consortium, although not involved in producing Ada bindings for X, maintains a partial listing of people involved in X and Ada; information is available from Donna Converse,
Subject: 117)! Where can I obtain alternate X toolkits? The Tk toolkit provides a Motif-like object set for use typically with tcl, an interpreted language. See the FAQ list for comp.lang.tcl. The main source area is ( in pub/tcl. Version 7.5 was released 5/96 along with version 4.1 of TK; see for sources and for information. Marx is an interpreted script language based on a C-like syntax. It provides a quick way of creating Graphical User Interfaces in X windows. Besides GUI building, marx also provides simplified schemes for UNIX process control, direct shell command/script execution and inter-client communication via sockets. Version 1.1b1 was released 6/96. See for information. EZWGL, the EZ widget and graphics library, implements a few Motif like widgets and a few OpenGL like graphics commands. EZWGL is released under terms of the GPL. It can be found at . Information: Maorong Zou ( [8/96] ParcPlace (Pure Software?) is making freely available its popular ObjectBuilder and Object Interface (OI) products for the Linux operating system. ObjectBuilder is a GUI builder written completely in C++, that enables UNIX C++ developers to apply the principles of object-orientation to the development of user interfaces. OI, a C++ class library, provides the toolkit foundation for ObjectBuilder. OI implements the look-and-feel of both Motif 1.2 and OPEN LOOK. OI is built directly on top of Xlib and is unencumbered by runtime royalties to any party. ObjectBuilder and OI are very extensible, actively facilitating the use of subclassing to create new, reusable, user interface components. Sources are on in /pub/linux/packages/OI and available from ParcPlace (+1 408 481 9090). Garnet is a Common Lisp-based GUI toolkit. Information is available from
Subject: 118) TOPIC: BUILDING THE X DISTRIBUTION [topic needs updating to R6]
Subject: 119) What's a good source of information on configuring the X build? This FAQ includes information on a number of "gotchas" that can bite you on particular system. However, the best source of general information on building the X11 release is found in the Release Notes. The file is bundled separately from the rest of the release, so if it's become separated from your sources you can FTP another copy separately: the file RELNOTES.[ms,PS,TXT] at the top of the distribution. The file RELNOTES is also available from the xstuff mail server. In addition, O'Reilly & Associates' Volume 8 on X Administration includes information on configuring and building X.
Subject: 120) Why doesn't X11R6 work on Solaris with GCC 2.7.0? There is a misfeature in gcc's handling of -R options; see the Solaris FAQ in in directory /pub/solaris for details and for a fix.
Subject: 121) Why doesn't my Sun with a cg6 work with R5? Apparently gcc is the problem; it seems to produce fine code for all Sun displays except for the cgsix. The new sunGX.o distributed with fix-07 may fix the problem (note: not known to work on Solaris).
Subject: 122) What are these build problems with Solaris 2.5? The problems with Solaris 2.5 are still rolling in. Known problems for now include: - a change to the signature for gettimeofday() which can be solved by setting -D_SVID_GETTOD in the build flags - use of longs with "L" suffixes in the header files, causing the R6 makedepend to fail; no known solution right now other than editing the top-level Makefile to omit the "make depend" step from "make World". Fixed in X11R6.1.
Subject: 123) Why doesn't my Sun with SunOS 4.1 know about _dlsym, etc.? If you get errors with _dlsym _dlopen _dlclose undefined, link with libdl.a. Add "-ldl" to your and eventually to your site.def. You may want to surround it with "-Bstatic -ldl -Bdynamic" if you add it to the EXTRA_LIBRARIES variable, since "syslibs" get added after EXTRA_LIBRARIES on the eventual compilation command; otherwise you may not have a shared libdl. (Or compile the stubs shared.) [thanks to Joe Backo (joe.backo@East.Sun.COM), 12/91]
Subject: 124) What is this "_get_wmShellWidgetClass undefined" error? In SunOS 4.1.2 Sun fixed a shared-library bug in ld which conflicts with the way X builds the shared Xmu library, causing these symbols, notably, to be undefined when building some X11 clients on SunOS 4.1.[23]: _get_wmShellWidgetClass _get_applicationShellWidgetClass Compiling "-Bstatic -lXmu -Bdynamic" is overkill; be sure to set OSTeenyVersion correctly in the config/ file and rebuild X11R5. To solve the problem if you are using OpenWindows 3.0 (X11R4-based Xt), please contact your local Sun office and request the following patches: Patch i.d. Description 100512-02 4.1.x OpenWindows 3.0 libXt Jumbo patch 100573-03 4.1.x OpenWindows 3.0 undefined symbols when using shared libXmu [Greg Earle, earle@Sun.COM; 7/92] A source patch for use with the X11R4 libraries was developed by Conrad Kimball (; it retrofits into R4 some fixes made in R5 to get around this problem. The patch is on in [1/93] R5contrib/X11R4_sunos4.1.2_patch_version3.Z
Subject: 125) Why don't xterm or xinit work on Solaris 2.4? The Solaris FAQ describes a problem in which xinit dies with "user signal 1" and traces it to some changes to and The Solaris FAQ describes the necessary patch to obtain from Sun; the FAQ is available from in directory /pub/solaris. The X fix is to apply fix-11 to X11R6; the problem is fixed in the later patches to X11R6.
Subject: 126) What's this problem with undefined _X symbols on SunOS 4.1.3? Make sure to set the OSTeenyVersion in the mit/config/ file if you see that vast numbers of Xlib functions are undefined in your X11R5 build: >cc -o bmtoa bmtoa.o -O -pipe -L../.././lib/Xmu -lXmu -L/work1/X11R5/lib >ld: Undefined symbol > _XGetVisualInfo > _XFree ...
Subject: 127) Why does cc get used when I build X11R5 with gcc? When X11R5 was written gcc (version 1.X) did not support shared libraries. Those parts requiring shared libraries are compiled with cc, those that don't are compiled with gcc.
Subject: 128) What are these I/O errors running X built with gcc? When I try to run xinit or the Xsun server I get the error "Getting interface configuration: Operation not supported on socket. Fatal server bug! no screens found." Running the gcc fixincludes script apparently didn't work. You can do this simple test: #include <sys/ioctl.h> SIOCGIFCONF Run that through cc -E and gcc -E. The last line of output is the piece of interest; it should be identical (modulo irrelevant differences like whitespace). If the gcc version has 'x' where the cc version has 'i', your fixincludes run didn't work for some reason or other; go back to your gcc sources and run `fixincludes`; then rebuild the X distribution. If they are identical, try running a make clean in mit/server and rebuilding, just to make sure everything gets compiled with the proper include files. [courtesy der Mouse, mouse@LARRY.MCRCIM.MCGILL.EDU; 9/90]
Subject: 129) What are these problems compiling the X11R5 server on SunOS 4.1.1? The file <sundev/cg6reg.h> isn't being found. Sun omitted <sundev/cg6reg.h> from SunOS 4.1.1. Remove the #include from sunCG6C.c and replace it with the line #define CG6_VADDR_COLOR 0x70016000 The file has changed from earlier versions of SunOS and should not be copied from another distribution.
Subject: 130) Can OW 3.0 OLIT programs run with R5 Xt? (_XtQString undefined) This is a bug in the OLIT. _XtQString was an external symbol that existed in X11R4 (upon which OW 3.0's libXt is based). It wasn't documented and was removed in X11R5 (the Consoritum's guarantee of upward compatibility between the R4 and R5 libraries only applied to the documented interface). A workaround is to temporarily set your LD_LIBRARY_PATH to point to the X11R4 or OpenWindows Xt library that you linked the program against. [10/92; from Barry Margolin (; 3/93 from Jeff Francis (]
Subject: 131) How do I get around the SunOS 4.1 security hole? There is a security problem with certain R4 clients (xterm and xload) running under SunOS 4.1 that have been installed setuid root and are using shared libraries; to avoid the problem, do one of these: 1) make the program non-setuid. You should consult your system administrator concerning protection of resources (e.g. ptys and /dev/kmem) used by these programs, to make sure that you do not create additional security problems at your site. 2) relink the programs statically (using -Bstatic). 3) install the libraries before linking and link with absolute paths to the libraries. [from (Bob Scheifler), 12/90] Newer versions of xterm (R5/R6) do this automatically by rebuilding xterm against the newly-installed libraries when xterm is being installed; this prevents an suid program from being built with libraries specified relatively. Note that this may cause an inconvenience when doing the installation from NFS-mounted disks. Xload has been rewritten to avoid the problem.
Subject: 132) How do I get around the frame-buffer security hole? On many systems the frame-buffer is unsecured by default; this permits anyone who can log into your workstation to peek at your windowing session by accessing the frame-buffer directly, or, as less of a privacy issue but perhaps more annoying, to [accidentally] start up a second X session on your console display. Check the man page for fbtab(5). [Thanks to Art Mulder (; 2/93.]
Subject: 134) What is Imake? Imake is not a replacement for the make program; instead, it is a makefile-generator that takes advantages of the include-file and macro- processing capabilities of the C preprocessor cpp to generate makefiles suitable for building software on a particular system. Although it is not specific to X, the X release uses it to help solve a number of the configuration issues that arise in making such a large system widely portable. Imake is difficult to understand, in part because the process by which the system-specific configuration files, system-independent configuration files, and individual Imakefiles are melded to produce a Makefile is not obvious. There have been several different versions of imake; the R3, R4, R5 and R6 versions are different. You can obtain information on imake from these sources: - the release notes and imake man page include information on using Imake to build X - the R6 file xc/config/cf/README contains a list of imake variables - the R4 and R5 release notes and imake man page include information on using Imake to build X - the R4 and R5 file mit/config/README also contains useful information - on the R4 tapes, contrib/doc/imake/imake.tex is Mark Moraes' R3/R4 guide to imake. - the R5 mit/doc/config/usenixws/ contains a paper by Jim Fulton on an early version of Imake - Paul DuBois ( has written a useful explanation of how Imake works and how to use it in configuring X for non- supported systems; the document is available from , or try in the directory ~ftp/pub/imake-stuff; look for (troff) and (PostScript). Some supplemental appendices are nearby. [7/91: document version is now 1.06] They are also available by gopher to under "Primate Center Software Archives". - see "System Administration - Imake: Friend or Foe?" by Dinah McNutt in the November 1991 issue of SunExpert. - German readers should look for "Das Meta-Make / I make, you make / Schwerelos" by Rainer Klute in the June 1992 "iX Multiuser-Multitasking-Magazin", directed at application programmers needing to write Imakefiles. An English-language derivative of this article is in The X Journal, issue 2:1. - The O'Reilly X Resource issue #2 contains Paul Davey's article on demystifying Imake. - Alain Brossard's working document full of tips on Imake is in - O'Reilly has published (7/93) "Software Portability with imake" by Paul DuBois; ISBN 1-56592-055-4. The book's electronic examples and additional software are on in pub/imake-book; imake.tar.Z is a stand-alone imake installation. Also try . [1/91;12/91;5/92;8/92;7/93; 12/95]
Subject: 135) Where can I get imake? Versions are distributed with the R4, R5, and R6 releases. An earlier version is distributed with the X11R3 release; some third-party toolkits redistribute versions of imake along with their own implementations of the template and configuration files. There are no real standards for such configuration files, although most *current* contributed software expects the templates distributed with X11R5 or X11R6. contains the R5 distribution unpacked, so you can pick up imake without picking up the entire distribution. A stand-alone version of Imake, but one stemming from X11R5, is in ( A stand-alone version of Imake, but one stemming from X11R5, is in
Subject: 136) I have a program with an Imakefile but no Makefile. What to do? If you have R4 or later installed on your system, run "xmkmf". This is a script which runs imake for you with the correct arguments. The output is a Makefile configured for your system and based on the Imakefile. Then run make, which will use that new Makefile to compile the program.
Subject: 137) Why can't I link to the Xlib shape routines? When I try to compile certain programs, I get the following link error: Undefined: _XShapeQueryExtension _XShapeCombineMask These routines are actually part of the Shape Extension to X (SHAPE) which was introduced in the X11R4 distribution and allows non-rectangular windows. Like the other sample server extensions, the shape extension will only run on a server which supports it. Pre-X11R4 servers, as well as many vendor-supplied servers, do not support the shape extension, in which case they will display rectangular windows anyway. In order to use the shape extension, you must link to the library libXext.a. In the X11 distribution, this library and the associated includes will be in the mit/extensions directory. If you do not have these files, do not despair: many freeware programs which use the shape extension can also be compiled without it by removing the -DSHAPE define from the Makefile; you can probably do this and compile successfully against your older vendor-supplied X libraries. [from John B. Melby,, 3/91]
Subject: 138) What are these problems with "_XtInherit not found" on the Sun? When I link a X program that I wrote on a SunOS 4.0.3 or 4.1 machine I get the error " symbol not found _XtInherit". What you are seeing is a side-effect of a kludge in the R4 libXt.a to get Sun shared libraries working. Apparently, you can't share a function that is both called and compared, as _XtInherit is. This was handled by putting _XtInherit in the same file as a function that is always used, thereby guaranteeing that it would be loaded -- that is, in Initialize.c, where XtToolkitInitialize() and XtInitialize() reside. These routines would normally be called. You are probably seeing this error because your program is not a normal Xt-based program and does not call XtToolkitInitialize() anywhere. 1) it may be a program that uses Xt functions but never opens a connection to the X server. [OSF/Motif's 1.1.0 UIL had this problem; it called XtMalloc() and other Xt functions.] The solution is to add the call to your program; the function does not have to be executed, just linked in. 2) alternatively, your program doesn't need any Xt functions and is correct in not calling XtToolkitInitialize() -- it may be an Xlib or XView program. In this case, you can remove -lXt from your link command. It should not be necessary to link the shared libraries statically, although this will certainly solve the problem. [from Jordan Hayes (now jordan@Thinkbank.COM) and Danny Backx (; 11/90] You may also see this error compiling X11R5 programs on a SunOS 4.1.3 machine; be sure to set OSTeenyVersion to 3 in the config/ file.
Subject: 140) Why doesn't my program get the keystrokes I select for (sic)? The window manager controls how the input focus is transferred from one window to another. In order to get keystrokes, your program must ask the window manager for the input focus. To do this, you must set up what are called "hints" for the window manager. If your applications is Xlib-based, you can use something like the following: XWMHints wmhints; ... wmhints.flags = InputHint; wmhints.input = True; XSetWMHints(dpy, window, &wmhints) If your application is based on the Xt Intrinsics, you can set the XtNinput resource to be True (as you probably want to in any case); if you don't have source, you can start up the application with the resource '*input:True'. Certain window managers, notably dxwm and olwm, are very picky about having this done. If you are using Sun's OpenWindows olwm, you can also add this resource to your defaults file to use clients that aren't ICCCM-compliant. OpenWindows.FocusLenience: true [mostly courtesy Dave Lemke of NCD and Stuart Marks of Sun]
Subject: 141) How do I deiconify a window? To de-iconify a window, map it with XMapWindow(). To iconify a window, use XIconifyWindow().
Subject: 142) How do I figure out what window manager is running? You can't reliably tell; whatever mechanism you could use could be spoofed in any case. For most cases, you shouldn't care which window manager is running, so long as you do things in an ICCCM-conformant manner. There are some cases in which particular window managers are known to do things wrong; checking for particular hints placed on the window by the window manager so that you can sidestep the problem may be appropriate in these cases. Alternatively, it may be appropriate to determine which window manager is running in order to take advantage of specific *added* features (such as olwm's push-pin menus) in order to give your program *added* functionality. Beware of usurping the window manager's functions by providing that functionality even when it is missing; this surely leads to future compatibility problems.
Subject: 143) Is there a skeleton X program available? There is no general framework such as the TransSkel program for the Macintosh which handles lots of the odds and ends and overhead of development under a window system and which can be used as a platform for additional development. In X, the problem is typically solved by using an interactive application builder tool or by using cut&paste on existing X applications. Good applications which you might look to manipulate when you want to "test just this one little thing" include contrib/clients/xskel, a simple R4 program that puts up a window and allows sketching in it and offers a starting point for quick hacks, the Xaw examples in the examples/ directory in the X distributions, and the Xlib "Hello World" example in the R3 doc/HelloWorld and R4 doc/tutorials/HelloWorld; an updated version of this program which uses R4 Xlib calls and current ICCCM conventions was posted in 2/90 to by Glenn Widener of Tektronix. [3/90] In addition, a sample Xt program (for Xaw or Xm) by Rainer Klute showing how to open multiple displays and how to catch a broken display connection is available on in R5contrib/mdisp.tar.Z. [4/92] A sample multi-display Xt/Xaw program by Oliver Jones is on in R5contrib/MultiUserVote.tar.Z. (See also his article in The X Resource, Issue 3, "Multi-User Application Software Using Xt".)
Subject: 144) How can I incorporate an Xlib program in my Xt program? As older Xlib programs are ported to Xt it often makes sense to preserve their Xlib-ness while still having Xt-based menus, scrollbars, and other GUIisms of current Xt toolkits. The basic problem in merging the two models is in the event-delivery mechanism. In an Xt program, the application enters an infinite loop in XtAppMainLoop() and Xt thereafter dispatches events to widgets without the application's intervention; in contrast, Xlib programs typically track the set of events they are interested in and the possible windows on which those events can occur and hence call XNextEvent directly and then determine what action to take on the event received. One possible solution may be to widgetize the Xlib application. A faster solution is probably to break XtAppMainLoop() into its components (R5 version shown): void XtAppMainLoop(app) XtAppContext app; { XEvent event; for (;;) { XtAppNextEvent(app, &event); XtDispatchEvent(&event); } } and then change the dispatch call to be something like if (!XtDispatchEvent(&event)) my_dispatch_xlib_event(&event); That is, if Xt isn't interested in dispatching the event, it must be an event on one of the windows created via the code incorporated from the Xlib program and can be dispatched in the same way as in the original program. You can also use this technique in Xt programs in order to handle events not normally handled well by Xt; there is support in the translation/action mechanism for being notified of PropertyNotify events, but it may be easier to dispatch the event yourself, perhaps to receive a message from another application on a window whose ID your application has made available.
Subject: 145) Why does XtGetValues not work for me (sic)? The XtGetValues interface for retrieving resources from a widget is sensitive to the type of variable. Your code may be doing something like this: { Arg args[3]; int i; int sensitive; /* oops; wrong data type */ i=0; XtSetArg (args[i], XtNsensitive, &sensitive); i++; XtGetValues(widget, args, i ); ... } But XtNsensitive is a Boolean, which on most machines is a single byte; declaring the variable "sensitive" as Boolean works properly. This problem comes up often when using particular toolkits that redefine the Xt types Dimension and Position; code that assumes they are int will have similar problems if those types are actually short. In general: you are safe if you use the actual type of the resource, as it appears in the widget's man page. [11/90]
Subject: 146) Why don't XtConfigureWidget/XtResizeWidget/XtMoveWidget work? You're probably trying to use these functions from application code. They should be used only internally to widgets; these functions are for a parent Composite widget to change the geometry of its children. An application which calls XtMoveWidget, for example, effectively defeats geometry negotiation and the Composite parent's internal state (if any) will no longer be correct. (The Xt specification goes into more detail.) The only way for your application to request a geometry change for a widget is to issue an XtSetValues call setting some of the geometry resources. Although this call will result in the widget-internal functions' being called, your application code must use the standard XtSetValues interface or risk the widgets' data becoming corrupted. Note that functions defined in <X11/IntrinsicP.h>, as these are, are typically reserved for use by widgets. Other promising functions, XtMakeGeometryRequest() and XtMakeResizeRequest(), are also for use only by widgets, in this case by a child to request a change from its parent. The Xlib calls XMoveWindow() and XResizeWindow() should similarly be avoided; they shouldn't be used to change XtNx, XtNy, XtNwidth, or XtNheight.
Subject: 140)+ How do I check whether an Xt widget is still valid? You may be tempted to use a check like this one to determine whether the widget has yet to be destroyed: (XtWindowToWidget(XtDisplay(toplevel), XtWindow(widget)) == widget) However, this is not a robust solution. It depends on assumptions about how Xt uses memory allocation and how that memory allocation works; in addition, it assumes that no subsequent widgets are created with the same handle and window id. In addition, XtIsWidget() simply checks whether an existing, valid object is a widget or a gadget. It can't be used to check for current existence. In general, you should track destruction, possibly by using XtNdestroyCallback callbacks.
Subject: 147) Why can't I get data back in my callback procedure? You may hit a situation in which using XtAddCallback(button, XtNcallback, CBproc, pointer) doesn't work to retrieve "pointer". Almost certainly, what you are seeing is the effect of using local variables after they are no longer in existence. In the above line of code, "pointer" is probably a local variable declared within the block of code making the call to XtAddCallback; it is valid only within the scope of the callback, and is not valid by the time the callback CBproc gets called. Within CBproc, the client_data argument is pointing to somewhere on the stack -- whereever pointer was when it was used. Short of using global or static data, the best solution is to allocate a pointer to the data you need and free it in the callback routine. Short values such as integers can be passed directly without resorting to this code; nor do you need to do allocations for other data which will be in existence when the callback is called, such as other widgets which haven't been destroyed.
Subject: 148) Why isn't there an XtReparentWidget call like XReparentWindow? Although there are various details of the current implementation of the Xt internals which make reparenting difficult, the major reason that no such call exists is that it remains undefined what the set of resources for the "new" widget should be. Resources are typically set based on the location in the instance hierarchy; what resources should change if the instance moves? What should happen to the widget's children? And by the time such semantics are defined, there would probably be little advantage over destroying the old widget and creating a new widget in the correct location with the desired resources, as setting the resources correctly is the majority of work in creating a new widget. Note that reparenting is possible in the OI toolkit. ---------------------------------------------------------------------- David B. Lewis "Just the FAQs, ma'am." -- Joe Friday

User Contributions:

Comment about this article, ask questions, or add new information about this topic:

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - MultiPage

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer: (X FAQ maintenance address)

Last Update March 27 2014 @ 02:12 PM