Closed jgeisler0303 closed 8 years ago
Thanks for the detailed tutorial. It will be very helpful. I tried a lot of different configurations and I was never able to run it without sudo.
I will add a link in the readme to this tutorial.
same thing in my case, I stuck on this point and as a workaround I used rc.local but finally it works - thanks!
Hi, I would like to share how I got mopidy to run as a service without root privileges. First the prerequisites:
Further, I assume you have your touch screen running and bound to
/dev/fb1
and your touch input linked to/dev/input/touchscreen
. The first is achieved by adding a line likedtoverlay="your device"
to/boot/config.txt
where"your device"
is chosen from this list and possibly augmented with appropriate parameter settings. For the latter your might have to add anotherdtoverlay
-line to your/boot/config.txt
, depending on your touch input device. For my device this is not necessary as the touch driver is included in the display driver. Finally you must link your touch input to/dev/input/touchscreen
and calibrate it as described here. You may omit the creation of the files for setting the environment variables and runsudo TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen ts_calibrate
instead.You may also send boot log to the touch screen by adding this to the end of the one and only line in
/boot/cmdline.txt
:fbcon=map:10
.What follows now is the actual solution to letting run mopidy as a service without root privileges. I had to try many different approaches and I hope I recall everything that finally led to success correctly. If you encounter a problem in recreating this, give me a shout, maybe I missed something important.
usermod -a -G video mopidy
,usermod -a -G tty mopidy
,usermod -a -G input mopidy
.sudo rm /etc/systemd/system/getty.target.wants/getty@tty1.service
/lib/systemd/system/mopidy.service
in the[Service]
section:/etc/mopidy/mopidy.conf
to your needs. And of course install Mopidy-Touchscreen and configure it as wellsudo systemctl enable mopidy
andsudo reboot
it should run the touch UI on your TFT after startup.Have fun and many thanks to the developers of this great little application.