For linux .desktop files there is the EXEC Key-Word inside, which acc. to different Sites (Ubuntu) contains the executable name optionally followed by arguments
Yes, but the .desktop file does not appear in ParamStr(0), it's always resolved by the OS to the binary executable.
In practice my experience is that there are things in that file which are at best handled haphazardly, but these are not germane to this particular thread.
I suppose that if we're mentioning .desktop and .lnk files then we have to also mention the OS/2 WPS shadow files which- if memory serves correctly- were (in unix terms) hard filesystem links rather than being anything special.
We can probably say safely that ParamStr(0) refers to a binary, where there might be multiple hardlinks pointing to the same storage. If it was invoked via a symlink, the situation is implementation-specific. .desktop and .lnk files are resolved at an earlier stage of the GUI's handling of program startup.
None of which really helps OP: on unix he has to look at the PPID tree, and the structure of that will vary between Linux and BSD derivatives.
MarkMLl