#!/bin/sh

if /usr/bin/htmlview -remote "openURL($1,new-window)" 2>&1 \
   | grep -qi '\(not running on display\|no running window found\|uknown option\)'; then
  exec /usr/bin/htmlview $1
fi
