Software & Apps Linux Run Software on Different Linux Machines With xhost By Juergen Haas Writer Former Lifewire writer Juergen Haas is a software developer, data scientist, and a fan of the Linux operating system. our editorial process Juergen Haas Updated March 07, 2020 Linux Switching from Windows Tweet Share Email In contrast to the typical use of Windows-based home computers, in Linux/Unix environments, working "on the network" has always been the norm, which explains the powerful networking features of Unix and Linux operating systems. Linux supports rapid and stable connections to other computers and running graphical user interfaces over the network. The primary command for executing these network activities is xhost — the server access control program for X. The xhost program is used to add and delete host (computer) names or usernames to the list of machines and users that are allowed to make connections to the X server. This framework provides a rudimentary form of privacy control and security. Usage Scenario Let's call the computer you are sitting at the "localhost" and the computer you want to connect to the "remote host." You first use xhost to specify which computer(s) you want to give permission to connect to (the X-server of) the localhost. Then you connect to the remote host using telnet. Next, you set the DISPLAY variable on the remote host. You want to set this DISPLAY variable to the local host. Now when you start up a program on the remote host, its GUI will show up on the local host (not on the remote host). Example Use Case Assume the IP address of the local host is 188.8.131.52 and the IP address of the remote host is 184.108.40.206. Depending on the network you are on, you may also be able to use the computer names (domain names) instead of the IP addresses. Type the following at the command line of the localhost: xhost + 220.127.116.11 Log on to the remote host: telnet 18.104.22.168 On the remote host (through the telnet connection), instruct the remote host to display windows on the local host by typing: setenv DISPLAY 22.214.171.124:0.0 (Instead of setenv you may have to use export on certain shells.) Now you can run software on the remote host. For example, when you type "xterm" on the remote host, you should see an xterm window on the local host. After you finish, you should remove the remote host from your access control list as follows. On the local host type: xhost - 126.96.36.199 Quick Reference The xhost command contains just a few variations to help you with your networking: xhost + hostname: Adds hostname to X server access control list.xhost - hostname: Removes hostname from X server access control list.xhost + : Turns off access control (all remote hosts will have access to X server)xhost - : Turns access control back on. Because Linux distributions and kernel-release levels differ, use the man command (% man) to see how xhost is implemented in your particular computing environment.