title: Xlib.error.DisplayConnectionError when running my python program on os startup using systemd
body: <ul>
  <li><p>Basic background info:</p>
  
  <p>I'm trying to run my program on os startup (my current OS is Debian 9 
  latest stable release)
  my project is listening to the keyboard using Xlib library and I'm also 
  using Tkinter to pop up some UI windows.</p></li>
  <li><p>this is /etc/system/system/my_project.service</p></li>
  </ul>
  
  <blockquote>
  <pre><code>[Unit]
  Description=Daemon tool that opens the required environment given a 
  certain shortcut key
  
  [Service]
  Environment="DISPLAY=:0"
  ExecStart=/usr/local/bin/keyboard_listener.py
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  </blockquote>
  
  <ul>
  <li>after reboot I run:
  <code>sudo systemctl status my_project.service</code>
  and I get the following error</li>
  </ul>
  
  <blockquote>
    <p><strong>May 08 11:49:43 debian keyboard_listener.py[303]:</strong>   File
    "/usr/local/lib/python3.5/dist-packages/Xlib/protocol/display.py",
    line 90, in <strong>init</strong></p>
    
    <p><strong>May 08 11:49:43 debian keyboard_listener.py[303]:</strong>     self.socket =
    connect.get_socket(name, protocol, host, displayno)</p>
    
    <p><strong>May 08 11:49:43 debian keyboard_listener.py[303]:</strong>   File
    "/usr/local/lib/python3.5/dist-packages/Xlib/support/connect.py", line
    87, in get_socket</p>
    
    <p><strong>May 08 11:49:43 debian keyboard_listener.py[303]:</strong>     return
    mod.get_socket(dname, protocol, host, dno)</p>
    
    <p><strong>May 08 11:49:43 debian keyboard_listener.py[303]:</strong>   File
    "/usr/local/lib/python3.5/dist-packages/Xlib/support/unix_connect.py",
    line 113, in get_socket</p>
    
    <p><strong>May 08 11:49:43 debian keyboard_listener.py[303]:</strong>     raise
    error.DisplayConnectionError(dname, str(val))</p>
    
    <p><strong>May 08 11:49:43 debian keyboard_listener.py[303]:</strong>
    Xlib.error.DisplayConnectionError: Can't connect to display ":0":
    [Errno 111] Connection refused</p>
    
    <p><strong>May 08 11:49:43 debian systemd[1]:</strong> my_project.service: Main
    process exited, code=exited, status=1/FAILURE</p>
    
    <p><strong>May 08 11:49:43 debian systemd[1]:</strong> my_project.service: Unit
    entered failed state.</p>
    
    <p><strong>May 08 11:49:43 debian systemd[1]:</strong> my_project.service: Failed
    with result 'exit-code'.</p>
  </blockquote>
  
  <p>how can I solve this issue(Erron 111)? should I add something to my_project.service
  and how can I make my project to run on startup?</p>