Just to make this clear (Sorry if it’s unnecessary, but maybe still useful info for others)…Path= lines in .desktop files are not related at all to the $PATH environment variables. They do something completely different (And yes, picking Path as key was a terrible choice in my view). Path= lines in .desktop files change the current working directory…they do about the same as a cd <directory>
in a shell.
They do not change where a .desktop file looks for executables…only indirectly if a executable runs another file relative to the current directory or looks for images/icons/audio/other data relative to the current working directory.
And I have no clue why it doesn’t work with TryExec…the desktop file spec doesn’t mention anything about that :( ( https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html )
If it could the anti-cheat system wouldn’t be worth using. Being able to “trick” the anti-cheat system into thinking something else is going on than actually happens is the same an actual “cheat” would do. That’s why kernel level anti-cheat system go though a lot of trouble to detect any kind of virtualization or similar tricks…the moment you could trick them into accepting a fake kernel is also the moment that fake kernel can pretend the fake input it generates actually comes from a real mouse or the checksum of that openGL/vulkan library is exactly the one expected and not the one of some altered libraries that “accidentally” forget to not render stuff behind walls…
It’s also something that needs to be kept in mind when talking about “Companies can just enable the linux support in their anti-cheat systems but they don’t.” While this is true of course it also means the kernel-level anti-cheat systems are bared from kernel-access and degraded to user-space only. And as people have access to the source-code of the linux kernel nothing is stopping anyone from just modifying the kernel to…give more “favorable results” while playing the game. Of course the linux playerbase it too tiny to really offer a market for such cheats…but it’s not completely unreasonable to not want to erode the capabilities of your anti-cheat system (That is of course if you believe they work in the first place…but that’s a different discussion).