Some time we meet error like : Error: Unable to initialize gtk, is DISPLAY set properly?

Then Try

1
2
# export DISPLAY=:0.0
# export wxUSE_GUI=0

Referenct: http://blog.csdn.net/jiangxinyu/article/details/1630713