If you're going with this type of solution, a better way is:

xhost +local:

which allows local *non-TCP* connections but keeps all network 
connections shut off.

Maybe it's just a bit of paranoia, but it can help. Just remember, 
*never* do "xhost +". :)

On Monday, Aug 19, 2002, at 23:40 US/Central, Matthew S. Hallacy wrote:

> On Mon, Aug 19, 2002 at 10:29:44PM -0500, Peter Clark wrote:
>> 	This should have a simple answer: there are times when I want 
>> processes owned
>> by other users to spawn windows in my current X session. What 
>> settings do I
>> enable / change to avoid the dreaded "Xlib: connection to ":0.0" 
>> refused by
>> server" and "Xlib: Client is not authorized to connect to Server" 
>> messages
>> from appearing?
>> 	:Peter
>>
>
> xhost +localhost
>
> man xhost
>
> -- 
> Matthew S. Hallacy                            FUBAR, LART, BOFH 
> Certified
> http://www.poptix.net                           GPG public key 
> 0x01938203
> _______________________________________________
> Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul, 
> Minnesota
> http://www.mn-linux.org
> tclug-list at mn-linux.org
> https://mailman.mn-linux.org/mailman/listinfo/tclug-list
>
Pacem in terris / Mir / Shanti / Salaam / Heiwa
Kevin R. Bullock