My program runs a function of an application. The command for the Snap doesn't work for the Debian Package and vice-versa. I could just try each in turn and ignore the command which fails, but that seem a bit crude to me. Is there a command I could use or a variable I could check to see whether the user has installed the application from a Debian application, a Flatpak or a Snap?
The only way I can think of is to use a command like snap info {program} > filename.txt then read and edit the text file to find whether it indicates success or not. That's very long-winded.
Bookmarks