.\" Created from Texinfo source by yat2m 1.47 .TH WATCHGNUPG 1 2024-03-04 "GnuPG 2.4.5" "GNU Privacy Guard 2.4" .SH NAME .B watchgnupg \- Read and print logs from a socket .SH SYNOPSIS .B watchgnupg .RB [ \-\-force ] .RB [ \-\-verbose ] .I socketname .SH DESCRIPTION Most of the main utilities are able to write their log files to a Unix Domain socket if configured that way. \fBwatchgnupg\fR is a simple listener for such a socket. It ameliorates the output with a time stamp and makes sure that long lines are not interspersed with log output from other utilities. This tool is not available for Windows. \fBwatchgnupg\fR is commonly invoked as .RS 2 .nf watchgnupg .fi .RE which is a shorthand for .RS 2 .nf watchgnupg --force $(gpgconf --list-dirs socketdir)/S.log .fi .RE To watch GnuPG running with a different home directory, use .RS 2 .nf watchgnupg --homedir DIR .SH OPTIONS \fBwatchgnupg\fR understands these options: .TP .B --force Delete an already existing socket file. This option is implicitly used if no socket name has been given on the command line. .TP .B --homedir \fIDIR\fR If no socket name is given on the command line, pass \fIDIR\fR to gpgconf so that the socket for a GnuPG running with DIR has its home directory is used. Note that the environment variable \fIGNUPGHOME\fR is ignored by watchgnupg. .TP .B --tcp \fIn\fR Instead of reading from a local socket, listen for connects on TCP port \fIn\fR. A Unix domain socket can optionally also be given as a second source. This option does not use a default socket name. .TP .B --time-only Do not print the date part of the timestamp. .TP .B --verbose Enable extra informational output. .TP .B --version Print version of the program and exit. .TP .B --help Display a brief help page and exit. .P .SH EXAMPLES .RS 2 .nf $ watchgnupg --time-only .fi .RE This waits for connections on the local socket (e.g. \(oq\fI/var/run/user/1234/gnupg/S.log\fR\(cq) and shows all log entries. To make this work the option \fBlog-file\fR needs to be used with all modules which logs are to be shown. The suggested entry for the configuration files is: .RS 2 .nf log-file socket:// .fi .RE 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 \(oq\fIsocket:///home/foo/bar/mysocket\fR\(cq. 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: .RS 2 .nf log-file tcp://192.168.1.1:4711 .fi .RE 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 \fBwatchgnupg\fR with the \fBtcp\fR option. Note that under Windows the registry entry \fIHKCU\\Software\\GNU\\GnuPG:DefaultLogFile\fR can be used to change the default log output from \fBstderr\fR to whatever is given by that entry. However the only useful entry is a TCP name for remote debugging. .SH SEE ALSO \fBgpg\fR(1), \fBgpgsm\fR(1), \fBgpg-agent\fR(1), \fBscdaemon\fR(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 .RS 2 .nf info gnupg .fi .RE should give you access to the complete manual including a menu structure and an index.