Step 1: Establishing system-wide host access
The X server maintains a list of machines that have
access to your display. This list is contained
in the /etc/Xn.hosts
files on the local machine, where n
represents the display number for which you want to
assign access. The machines listed in these files
are granted access to displays 0 through 7 at the time
the servers are started.
For example, to specify the host machines that are allowed to access
local display :0, add the names of these machines to
/etc/X0.hosts.
Each line in the Xn.hosts files consists of just the name of the host machine that has access to the server. For example, to allow any user on boston to access the tusconey:0 display, add the following line to /etc/X0.hosts on tusconey:
bostonYou must be logged in as root to edit these files. The changes you make take effect when the server is restarted.
Note that any user on a host machine specified in these files has access to your display whenever the X server is running. If you only want to grant access to a host for a single X session, do not modify these files. Instead, see Step 2.
In addition to adding hosts to the Xn.hosts files, be sure to remove hosts that you do not want to have access to your display.