With more observation and some help from colleagues, it turns out the first user to open X11 gets DISPLAY :0.0, the next user to open X11 gets DISPLAY :1.0, and so on. This is 'recorded' in /tmp as .X#-lock files, where # is the display number assigned, which are owned by the user who opened X11. The lock files are removed when X11 is terminated, and the next user to start X11 will get the lowest display number that is available starting with zero (e.g. the display numbers are recycled). Only the lock files seem to deny access to other users. The .X11-unix directory had no impact in our tests.
If this is how your system is working, the fix is to assign the correct display to each user via the 'setenv DISPLAY :#.0' command in the shell start-up (rc) file, where # is the display number. The following tcsh shell script will do this (scans for first 10 displays only) - first loop checks for an active lock by current user first, and the second loop will assign the next available DISPLAY number if the user hasn't already started X11 (assumes X11 will be started after login):
foreach x (0 1 2 3 4 5 6 7 8 9 10)
if ( -o /tmp/.X$x-lock ) then
echo "X11 setup: $USER has an active lock on DISPLAY :$x.0"
setenv DISPLAY :$x.0
goto disp_set
endif
end
foreach x (0 1 2 3 4 5 6 7 8 9 10)
if ( ! -e /tmp/.X$x-lock) then
echo "X11 setup: $USER does not have an active display"
setenv DISPLAY :$x.0
goto disp_set
endif
end
disp_set:
echo "X11 setup: DISPLAY set to :$x.0"
We added this to our .tcshrc files for 'automated' assignments at login or when opening new xterm or terminal windows. There is a slight probability the DISPLAY variable can be changed in the middle of a terminal session (depends on when each user starts/stops X11). If an X-window access error shows up again, the code can be sourced again to quickly fix the DISPLAY assignment.
This was tested successfully on two systems running 10.3.2. Hopefully it will also work on yours, although I can forsee some limitations based on certain apps or remote connections requiring the :0.0 display. Please feel free to clean up the script or offer improvements, I can use all the help I can get in this area!

