xauth
TLDR
Use specific authority file
$ xauth -f [path/to/file]
Display info$ xauth info
List all entries$ xauth list
Add authorization$ xauth add [display_name] [protocol_name] [key]
Remove authorization$ xauth remove [display_name]
Extract current display$ xauth extract - $DISPLAY
Merge from file$ cat [path/to/file] | xauth merge -
SYNOPSIS
xauth [OPTIONS] [COMMAND]
DESCRIPTION
xauth edits and displays the authorization information used for connecting to X servers. It manages the ~/.Xauthority file which contains credentials for X11 authentication.
The tool is used for X11 forwarding, remote display access, and managing X security.
PARAMETERS
-f FILE
Use specified authority file
COMMANDS
info
Display authority file informationlist
List authorization entriesadd DISPLAY PROTOCOL KEY
Add authorization entryremove DISPLAY
Remove authorization entryextract FILE DISPLAY
Extract entry to filemerge FILE
Merge entries from file
CAVEATS
Authority files contain sensitive credentials. X11 forwarding requires proper xauth setup. File permissions should be restrictive.


