[SOLUTION] Re: Bullseye: setting and using $DISPLAY after su -
On Thu, 31 Dec 2020 22:30:34 -0600
David Wright <deblis@lionunicorn.co.uk> wrote:
> $ /bin/su -
> Password:
> ahost ~# xeyes -display :0.0
> Xlib: connection to ":0.0" refused by server
> Xlib: Client is not authorized to connect to Server
> Error: Can't open display: :0.0
> ahost ~# ln -s ~auser/.Xauthority .Xauthority
Bingo! That, rather than copying .Xauthority, gave me a fix. Thank you.
Now to automate carrying $DISPLAY over. Probably with an alias for su:
alias su="su -w DISPLAY"
> Whitelisting with -w should do nothing for you—knowing the display's
> location doesn't authorise you to use it.
True, but that gets $DISPLAY set up for root.
--
Does anybody read signatures any more?
https://charlescurley.com
https://charlescurley.com/blog/
Reply to: