[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: addendum, Re: One-user system.



On Fri, 11 Feb 2022 07:36:10 -0500
Greg Wooledge <greg@wooledge.org> wrote:

> That makes me curious about what has been done to your system, which
> is clearly behaving differently from mine.  "su" with no arguments
> preserves the environment, but "su -" establishes a new environment
> and launches a login shell.  The XAUTHORITY variable should be lost,
> but perhaps something in your shell profile(s) is recreating it.

Indeed. In my /etc/bash.bashrc, I have:

# Allow su to use the display, i.e. whitelist the relevant variables.
alias su="su --whitelist-environment=DISPLAY,XAUTHORITY"

We had a discussion on this list after I had problems with su and
running X clients after moving from Buster to Bullseye. The alias above
came out of that discussion.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/


Reply to: