LinuxCommandLibrary

xauth

TLDR

Use specific authority file

$ xauth -f [path/to/file]
copy
Display info
$ xauth info
copy
List all entries
$ xauth list
copy
Add authorization
$ xauth add [display_name] [protocol_name] [key]
copy
Remove authorization
$ xauth remove [display_name]
copy
Extract current display
$ xauth extract - $DISPLAY
copy
Merge from file
$ cat [path/to/file] | xauth merge -
copy

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 information
list
List authorization entries
add DISPLAY PROTOCOL KEY
Add authorization entry
remove DISPLAY
Remove authorization entry
extract FILE DISPLAY
Extract entry to file
merge FILE
Merge entries from file

CAVEATS

Authority files contain sensitive credentials. X11 forwarding requires proper xauth setup. File permissions should be restrictive.

SEE ALSO

xhost(1), ssh(1)

Copied to clipboard