KivyPie w/o touchscreen and responsive cursor

EDIT [This may be unstable in Raspbian Jessie, which Kivy Pie 1.0 is built on, use caution.]

After experimenting with running GroundControl in KDE with wayland support, I thought I would give KivyPie 1.0 one last try, this time using kivy environmental variables that worked in my Raspbian Stretch build.

To my surprise, after enabling the GL driver in raspi-config and installing XFCE4 Desktop environment, I am able to run GroundControl in an X-window by simply passing a KIVY_WINDOW variable in front of python. I also commented out the touchring module line in .kivy/config.ini and set multiframe=0. Then ran the following command

KIVY_WINDOW=sdl2 python main.py

GroundControl will start up full screen but you by running it with SDL2, the cursor will stay above the kivy app and you can resize the window as seen in the screenshot.

If there is any interest, I can document my installation steps in more detail.

Cheers,
Jamtek

4 Likes

Yes, please! 0123456

1 Like

EDIT [This may be unstable in Raspbian Jessie, which Kivy Pie 1.0 is built on, use caution.]

My Hardware

  • Raspberry Pi 3 b
  • Samsung 32GB EVO Plus Class 10 MicroSDHC card
  • Acer LCD monitor connected to HDMI
  • Logitech K400r keyoard with bultin touchpad
  • 5V 2.5 power supply

Beginning with a fresh install of KivyPie, 1.0 See the Download and FAQ section at kivypie.org for more information on getting it copied to an SD card.

Boot up the system and do the the following updates.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

Reboot and run sudo raspi-config. Make the appropriate setting changes for your locale, timezone, etc. Then choose 7 Advanced Options from the menu and then select A6 GL Driver. and select

  • G1 (Full KMS) OpenGL desktop driver

Save and exit out, you will be asked to reboot again.

Pyton2 support is missing install it and create a link with:

sudo apt-get install python2-kivypie
sudo ln -sf /usr/bin/python2 /usr/bin/kivy

GroundControl requires pyserial plugin:

sudo pip install pyserial

Xserver and a desktop enviorment are also missing from KivyPie 1.0 install it with:

sudo apt-get install xfce4 xinit x11-apps xclip xsel lxterminal xserver-xorg-video-fbturbo geany

You should now be able to open XFCE desktop with startx from the shell prompt.

Once you are in the desktop start a terminal from the launcher bar and backup and edit the kivy config file.

cd ~/.kivy
cp config.ini config.bak

Use a text editor to edit the file:

geany config.ini

Comment out the touchring module by placing # symbol in front of it and change multisamples=0: #touchring = scale=0.3,alpha=0.7,show_cursor=1
multisamples=0

Save your changes and download or clone GroundControl from git hub.

git clone https://github.com/MaslowCNC/GroundControl.git

From the terminal enter the following to launch GroundControl Be sure to type the command as shown with Caps, etc:

cd ~/GroundControl
KIVY_WINDOW=sdl2 python main.py

GroundControl should start full screen in an X-window border, you should be able to resize and interact now with your mouse or touchpad.

Enjoy,
Jamtek

2 Likes

After seeing several crashes, running Kivypie 1,0 with GL video driver, I would be cautious of running it in production. Since KivyPie is basically Rapbian Jessie, which is now considered an Old release, it does not have the updated packages that the new Stretch does not include KDE with wayland support. Which I documented in another post here. Raspberry Pi with KDE Window Manager, Wayland ver

However, KivyPie 1.0/Jessie does have a Wayland compositor called Weston and the xwayland xserver package.

This also allows you to run GroundControl with kivy SDL2 window. You can install it with the following:

sudo apt-get install weston xwayland libgl1-mesa-dri

you will also need to create a config file for it inside your home directory.
cd .config directory. If the folder does not exist create it. With a tex editor create a file named weston.ini When you are done it should look like this:

[core]
modules=xwayland.so
xwayland=true

[keyboard]
keymap_layout=gb

[output]
name=LVDS1
mode=1680x1050
transform=90

[launcher]
icon=/usr/share/icons/gnome/24x24/apps/utilities-terminal.png
path=/usr/bin/weston-terminal

Type weston at the shell prompt to launch the Weston desktop.

In the left hand corner of the launch bar, click on the terminal icon to start up the weston-terminal.
From inside the terminal launch GroundControl in a kivy SDL window.

cd GroundControl
KIVY_WINDOW=sdl2 python main.py

wayland-screenshot

To quit Weston do a Ctrl+Alt+Backspace

For more information on Weston and other keyboard shortcuts see https://wiki.archlinux.org/index.php/Wayland

3 Likes