could Kivy run on windows subsystem for Linux - WSL

748 views
Skip to first unread message

mjkuwp94

unread,
Jul 1, 2018, 8:05:39 PM7/1/18
to kivy-...@googlegroups.com
I use Kivy for internal equipment at work and primarily on the Raspberry Pi.  During development I test this code on Windows and Linux on a PC.  I recently got a new machine and rather than go through the pain of setting up a dual-boot setup or VM I decided to try the Microsoft Windows Subsystem for Linux and found this to be quite nice so far.

I have Debian Linux running on WSL and this feels like it would be similar to a Raspberry Pi implementation.  On the Raspberry Pi, Kivy is able to display (full screen only) even without booting the desktop.

Could a similar technique (whatever magic makes a display for Rasbpian on the pi) work for the WSL?  For those who are not aware, this distribution is installed from the Windows store and allows one to run Linux in the terminal but does not implement a window manager nor desktop.

The benefit is that the code could be extremely similar between the two systems but I would have the huge benefit of developing on my main laptop.

Alexander Taylor

unread,
Jul 2, 2018, 3:13:57 PM7/2/18
to Kivy users support
It looks like you can run graphical programs in wsl by installing an X server, probably Kivy should work that way.

What's the barrier to developing in windows normally? All the Kivy code would be the same.

mjkuwp94

unread,
Jul 2, 2018, 4:31:52 PM7/2/18
to Kivy users support
thanks for your reply!

I am targeting a Raspberry Pi and there are differences in the code.  The file interfaces are different, file locations are different and most of all the mouse cursor is implemented in a different way.  These are not big issues - they are small so to a degree this is merely an academic exercise.  Another difference, though its not important here, is that the Raspberry Pi has a GPIO module and the other computers do not have this.  There unfortunately is no magic 'runs on every platform' feature ; )


On the Raspberry Pi, Kivy does not use a windows manager and always takes the whole screen.  I think that if I could set up the WSL to use the same graphics tools as the Raspberry Pi then I would have a powerful machine that is very close to the same implementation down to the special way the mouse is used.   This is not an important need, I just thought there may be someone out there that knows how to connect the dots. 

A bit of a side  note - I prefer to develop on a Linux machine because when I switch to implementing the code on the Pi I can use a lot of the same tools and functions and not have to switch my brain between two different environments : )

Mark
Reply all
Reply to author
Forward
0 new messages