Check the X lock

Trying to make running on a free display a bit more robust.
There seems to be cases where you can't open the display
but the lock is still there.