Forum › Forums › General › Tips and Tricks › How to Integrate .appimage files with antiX menu › Reply To: How to Integrate .appimage files with antiX menu
Maybe because you are selecting the app image already (and should have the full path?) you could simply use sed to write a new line?
sed "s|^EXEC=.*|EXEC=$appimage_file|g" -i $desktop_file
Or perhaps because there may be options in the exec line you should use the exec line already in the .desktop file as part of the new exec line.
Then you could extract the path to the appimage from the selection
path=${appimage_file%/*}
With the old exec stored in a variable
oldExec=$(grep "^EXEC=" test.txt |cut -d "=" -f2 )
and use sed or something similar to write the new line with the path like
sed "s|^EXEC=.*|EXEC=$path/$oldExec|g" -i $desktop_file
You might even be able to skip the retrieving of the oldExec by using sed against only the EXEC= portion rather than the whole line
sed “s|^EXEC=|EXEC=$path|g” -i $desktop_file.
Also it may be worth considering using a mime-filter on the yad selection dialog for the appimage mime type.
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown