LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Why does xhost + work and xhost +si:localhost:root not ? (https://www.linuxquestions.org/questions/linux-software-2/why-does-xhost-work-and-xhost-si-localhost-root-not-4175675952/)

Arno_H 05-26-2020 02:59 PM

Why does xhost + work and xhost +si:localhost:root not ?
 
I have installed a fresh Debian installation on my computer:
#lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster

#uname -mrs
Linux 4.19.0-9-amd64 x86_64

Sometimes I use a graphical interface to execute some system management work. Before executing the sudo su command, I type xhost + and everything works OK. I know that it is not great from a security point of view to oen the X display to everyone, so I would rather execute xhost +si:localhost:root to have the X display only available for me as superuser. However, when I execute this command, I get the following output:
localhost:root being added to access control list
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 109 (X_ChangeHosts)
Value in failed request: 0xe
Serial number of failed request: 7
Current serial number in output stream: 9

What do I need to do to fix this?

smallpond 05-28-2020 09:29 AM

Most network protocols take a dim view of root since root access on some other machine should not be accepted as root access on my machine, so root tends to be special. Maybe do:
Code:

xhost +local:

Arno_H 05-29-2020 03:37 AM

This worked
 
Thanks Smallpond, the command: xhost +local:root worked for me.


All times are GMT -5. The time now is 02:41 AM.