Unable to launch electron apps such as Discord
afzalarsalan opened this issue · 6 comments
Due to #54, I notice that some electron apps such as Discord no longer seem to launch at all.
In particular the error I get is
exec: cd: not found
This issue doesn't occur with 1.5.2.
It seems that this issue directly correlates with the presence of a PATH variable in the .desktop file. When commenting out either or both PATH declarations in the file, the program seems to launch normally.
The stem of the issue derives from the fact that generate_command() prepends cd to the final parsed command which isn't understood by exec due to cd being a shell primitive and not a binary.
Thanks for debugging. I guess I will revert the release until we figure something out
@afzalarsalan Does it fix the problem if you change this line
from
if(path){ printf "cd " path " && " }
to
if(path){ printf "env PWD=" path }
Sorry about this, I hadn't hit a desktop file with Path=
in my tests. It should work now for those as well.
@afzalarsalan Does it fix the problem if you change this line from
if(path){ printf "cd " path " && " }
to
if(path){ printf "env PWD=" path }
Unfortunately I can confirm that this fix does not work to resolve the issue, however I can confirm that #56 does end up resolving the issue appropriately