Graphical Environment Guide
Chapter 4, Running remote programs

Step 2: Setting temporary display access

Step 2: Setting temporary display access

Once the X server is running, you can examine the current host permissions with the following command, from a local scoterm window:

xhost

Use this command on the local machine where the server is running. xhost with no command line options displays a list of machines that currently have access to your display. Use this list to determine if the system-wide configuration provides access to the appropriate host machine.

To add a host to the X server's host access list, execute the following command:

xhost +hostname

If you omit hostname, the X server removes all access restrictions, allowing any client on any machine on the network to access your display.


NOTE: Use xhost + with caution; it allows any user on any machine on the network to access your display.

If there are hosts configured that you do not want accessing your X server, remove them from the server's host access list by running the following command:

xhost -hostname

This command removes hostname from the host access list. If you omit hostname, xhost specifies that no remote host can access your display for the duration of the current session. This option is very useful to reverse the effect of running xhost +.