Run Kivy app as root user with touch screen on raspberry pi
<p>I want to make a kivy app for the raspberry pi that can use a touch screen. I was able to get the demos to work with the touchscreen with just "python ~/kivy/examples/demo/showcase/main.py". The issue comes when I need to start the app with "sudo python main.py", the touchscreen then ceases to work. </p>

<p>The app I am trying to write uses the rpi_ws281x library for controlling addressable leds which HAS to be run as root. Is there a way to run the kivy app as root while still enabling the touchscreen functionality? </p>

<p>If there isn't, is there a way to send data from the kivy app to say a script which is running sudo that controls the leds? </p>

<p>I've looked a lot of places but no one seems to have had this problem before (or they could work around it by changing the privileges of other directories where they were accessing the sudo protected content). Any help is greatly appreciated! </p>

<p>Well apparently I didn't look hard enough. The solution is to copy "~/.kivy/config.ini" to "/root/.kivy/config.ini"</p>

<p>So the commands are </p>

<p>"sudo cp ~/.kivy/config.ini /root/.kivy/config.ini"</p>

<p>And then everything works happily together! </p>

python raspberry-pi kivy led