I want an icon, which I can double click to execute a terminal command. So far I've created an executable script:
#!/bin/bash
gnome-terminal -e cd ~/gPodder/Downloads/M4As\ To\ Be\ Converted/ && for f in *.m4a; do avconv -i "$f" "${f/%m4a/wav}"; done && for i in *.wav; do opusenc --bitrate 26 --downmix-mono "$i" "${i/%wav/opus}"; done && find . -type f -iname \*.wav -delete
Since I've just thrown things together kind of arbitrarily I'm not surprised it doesn't work, so what do I have to change in order for it to open a new terminal window executing the specified sequence of commands?
The actual command (starting from cd
to -delete
) actually works when manually entered in a terminal window.
I don't want to call on any script, I just want the above command to be executed in the terminal. Shouldn't there be a simple way to do this?
– Markus Gratis Nov 06 '16 at 17:59[Desktop Entry] Type=Application Terminal=true Exec=cd ~/gPodder/Downloads/M4As\ To\ Be\ Converted/ && for f in .m4a; do avconv -i "$f" "${f/%m4a/wav}"; done && for i in .wav; do opusenc --bitrate 26 --downmix-mono "$i" "${i/%wav/opus}"; done && find . -type f -iname *.wav -delete Name=ConvertM4AsToOpusMono26kbps
But: There was an error starting the application...
– Markus Gratis Nov 06 '16 at 18:12