Skip to content

Instantly share code, notes, and snippets.

@mariotpc
Created March 31, 2023 22:33
Show Gist options
  • Save mariotpc/b0f7b7e913b70acd62ee3cd0290a80f0 to your computer and use it in GitHub Desktop.
Save mariotpc/b0f7b7e913b70acd62ee3cd0290a80f0 to your computer and use it in GitHub Desktop.
xauth sudo not working
Another solution is to merge the .Xauthority file of the current user with that of the root user.
ssh user@host
change the .Xauthority file permissions so that root also has access to it.
sudo su - root
xauth merge /home/users/user/.Xauthority
Test
gedit somefile.log
Credits to:
https://unix.stackexchange.com/questions/241394/ssh-and-sudo-but-no-display
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment