Surfraw gets its configuration from three sources, in order:
/etc/surfraw.conf and $HOME/.surfraw.conf are both fragments of bourne-shell style shell script.
/etc/surfraw.conf should use def and defyn to define variables. These functions set variables unless they are already set by the environment. defyn is used for boolean configuration variables, def for all others. For instance:
def SURFRAW_text_browser /usr/bin/lynx defyn SURFRAW_graphical no
$HOME/.surfraw.conf should use sh-style entries, eg: