Linux command
xhost 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Display
xhost
Allow
xhost +[hostname]
Deny
xhost -[hostname]
Allow
xhost +
Deny
xhost -
Remove
xhost -[family:name]
说明
xhost manages the X server access control list. It controls which hosts and users can connect to the X display server. Family prefixes include: inet (IPv4), inet6 (IPv6), si (server interpreted), localuser (local user), and local (local connections).
参数
- +_hostname_
- Add host to access list
- -_hostname_
- Remove host from access list
- +
- Disable access control (allow all)
- -
- Enable access control (restrict to list)
- +si:localuser:_user_
- Allow local user
- -si:localuser:_user_
- Deny local user
- +inet:_hostname_
- Allow by IP family
FAQ
What is the xhost command used for?
xhost manages the X server access control list. It controls which hosts and users can connect to the X display server. Family prefixes include: inet (IPv4), inet6 (IPv6), si (server interpreted), localuser (local user), and local (local connections).
How do I run a basic xhost example?
Run `xhost` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does +_hostname_ do in xhost?
Add host to access list