np_entry: set custom logging-only X error handler

By default any X error causes application to close. The new handler only
prints error message to the stdout/stderr.