AnswerBun.com

X11 windows created by root

Do windows created by root processes have any special privileges in X11? The X server and the window manager was created by a regular user process.

Unix & Linux Asked by saga on December 31, 2020

2 Answers

2 Answers

Just to be sure that you understand the difference between the X11 window and the process that runs in that window.

For the window itself, see the answer of user414777. The process that creates the window (for example xterm) will have additional privileges when run as root.

However, note the differences:

xterm -e bash gives an xterm window with bash. Both bash and xterm run under your own UID.

sudo xterm -e bash will also create a window with bash, but now xterm and bash run as root.

xterm -e sudo bash creates again a window with bash, but now xtermruns under your own UID and bash runs as root.

Answered by Ljm Dullaart on December 31, 2020

No.

And if you're actually meaning X11 clients instead of X11 windows, it's still No.

There isn't any concept of privileged X11 clients, they're all equal, and they all have access to any X11 resource.

Any client can do any action on any window, including drawing on it or changing its properties (like its title or icon). Any client can grab the keyboard or the mouse. Any client can fake keyboard or mouse input with the XTest extension.

And any client can kick out another client with XKillClient(3) (not related to the Unix kill(2) system call).

Answered by user414777 on December 31, 2020

Add your own answers!

Related Questions

upgrade qt 5.6 to 5.9 in centos 7

1  Asked on November 26, 2021 by junius-l

     

how to send special characters in expect script?

1  Asked on November 26, 2021 by user2925298

       

How to define OpenVPN network in haproxy ACLs

1  Asked on November 26, 2021 by zili

       

How to install clang-10 on Ubuntu 20.4

4  Asked on November 26, 2021

       

Systemd service does not save changes to disk

1  Asked on November 26, 2021 by ken-lin

         

How do I split a file each time a regular expression occurs?

2  Asked on November 26, 2021 by edperez

 

Span /home on multiple partitions

1  Asked on November 23, 2021 by akshat-vats

     

Script to change current directory (cd, pwd)

11  Asked on November 23, 2021 by sony-santos

       

Root cannot change file permission or ownership

6  Asked on November 23, 2021

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.