xauth
X11 authorization credential management
TLDR
List all authorization entries
$ xauth list
Display authority file info$ xauth info
Add an authorization entry$ xauth add [display_name] [protocol_name] [hex_key]
Generate a new authorization entry via the server$ xauth generate [display_name] [protocol_name]
Remove an authorization entry$ xauth remove [display_name]
Extract entry for the current display to a file$ xauth extract [path/to/file] $DISPLAY
Merge entries from a file$ xauth merge [path/to/file]
Use a specific authority file$ xauth -f [path/to/file] list
SYNOPSIS
xauth [options] [command [args]]
DESCRIPTION
xauth edits and displays the authorization information used for connecting to X servers. It manages the ~/.Xauthority file (or the file specified by the XAUTHORITY environment variable) which contains credentials for X11 authentication.The tool is commonly used to extract authorization records from one machine and merge them on another for remote display access, X11 forwarding over SSH, and managing X security.
PARAMETERS
-f FILE
Use the specified authority file instead of ~/.Xauthority.-v
Verbose mode. Print status messages for operations.-q
Quiet mode. Suppress unsolicited status messages.-i
Ignore authority file locks.-b
Attempt to break stale authority file locks.-n
Do not resolve hostnames; display stored addresses directly.-V
Display the xauth version number.
COMMANDS
add DISPLAY PROTOCOL HEXKEY
Add an authorization entry for the indicated display.generate DISPLAY PROTOCOL [options]
Contact the server to generate and add an authorization entry.remove DISPLAY
Remove matching authorization entries.list [DISPLAY]
List authorization entries (all if no display specified).nlist [DISPLAY]
List entries in numeric format.extract FILE DISPLAY
Write authorization entries to a file.nextract FILE DISPLAY
Extract entries in numeric format for non-binary transmission.merge FILE...
Read and merge authorization entries from files.nmerge FILE...
Merge entries in numeric format.source FILE
Execute xauth commands from a script file.info
Display information about the authority file.exit
Save changes and exit.quit
Exit without saving changes.help
List available commands.
CAVEATS
Authority files contain sensitive credentials and should have restrictive permissions (readable only by the owner). X11 forwarding with SSH requires proper xauth setup. The program does not contact the X server except when the `generate` command is used.
