Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the xhost command in Linux

2025-03-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to use the xhost command in Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Linux common commands xhost command is the access control tool of X server, which is used to control which X clients can be displayed on X server.

Xhost which X clients can be displayed on the X server

Add that the command must be run from a machine with a 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, log out of the system before making any changes.

Syntax xhost (parameter) parameter +: turn off access control, allowing any host to access the local X server

Turn on access control to allow only hosts in the authorization list to access the local X server.

Entering the invariant xhost command displays the current hostname of the access X server and displays a message indicating whether access is enabled.

For security reasons, options that affect access control can only be run from the control host. For workstations, this machine is the server. For the X terminal, this machine is the login host.

To enable remote names by default, you can define the name in the / etc/X?.hosts file, where? The display number for which access is enabled.

For example, the display jeanne:0 can be accessed by a 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 the display letter that the defined remote system allows access through enhanced X-Windows.

Note: the-name parameter defines the hostname to remove from the X server access list. Existing connections have not been interrupted, but new connection requests will be rejected. Note: the current machine can be removed; however, no further connections are allowed (including trying to add it back). The only way to enable local connections again is to reset the server (and thus break all connections).

Thank you for reading! This is the end of the article on "how to use xhost commands in Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report