I have configured automatic login on boot, and this has worked for a long time.
I have created a .desktop file for a simple utility I wrote in python2 and pygame.
When I start the utility from the command line, it works great.
When I start the utility by double-clicking the .desktop file in pcmanfm, it works great. (The name is voltman.desktop)
I have put a symlink to this file into the .config/autostart directory in my home directory.
The desktop file is found by the "desktop session settings" control panel, and is checked there.
When the system auto-starts, the desktop environment starts up, see the window of my utility briefly show up, and then it immediately dies.
I have a second .desktop link in the autostart folder, to lxterminal.desktop, and this starts fine. (It did so even when it was the only autostart .desktop file, so it's not "the first autostart doesn't work.")
I have looked for log files in /var/log and /home/pi, but I have not found anything that mentions the voltmon.desktop file, or the reason why it may be crashing.
I'm looking first of all for help on where to find these log files, and barring that, how to diagnose this problem. If someone knows exactly what the problem is, I'd take a direct solution, too.
Here is the .desktop file:
Code: Select all
[Desktop Entry]
Encoding=UTF-8
Name=VoltageMonitor
GenericName=VoltageMonitor
Comment=Show how much juice is in the battery
Path=/usr/local/src/voltmon/
Exec=python /usr/local/src/voltmon/test1.py
Icon=/usr/local/src/voltmon/battery.png
Type=Application
Categories=Utility,Programming