More changes to work on ubuntu and detect if $DISPLAY
is absent and not launch viewer.