Wednesday, January 6, 2016

Linux how to make an icon that launches a python program

This turns out to be ridiculously easy. In most Linux distros, you can just put a text file where you want the launcher (like on the desktop), give it a .desktop extension, and add in text lines that define the location of the program to run and even the icon for the launcher file to show. Some links:

https://www.raspberrypi.org/forums/viewtopic.php?f=32&t=71468

This one is particularly nice because it's the actual standard, plus it's well-written to boot.

http://standards.freedesktop.org/desktop-entry-spec/latest/index.html


http://ubuntuforums.org/showthread.php?t=2221617

https://www.raspberrypi.org/forums/viewtopic.php?f=27&t=9817