title: Why using pygame in Ubuntu, vs editor gets me this error pygame.error: No available video device
body: <p><strong>OS is windows</strong></p>
  <p><strong>Terminal =&gt; Windows Subsystem For Linux</strong></p>
  <h2>Ps: When I run it through Windows PowerShell it runs, but I want to run it through ubuntu, because I use ubuntu not Windows PowerShell</h2>
  <p>I know that there is a lot of similar questions on stackoverflow to mine, but it is not working. Problem is I am trying to run the code and I am getting this error</p>
  <blockquote>
  <p>Traceback (most recent call last):   File
  &quot;/mnt/c/Users/owner/Desktop/Projects/games/tic-tac-toe/tic_tac_to.py&quot;,
  line 11, in 
  screen = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.error: No available video device</p>
  </blockquote>
  <h1>My code:</h1>
  <pre><code>import pygame, sys
  
  pygame.init()
  
  # Const variables
  WIDTH = 600
  HEIGHT = 600
  RED = (255,0,0)
  BACKGROUND_COLOR = (20, 189, 172)
  
  screen = pygame.display.set_mode((WIDTH, HEIGHT))
  pygame.display.set_caption(&quot;TIC-TAC-TOE&quot;)
  screen.fill(BACKGROUND_COLOR)
  
  # mainloop
  while True:
      for event in pygame.event.get():
          if event.type == pygame.QUIT:
              sys.exit()
      pygame.display.update()
  </code></pre>