After I set up X windows I ran into a small problem: I run X windows applications on a number of servers at work (some of them are randomly chosen by the application), but I don't want to have to use "xhost +" to allow any machine to access my X server (doing so opens up all kinds of security risks). Issuing multiple xhost commands in my .cshrc file works well enough, but when .cshrc is run by Terminal.app, I get an ugly error for each xhost command.
The solution I found is to create a file "/etc/X0.hosts" (that's x-zero) which includes the names of all hosts that shall be allowed to open windows on my system. It's global, and thus not an ideal solution, but it works for me.
If you have a better solution please let me know!
Mac OS X Hints
http://hints.macworld.com/article.php?story=2001121018140462