Tk Send and Xauthority

[previous] [next] [table of contents] [index]

The things that cause the most trouble with new exmh users is the Tk send facility and the Xauthority mechanism. This matters if you use the detached background process or the exmh-async editor wrapper.

The send facility is used for communication between Tk interpreters. The most recent releases of Tk require that you have your X environment set up to use Xauthority. This is a security feature that controls who can display windows on your display. Tk uses the same security mechanism to limit who can send Tcl commands to exmh. The details for setting up Xauthority vary from X server to X server. The basic idea is that before you start the X server, you create a file, ~/.Xauthority, that contains a random bit string. The file is only readable by your user account. You pass the name of this file to the X server when you start it up. Then, each time a window is created, the client programs read this file and pass the random bit string to the server. The idea is that only programs run from your account can read the file to get the right bit string. For the details, read about the -auth or -xauth arguments to your server.

You must also make sure that the old xhost security system is not used. That is, the xhost list must be empty. To do this, run the following command at a shell prompt:

xhost -
The other alternative is to recompile the Tk library with the -DTK_NO_SECURITY compile flag. This is appropriate if your X server just cannot do the Xauthority protocol. You can also do this if your environment is safe enough -- that is, if you don't have to worry about other users popping up rogue windows on your display.

[Table of Contents] [Index] [Previous: Tips] [Next: More Information]

(This section was written by Brent Welch.)
Last change $Date: 1996/06/06 15:14:45 $

This file is from the third edition of the book MH & xmh: Email for Users & Programmers, ISBN 1-56592-093-7, by Jerry Peek. Copyright © 1991, 1992, 1995 by O'Reilly & Associates, Inc. This file is freely-available; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. For more information, see the file copying.htm.

Suggestions are welcome: <>