Risposte:
xhost +SI:localuser:rootconsente rootall'utente di accedere al server X in esecuzione. L'attuale server X è indicato dalla DISPLAYvariabile d'ambiente. xhost +local:fa lo stesso per ogni utente, quindi la rootlinea non è di grande utilità.
La manpage ha spiegazioni ragionevolmente buone:
[+]name The given name (the plus sign is optional) is added to the list
allowed to connect to the X server. The name can be a host
name or a complete name (See NAMES for more details).
...
NAMES
A complete name has the syntax ``family:name'' where the families are
as follows:
...
local contains only one name, the empty string
si Server Interpreted
...
The local family specifies all the local connections at once. However,
the server interpreted address "si:localuser:username" can be used to
specify a single local user. (See the Xsecurity(7) manual page for more
details.)
E la Xsecuritymanpage dice:
SERVER INTERPRETED ACCESS TYPES
The sample implementation includes several Server Interpreted
mechanisms:
IPv6 IPv6 literal addresses
hostname Network host name
localuser Local connection user id
localgroup Local connection group id
Con un po 'di contesto: esistono due modi comunemente usati per consentire l'accesso a un server X. Uno è tramite un Xauthorityfile, che è condiviso dai client e non necessita di ulteriore configurazione sul lato server. L'altro è tramite l' xhostelenco, in cui la configurazione viene eseguita sul server in fase di esecuzione (quindi non si tratta di una modifica permanente).
Quindi, localuserè una parola chiave da conservare così com'è ( rootè il nome utente qui). È un po 'come aggiungere a un gruppo, in quanto i gruppi sono nella comprensione dell'autorizzazione del server. Tuttavia, nessun gruppo di sistema o utente è interessato. Viene modificata solo la configurazione di runtime del server X.
Il comportamento predefinito di xhostquando eseguito senza argomenti è di stampare l'elenco, come dice la manpage:
nothing If no command line arguments are given, a message indicating
whether or not access control is currently enabled is printed,
followed by the list of those allowed to connect.
Per esempio:
$ xhost
access control enabled, only authorized clients can connect
SI:localuser:muru
( muruè il mio nome utente.)
(Dal mio post su Unix e Linux )