The question is based on the thread.
How can you allow only one user to access the display by xhost?
sudo xhost masi is not working in my fresh Ubuntu 9.10.
Basically the same as John T, but you could add inet or local to the command
First, restrict X server access to those who aren't on the list:
sudo xhost -
then add yourself to the allow list:
sudo xhost +masi