> No X11 DISPLAY variable was set, but this program performed an operation which requires it.
って書いてあるからDISPLAY環境変数を正しくセットすれば
いいんじゃないかな