I am developing a Kivy app using VSCode on Win10. Everything is working perfectly.
To deploy my app to Android I want to use buildozer which only runs on Linux. I have turned on WSL2 and installed Ubuntu. Everything is working perfectly.
I have created a completely separate deployment environment in Linux to complement my Windows development environment. I use virtual environments in both cases. Everything is working.
When I run my app in the Windows environment, it works. When I run it in the Linux environment, it fails. After searching around, I believe the problem has to do with windowing. Kivy wants to open a window, but my Ubuntu is not set up for that.
By the way, I do not know much about Linux.
Here is the code and messages.
Sample Code
from kivy.app import App
from kivy.uix.label import Label
class Play(App):
def build(self):
l = Label(text="Hello World")
return l
if __name__ == '__main__':
Play().run()
Error Messages
/usr/bin/env /mnt/c/Users/mark/OneDrive/dev/babyclix_stg/.venv/bin/python /home/mkortink/.vscode-server/extensions/ms-python.python-2020.9.114305/pythonFiles/lib/python/debugpy/launcher 65502 -- /mnt/c/Users/mark/OneDrive/dev/babyclix_stg/hello.py
mkortink@DESKTOP-6FAUQ4D:/mnt/c/Users/mark/OneDrive/dev/babyclix_stg$ /usr/bin/env /mnt/c/Users/mark/OneDrive/dev/babyclix_stg/.venv/bin/python /home/mkortink/.vscode-server/extensions/ms-python.python-2020.9.114305/pythonFiles/lib/python/debugpy/launcher 65502 -- /mnt/c/Users/mark/OneDrive/dev/babyclix_stg/hello.py
source /mnt/c/Users/mark/OneDrive/dev/babyclix_stg/.venv/bin/activate
[INFO ] [Logger ] Record log in /home/mkortink/.kivy/logs/kivy_20-10-16_3.txt
[INFO ] [Kivy ] v1.11.1
[INFO ] [Kivy ] Installed at "/mnt/c/Users/mark/OneDrive/dev/babyclix_stg/.venv/lib/python3.7/site-packages/kivy/__init__.py"
[INFO ] [Python ] v3.7.9 (default, Aug 18 2020, 02:07:21)
[GCC 9.3.0]
[INFO ] [Python ] Interpreter at "/mnt/c/Users/mark/OneDrive/dev/babyclix_stg/.venv/bin/python"
[INFO ] [Factory ] 184 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO ] [Window ] Provider: x11(['window_egl_rpi', 'window_sdl2'] ignored)
Couldn't connect to X server
Can someone please tell me what I need to do to Ubuntu to get Kivy working. Alternatively, I am quite happy to give Ubuntu the flick and install a more beginner friendly Linux distro that is more Windows-like and comes with things like window managers preinstalled.
Thanks