See a lot of friends on the Ixpub to encounter questions about the Xhost command, such as an error: Xhostunabletoopendisplay
Many do not get very well solved, in fact, the use of this command is very simple, as long as familiar with the use of the command, there will not be so many problems, the following first to say the use of this command, and then combined with the question, said that the problem encountered such a solution.
Xhost command
Use
Controls who can access the enhanced x-windows on the current host.
Grammar
xhost[+ | -] [Name]
Describe
The xhost command adds or deletes a host name on the list of machines that the X server accepts connections to.
The command must be run from a machine that has a graphical display connection. You can remove a name from the access list by using the-host parameter. Do not remove the current name from the access list. If you have already done so, please unregister the system before making any changes.
Entering the Xhost command with no variables displays the current hostname of the Access X server and displays a message indicating whether access is enabled.
For security reasons, only the options that affect access control can be run from the control host. For workstations, this machine is the server. For X terminals, this machine is a login host.
To enable remote names by default, you can do so in/etc/x?. The Hosts file defines the name, where? The monitor number that is enabled for access.
For example, the monitor jeanne:0 can be accessed by the system defined in the/etc/x0.hosts file on a system that uses the default hostname of Jeanne. In the display name and file name, 0 indicates that the defined remote system allows the display number to be accessed through enhanced x-windows.
Sign
+name defines the host name to be added to the X server access list (the plus sign is optional).
-Name defines the host name to be dropped from the X server access list. An existing connection is not interrupted, but a new connection request is rejected. Note: You can drop the current machine; However, further connections are not allowed (including attempts to add it back). The only way to enable a local connection again is to reset the server (and therefore all connections are interrupted).
+ Specifies that access is unrestricted. Access control is closed.
-Open access control.
The full Name has the following family:name syntax:
inet
Internet host
Local
Contains only one name, empty string
Note: This series is case-sensitive. The format of the name varies with the series.
As long as you understand the use of the command, the above problem will be solved, generally in the installation of Oracle will appear this problem, because the installation of Oracle requires graphics interface support!
The general solution to such problems is:
First, xhost+ under the root.
How to start a desktop service on a remote client, you need to set the client's display value (EXPORTDISPLAY=IP (client's IP address, you want to set the other address, you can not see the graphic): 0.0
If it is performed on this computer, execute Exportdisplay directly to the Oracle graphical user
If the above settings, or can not start graphics, it is necessary to check the system graphics interface support issues, such as whether or not to install graphics programs, have the right to perform graphics programs. Or the System screen graphics function and so on.
The final execution./runinstaller will do.