Running shell script from *.desktop file
Hi
I have an odd problem. I have the made this little script to record sound:
------ record.sh begin ------
#!/bin/sh if [ -n "$(ps -e | grep parec)" ]; then killall parec; pacmd set-source-volume source.droid 65536; exit 0; fi pacmd set-source-volume source.droid 229376 parec s.mp3
-------- record.sh end --------
When run the first time it sets the recording volume to 350% and records sound to "s.mp3". When run again it stops recording and resets the recording volume to 100%. I have made a *.desktop file and placed it in /usr/share/applications:
[Desktop Entry] Name=Recorder Exec=/home/nemo/bin/record.sh Icon=/home/nemo/icons/recorder.jpeg Type=Application Terminal=false
When I execute the script from a terminal it works as intended. When I execute the script from a *.desktop file on my workstation it works as intended.
But when I execute it from the *.desktop file om my phone it starts the recording but when I click on the icon the second time it doesn't stop recording and there is also an annoying startup icon with a rotating circle popping up for about 10 seconds.
I wonder why it does not work on my phone?
Sailfish launcher .desktop files are not designed for this :( It forces single-instance way of executing appliactions
coderus ( 2020-04-09 18:58:33 +0200 )editAll right, thanks. What are my options, then?
mortenbo ( 2020-04-09 19:00:55 +0200 )editwrite application :)
coderus ( 2020-04-09 19:47:10 +0200 )editJust a guess.
peterleinchen ( 2020-04-10 00:50:11 +0200 )editMaybe it will work with last line changed to:
@peterleinchen, alas it makes no difference.
mortenbo ( 2020-04-10 09:57:38 +0200 )edit