X server insecure (must use xauth-style authorization)

Purpose: Give instructions on how to get a secure X server so that the send command in Tk will work without giving the error message:

    X server insecure (must use xauth-style authorization)

Let's begin by noting that if you get this error message, you have a serious security problem. Anyone, anywhere on the Internet, can steal control of your X server and masquerade as you. Tk is just reporting a problem that's already there.

Now let's get on to fixing it!

There are several ways that you can go about getting Tk working if you have this problem. Which is right for you depends on what sort of system you're using, what sort of display you're using, and how much you can ask of your system administrator.

If you work through the following checklist, you'll be directed to various possible solutions. You'll discover that my (KBK) personal preference is strongly in favor of using the X Display Manager Communication Protocol (xdmcp), and most of the suggestions lean in that direction.

How do you log on to your X system?

(A) - Xserver started during login
When I arrive, my screen looks like a dumb terminal (text-only) and shows a prompt with something like login: or Console login:. When I log in, I type something like xinit or x11start (or my .login or .profile does it for me), and X starts up.
(B) - Login via Xserver
When I arrive, my screen is already running a window system, and has a little window in the center that prompts for user ID and password.
(C) - Using a system where the Xserver is not primary
I use a personal computer (Mac, PC, whatever) with X software such as eXceed, PC-XView, or eXodus.
(D) - Specialist terminals
I use an X terminal and start an xterm or other application on my host from a menu or start-up dialog.
(E) - Exotic configurations
I do something else.
    • Please post to comp.lang.tcl with your setup; there are people there that can help out. If you do figure out what to do, by all means update these pages so that other people will have the answer too.