3

If I do

xhost +
>access control disabled, clients can connect from any host
su AnotherUser -c xterm

an xterm pops up. However if I do

xhost +SI:localuser:AnotherUser
>localuser:AnotherUser being added to access control list
su AnotherUser -c xterm

I got No protocol specified, I'd like to understand why it doesn't work.

I am in Debian sid amd64

  • Could you edit your question and add the output of xhost after you have added permission for the second user. – X Tian Aug 19 '15 at 18:10
  • I added the output of xhost, which was requested by @XTian, as >output, – user129340 Aug 20 '15 at 07:52
  • 1
    Works for me; similar platform. su -c xclock fails before I xhost +SI:localuser:root and succeeds afterwards. Can you show us what your $DISPLAY looks like, and also the output of xhost with no arguments? – Toby Speight Aug 21 '15 at 12:27
  • @TobySpeight: please note that AnotherUser is a user different from root; xhost is issued by root; the output is access control enabled, only authorized clients can connect SI:localuser:root – user129340 Aug 21 '15 at 15:19
  • Increase verbosity for X server to understand that better (https://bbs.archlinux.org/viewtopic.php?pid=1243478#p1243478). Here they write that problems may be connected to DISPLAY or XAUTHORITY (http://unix.stackexchange.com/a/118826/89346). – Yaroslav Nikitenko Oct 17 '16 at 16:12
  • xhost considered harmful, xauth is more secure. You can maybe use it on a secure network, but don't think that restricting to a particular user will make it more secure. It can only stop accidental connection. – ctrl-alt-delor Feb 02 '19 at 09:37
  • please add output of echo $DISPLAY – ctrl-alt-delor Feb 02 '19 at 09:46

0 Answers0