On 2023-09-06 14:36:48 +0700, Max Nikulin wrote: > On 06/09/2023 10:41, Greg Wooledge wrote: > > > > Just put "ALWAYS_SET_PATH yes" into /etc/default/su and the problem > > is FIXED. "su" will work properly again! > > Greg, you provided a valid example when "su -" is undesirable, however in > general "su -" is safer than just "su" since it resets some user specific > environment variables like XDG_RUNTIME_DIR=/run/user/1000 that may cause > creation of files that the original user can not overwrite them. So "su -" > should have less unexpected effects.
Yes, XDG_RUNTIME_DIR is problematic, but as "su -" doesn't work in GNU Screen (it yields major display issues), I presume that some environment variables (terminal related?) are still useful. FYI, I had written a su wrapper that unsets XDG_RUNTIME_DIR first. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)