title: _tkinter.TclError: no display name and no $DISPLAY environment variable on linux centOS 6 for python code
body: <p>I have made a python code which runs fine on my local machine (ubuntu 16.04) but when I run the same code on CentOS 6 (Remote Server) it fails with the error.</p>
  
  <pre><code>Traceback (most recent call last):
  File "bigdata_admin_home.py", line 256, in &lt;module&gt;
      app = ServiceApp()
  File "bigdata_admin_home.py", line 12, in __init__
      Tkinter.Tk.__init__(self, *args, **kwargs)
  File "/usr/lib64/python2.6/lib-tk/Tkinter.py", line 1643, in __init__
      self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
  _tkinter.TclError: no display name and no $DISPLAY environment variable
  </code></pre>
  
  <p>I tried <code>export DISPLAY=:0</code> and <code>export DISPLAY=&lt;Remote-Server-IP&gt;:0</code> but it didn't work for me.</p>
  
  <p>I tried ssh remote server with option "X" but it also didn't work.</p>
  
  <p>Can anyone help me on this?</p>
  
  <p>code :</p>
  
  <pre><code>#!/usr/bin/python
  
  import Tkinter
  import tkFont
  #import os
  from bigdata_services_node1 import Bigdata_Service_Node1
  from bigdata_services_node2 import Bigdata_Service_Node2
  
  class ServiceApp(Tkinter.Tk):
  
      def __init__(self, *args, **kwargs):
          Tkinter.Tk.__init__(self, *args, **kwargs)
  
          # the container is where we'll stack a bunch of frames
          # on top of each other, then the one we want visible
          # will be raised above the others
  
          container = Tkinter.Frame(self)
          container.pack(side="top", fill="both", expand=True)
          container.grid_rowconfigure(0, weight=1)
          container.grid_columnconfigure(0, weight=1)
  
          self.frames = {}
          for F in(Login,Bigdata_Monitor,Bigdata_Service_Node1,Bigdata_Service_Node2):
              page_name = F.__name__
              frame = F(container, self)
              self.frames[page_name] = frame
  
              # put all of the pages in the same location;
              # the one on the top of the stacking order
              # will be the one that is visible.
              frame.grid(row=0, column=0, sticky="nsew")
  
          self.show_frame("Login")
          self.resizable(False,False)
          self.update()
          #self.geometry(self.geometry())
          self.wm_geometry("400x370")
  
  if __name__ == "__main__":
      app = ServiceApp()
      app.title('Admin')
      app.mainloop()
  </code></pre>