I have Raspbian Buster on a RPi4 and I was launching a Python3 based Kivy 2.0 app at startup. Since it is a GUI app that needs networking and bluetooth. The only way to make it work was an executable script with
sudo chmod +x myapp.py and add the line
@python3 ~/myapp.py to
Later on I installed Teamviewer and at the startup the app simply does not start any more. I have checked all the LXDE-pi autostarts, configs, desktops, lxpanels, lxsessions, xdges without finding a flaw. The only change I found was teeamviewer added a service in
etc/systemd/system. Uninstalling teamviewer did not help.
/home/pi/.config/lxsession/LXDE-pi/autostart does not exist so it is not used instead of /etc/xdg/lxsession/LXDE-pi/autostart.
$HOME/.config/lxsession/LXDE-pi/desktop.conf the part
disable_autostart=no, so it should be fine.
My app launched only using
lxsessions/autostart. Other attempts such with rc.local,autostart desktop files, systemd, crontab,init.d and bashrc did not have a positive outcome and I can not consider them as solutions.
Teamviewer is not guilty. I tested with a simple script and
lxsessions does run after boot.
The script myapp.py works fine when launched any time except after reboot. After checking
/home/pi/.cache/lxsession/LXDE-pi/run.log it seems to be a serial tty port problem. This is the post where I found out about