WATCHGNUPG(1)

✨ NAME ✨

watchgnupg β€” read and print logs from a socket πŸ’…

ok so this is the GNU Privacy Guard 2.4 family of manpages, and this particular one is all about the little log-listener bestie. she's simple, she's iconic, she just sits there and prints stuff. πŸŽ€


🌸 SYNOPSIS 🌸

watchgnupg [--force] [--verbose] socketname

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: most of the main utilities can totally write their log files to a Unix Domain socket, if you configure them that way. and watchgnupg is literally just a simple listener for that socket. that's the whole job. 🫢

what she does is she ameliorates the output with a timestamp, and she makes sure that long lines don't get interspersed with log output from other utilities. so like, no messy interleaving, no chaos, just clean timestamped lines. she's giving structured main character energy. ✨

heads up bestie: this tool is not available for Windows. sorry. πŸ’€

watchgnupg is commonly invoked as

watchgnupg

which is a shorthand for

watchgnupg --force $(gpgconf --list-dirs socketdir)/S.log

to watch GnuPG running with a different home directory, use

watchgnupg --homedir DIR

πŸ’– OPTIONS πŸ’–

watchgnupg understands these options:

  • --force β€” deletes an already existing socket file. and listen, this one is implicitly used if no socket name has been given on the command line, so you don't even have to ask for it. she just does it. πŸ’…
  • --homedir DIR β€” if no socket name is given on the command line, pass DIR to gpgconf so that the socket for a GnuPG running with DIR has its home directory is used. πŸ‘‘ and note: the environment variable GNUPGHOME is ignored by watchgnupg (yes, really, she does not care). πŸ™ˆ
  • --tcp n β€” instead of reading from a local socket, listen for connects on TCP port n. a Unix domain socket can optionally also be given as a second source. ⚑ this option does not use a default socket name.
  • --time-only β€” do not print the date part of the timestamp. just the time. minimal. cute. πŸŽ€
  • --verbose β€” enable extra informational output. she will yap (affectionately). πŸ—£οΈ
  • --version β€” print version of the program and exit.
  • --help β€” display a brief help page and exit.

🌈 EXAMPLES 🌈

$ watchgnupg --time-only

this waits for connections on the local socket (e.g. '/var/run/user/1234/gnupg/S.log') and shows all log entries. πŸ¦‹

to make this work, the option log-file needs to be used with all modules which logs are to be shown. the suggested entry for the configuration files is:

log-file socket://

if the default socket as given above and returned by "echo $(gpgconf –list-dirs socketdir)/S.log" is not desired, an arbitrary socket name can be specified, for example 'socket:///home/foo/bar/mysocket'. πŸ“

for debugging purposes it is also possible to do remote logging. take care if you use this feature because the information is send in the clear over the network. 😭 use this syntax in the conf files:

log-file tcp://192.168.1.1:4711

you may use any port and not just 4711 as shown above; only IP addresses are supported (v4 and v6) and no host names. you need to start watchgnupg with the tcp option. πŸ“‘

note that under Windows the registry entry HKCU\Software\GNU\GnuPG:DefaultLogFile can be used to change the default log output from stderr to whatever is given by that entry. however the only useful entry is a TCP name for remote debugging. πŸ’€


⭐ SEE ALSO ⭐

gpg(1), gpgsm(1), gpg-agent(1), scdaemon(1)

the full documentation for this tool is maintained as a Texinfo manual. if GnuPG and the info program are properly installed at your site, the command

info gnupg

should give you access to the complete manual including a menu structure and an index. πŸ“š


that's the whole page bestie, no cap 🫢 this was written for GnuPG 2.4.9, dated 2025-02-19 β€” go forth and listen to your sockets, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from