% !TeX root = sigui-manual.tex
\chapter{User interface}
\section{Run freshclam to test configuration}
\label{sec:runfreshclam}

Pressing this button will launch \gls{freshclam}, and opens a window to show its output.

\begin{figure}[htp]
\caption{SigUI: Updater configuration tab}
\centering
\includegraphics{sigui_run.jpg}
\label{fig:tab1}
\end{figure}

\begin{figure}[htb]
\caption{SigUI: Updater configuration tab}
\centering
\includegraphics{sigui_tab1.jpg}
\label{fig:tab1}
\end{figure}

\begin{figure}[htb]
\caption{SigUI: Local signature management}
\centering
\includegraphics{sigui_tab2.jpg}
\label{fig:tab1}
\end{figure}


The output shows the progress of the update, and any error messages from \gls{freshclam}.
It is recommended that once you change \gls{freshclam.conf}, by clicking \emph{Save settings}, to test it by clicking on \emph{Run freshclam to test configuration}.

The window has a button to forcefully terminate \gls{freshclam}, but this should only be used if for some reason it hangs. Note that by default the timeout for connecting to a remote server is 30 seconds, so you should wait at least 30 seconds before terminating it.

Once \gls{freshclam} finishes the button changes to a \emph{Close window} button, that can be safely pressed to dismiss the window.

\section{Custom URLs}
\label{sec:ui_urladd}
The \emph{Custom signature URLs} section on the \emph{Updater configuration}
page allows you to add custom URLs.

\Gls{freshclam} will automatically download these each time it updates the official signatures (usually once an hour).
If your webserver supports \verb+If-Modified-Since+ headers, it will only
download the new database if it is newer than the already installed one.

Digital signatures  are checked only for \gls{CVD} signatures\footnote{because they are the only ones that contain such signatures}.
Freshclam automatically tests all signatures (for syntactic correctness) after downloading, but
before installing them. If a signature file is malformed it is not installed and
an error is logged.

Usage:
\begin{itemize}
\item Click Add to add a new URL, press OK when done
\item If the URL is not in the correct format, an error message is shown.
Correct the URL and press OK again.
\item The new URL shows up in the \emph{Custom signature URLs} section
\item Add as many URLs as needed
\item You can remove an URL by clicking the \emph{Remove} button.
\textbf{WARNING}: If the database was already downloaded it won't remove the downloaded signature file from the disk.
See \prettyref{sec:localremove} on how to do that.
\item Check that you entered the correct URLs.
\item Click \emph{Save settings}.
\item Click \emph{Run freshclam to test configuration} to make sure freshclam is
able to correctly download the signatures. Freshclam will only install
signatures that are in the syntactically correct.
See \prettyref{sec:runfreshclam}
\end{itemize}

Note that the downloaded signature files will all be placed in the same directory. Hence you must make sure you don't have two URLs that, when downloaded, have the same filename.
The UI will warn you if you try to do that. \footnote{the two URLs with same filenames will just keep overwriting the same file}.
\section{Update now}
\label{sec:updatenow}
Any changes you make to \gls{freshclam.conf} and the databases won't take effect immediately.
They will take effect the next time the signatures are updated (usually once an hour).
To reload the signatures immediately open the \CW user interface from the tray (or desktop icon), and click on \emph{Update Now}. 
Once the database is updated, it will be reloaded as soon as the system is idle.