Quantcast
Channel: together.jolla.com - Individual question feed
Viewing all articles
Browse latest Browse all 11

Running shell script from *.desktop file

$
0
0
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?

Viewing all articles
Browse latest Browse all 11

Latest Images

Trending Articles





Latest Images