Type the command, with no arguments and no options, that prints whether host-based access control is currently enabled on your X server together with the list of hosts and users allowed to connect.
LPIC-1 Exam 102-500, objective 106. User interfaces and desktops medium
Draft — not checked yet. This question was written from the published exam objectives and cites the clause it comes from, but nobody has yet read it against that clause and signed for it.
It is kept out of search results and out of mock exams until they have. Read the source below before you take the answer as settled.
Answer
Type the answer.
Accepted answer
xhost
Case sensitive — Linux is, and grading LS as ls would teach a falsehood.
Why
Run with no arguments, xhost reports the current state of access control and prints the entries in the host access list. Arguments modify that list: `xhost +hostname` grants a host access, `xhost -hostname` revokes it, and a bare `xhost +` disables access control entirely so any host may connect — a serious risk, since any such client can read your keystrokes and screen contents. Prefer cookie-based authorisation with xauth over loosening xhost.
Where this comes from
- Cited
- manual page xhost(1)
Practise this
Reading one question is not practice. The trainer will draw a set from objective 106 and space the ones you get wrong.