Xhost
Jump to navigation
Jump to search
The xhost command is used to tell your local X server to allow remote programs from another computer to access your display, keyboard, and mouse. Because there is no distinction of who on the remote computer can use the X server, the xhost method is not a very secure way of enabling remote access. It is better to use xauth or ssh.
Using xhost
To tell your X server to allow access from a particular host:
LocalBox$ xhost +OtherBox.company.com
Then, when you log in to Otherbox, you have to set the DISPLAY variable so that applications know where to show their output:
OtherBox$ export DISPLAY=Localbox.company.com:0
(If you use csh, use the proper syntax instead of the export command.)
To totally remove access control (not a good idea), run the command:
LocalBox$ xhost +