Try to solve the 'failed to open display ' issue for the unit tests.