title: tkinter.TclError: no display name and no $DISPLAY environment variable python
body: <p>I want to execute my python file in a remote system using ssh. I exported the file to the remote system.</p>
  
  <p>Here's the sample file:</p>
  
  <pre><code>import os
  import time
  import pymsgbox
  
  pymsgbox.alert('Hi Afreeth ', 'Welcome')
  if 'DISPLAY' not in os.environ: 
      pass
  </code></pre>
  
  <p>I want to execute it using ssh from my system and it should display in the remote system.
  But it fails</p>
  
  <p>Error i got:</p>
  
  <pre><code>Traceback (most recent call last):
    File "cd1.py", line 5, in &lt;module&gt;
    File "pymsgbox/__init__.py", line 100, in alert
    File "pymsgbox/__init__.py", line 156, in _buttonbox
    File "tkinter/__init__.py", line 1871, in __init__
  _tkinter.TclError: no display name and no $DISPLAY environment variable
  [12113] Failed to execute script myprogram
  </code></pre>
  
  <p>How to fix it. I found some answers on stack but it doesn't solve me. If i go and execute it in the remote system, it works. But when i execute from my system,it fails. How to fix it.</p>