After some reflection, I am leaning towards making this a stand-alone tool. I created a prototype. (See attached).
Not ready to share code yet. It's not complete.
Comments?
Looks great!
Thanks for the feedback.
Have you thought about making it work also on Windows and Mac OS?
I got started with this because I (as a Linux newbie) couldn't find anything on Linux that was similar to the Create Shortcut option on every File Explorer context menu. Windows doesn't use .desktop, and i see no reason to create yet another way to do a thing can be easily done already.
macOS is... well... Apple. I don't own any "rotten fruit" hardware, so it'd be difficult to test anything. And the code example in the previous replies tells me I don't want to get involved.
IMHO, as far as possible most fields should be filled with default values, including the icon field... (one can be provided initially)
If you talking about the .ico generated during compile, you can't use that. png, svg. or xpm only in .desktop files. So rather than guess, just let the user provide the path and file name. It already fills in as many known items as possible. I going to try to upload my efforts to-date some time tomorrow (Sun).