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 of Linux

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

Share

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

This article mainly shows you "how to use Linux xhost command", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use Linux xhost command" this article.

The Linux xhost command controls which X clients can be displayed on the X server by controlling X server access.

Grammar

Xhost [+ | -] [Name]

"+" means to increase and "-" means to remove

Description

Xhost is used to control X server access.

Usually when you log in from hostA to hostB to run an application on hostB, as an application, hostA is client, but for graphics, it is displayed on hostA, and you need to use hostA's Xserver, so hostA is server. So before logging in to hostB, you need to run xhost + on hostA to enable other users to access hostA's Xserver.

Xhost + enables all users to access Xserver.

Xhost + ip enables users on ip to access Xserver.

Xhost + nis:user@domain enables nis user user on domain to access

Xhost + inet:user@domain enables inet users on domain to access

The xhost command adds or removes hostnames from the list of machines on which the X server accepts connections.

This 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.

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 use / etc/X? The name is defined in the .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 option 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).

The above is all the contents of the article "how to use Linux's xhost commands". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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