After series of attempts I can answer my own question.
On Ubuntu, clone pg and webwork2 from git, install
sudo apt-get install libstring-shellquote-perl libxmlrpc-lite-perl libjson-perl libdbi-perl libuuid-tiny-perl liblocale-maketext-lexicon-perl
Then copy the perl script sendXMLRPC.pl fom the webwork2 tree to the working directory. Put the ww_credentials file in the working directory and set html_display_command and friends in this file.
Run the command as follows.
perl sendXMLRPC.pl -bv --seed=120 problem.pg