Article title: Remote Display of Unix server running results. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
In practical work, system engineers often encounter various requirements of enterprise employees. Some time ago, some enterprises proposed to the author that an application should run on the server, but the results should be displayed on the remote client. As shown in, employees can send related parameters to an application software on a Unix server over the network. Then the server uses this software for related computing and processing. Wait until there is a result, and then send the result to the client. For example, some applications may take a long time to compute and analyze data, and employees cannot wait for the results. For this reason, they want the server to directly return the results to their clients after the calculation, so they don't have to wait for the results next to the server.
I. solve this problem through the X client.
A program named X client is provided in the Unix operating system. It was originally a Windows-like management environment, but it has more features than it is. Its running on the network is much better than that on Windows. Why? This is mainly because X client can run a client program on one terminal and output its running results on another terminal. That is to say, the X client program can redirect the computing results of the application software to another client. This is very useful for controlling the display of running results. For example, through this X client program, the user requirements mentioned at the beginning of this article will be solved.
How can this problem be achieved? Generally, you need to set the parameters on the client and server respectively. The following is a detailed description of these settings to help you achieve this configuration in the future.
2. receive client configurations.
Suppose there is a complicated password cracking tool. Due to copyright, security, or server performance restrictions, it can only run on a specific host. If other employees need to use the software, they must run it on the server. However, because of the long running time, it is impossible for employees to wait for the server. Therefore, you must run the client program on a remote computer and then return the result to the local host. However, not all hosts can accept this result. If some employees make pranks and re-output some indecent content to all local computers through this X client, it will lead to employee dissatisfaction. For this reason, the system engineer must first set it on the local client to allow it to receive output results from other hosts.
That is to say, the local service program must allow other computers to output results on the local display terminal. To achieve this goal, you need to use the xhost command. For example, you can run the xhost + server1 command on a local client. It means that any user on the host named server1 can output the running result on this client. Note: When determining whether other hosts are allowed to output running results to the local machine, the client uses the host name instead of the user name. If the server 1 host is allowed to output results locally, if 20 user names are set on the host, the server 1 host is allowed to output results to the local host. System engineers must pay attention to this point during specific configuration. In addition, if the xhost + command is used, that is, the host name is not followed by the + number, it indicates that any remote machine is allowed to output the running result to this host. If you want to cancel this setting in the future, it is also very easy, for example, you only need to use xhost? Command to cancel the related settings.
3. set the output target on a remote machine.
After the client settings allow the remote machine to receive output results, you also need to use the redirection function on the remote machine to output the running results of the client program to another terminal screen. There are many methods to achieve this requirement. I will introduce the most common methods here.
[1] [2] Next page