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 togpgconfso that the socket for a GnuPG running with DIR has its home directory is used. π and note: the environment variableGNUPGHOMEis ignored bywatchgnupg(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
- alpine 3.22: gnupg-doc 2.4.9-r0 Β· GPL-3.0-or-later
- alpine 3.23: gnupg-doc 2.4.9-r0 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms