I'm trying to get rid of the .Xauthority file in my home directory.
The arch wiki suggests defining
export XAUTHORITY="$XDG_RUNTIME_DIR"/Xauthority
but neither placing this line in .profile nor adding
XAUTHORITY DEFAULT=${XDG_RUNTIME_DIR}/Xauthority
to .pam_environment does the trick:
- Using .profile, logging in stops working and I'm returned to the login screen.
- Using .pam_environment, the env var doesn't seem to be set, as
echo $XAUTHORITYreturns/home/user/.Xauthority.
Note that ICEAUTHORITY DEFAULT=${XDG_RUNTIME_DIR}/ICEauthority works as expected.
XAUTHORITYto something different on the user side is going to help unless you also persuade your DM to actually write the file there - see for example change location of $HOME/.Xauthority – steeldriver Sep 30 '17 at 14:34