Re: xhost-command in Debian11
On Fri 22 Oct 2021 at 08:25:36 (-0600), Charles Curley wrote:
> On Tue, 15 Jun 2021 21:51:28 +0200
> <tomas@tuxteam.de> wrote:
>
> > Try adding
> > the option `--whitelist-environment=DISPLAY to your su command (hint:
> > you can add more variables to that whitelist, comma separated).
>
> I just tried this. No joy.
>
> charles@jhegaala:~$ echo $DISPLAY
> :0.0
> charles@jhegaala:~$ su -
> Password:
>
> Today is Setting Orange, the 3rd of The Aftermath, 3187. P'tang!
> root@jhegaala:~# exit
> logout
> charles@jhegaala:~$ su --whitelist-environment=DISPLAY -
> Password:
>
> Today is Setting Orange, the 3rd of The Aftermath, 3187. This statement is false.
> root@jhegaala:~# echo $DISPLAY
> :0.0
> root@jhegaala:~# xclock &
> [1] 311078
> root@jhegaala:~# No protocol specified
> Error: Can't open display: :0.0
>
> [1]+ Exit 1 xclock
> root@jhegaala:~# emacs &
> [1] 311095
> root@jhegaala:~# No protocol specified
> Display :0.0 unavailable, simulating -nw
> fg
> emacs
> root@jhegaala:~#
I think you need su --whitelist-environment=DISPLAY,XAUTHORITY -
Cheers,
David.
Reply to: