Auto start with arguments
#1
Hi,

I'm have followed the guide to configure autostart of Kodi as per this link:

http://kodi.wiki/view/HOW-TO:Autostart_K...md_script.

Running 16.04, so went with the systemd option. Now, I'm also trying to use eventlircd for my remote which only works if Kodi is loaded with the --lircdev option.

Unfortunately this does not get picked up when I add it to the ExecStart line:

Code:
ExecStart = /usr/bin/xinit /usr/bin/dbus-launch --exit-with-session /usr/bin/kodi-standalone --lircdev /var/run/lirc/lircd -- :0 -nolisten tcp vt7

I'm probably doing it all wrong so can somebody point me in the right direction please?
Reply
#2
Try quoting "/usr/bin/kodi-standalone -lircdev /var/run/lirc/lircd"
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#3
Thanks for the reply but already tried that and didn't work. Funny thing is, now it does work without the quotes.

Another way would be to symlink /dev/lircd to /var/run/lirc/lircd since that is where kodi look per default I believe. But this is not persistent after a reboot because /var/run/lirc/lircd doesn't exist before eventlircd is loaded.
Reply
#4
the symlink should always work. Even if the target file does not exist, the symlink still exists, it just points to a non existent file.
Once the target file is created, the symlink becomes valid again.
Reply
#5
It should but on my system it doesn't persist. Something must be deleting it then i presume. I am using the OSMC packages for eventlircd, maybe something to do with those?

Another way I found is to use section 6 of the how-to (lightdm autologin) and alter the eventlircd systemd unit to include an extra ExecStartPost line so it gets created after starting eventlircd:

Code:
sudo vi /lib/systemd/system/eventlircd.service

Code:
ExecStartPost = /bin/sh -c "if [ ! -e /dev/lircd ]; then ln -s /var/run/lirc/lircd /dev/lircd; fi;"
Reply

Logout Mark Read Team Forum Stats Members Help
Auto start with arguments0