I created some shortcuts to control the audio volume of my laptop, as the default system shortcuts ( Fn + F4 / F5) aren't supported. I downloaded a script which allows me to increase/decrease/mute PulseAudio volume. I created some script which contains the order of increasing/decreasing the volume: pulseaudio_volume-decrease.sh

The problem is, each time it is executed, it creates a "pavolume" file in my home dir that I don't want. Thus, I added "rm pavolume" next to the previous command: pulseaudio_volume-decrease.sh; rm pavolume

When I run it from the terminal, everything is fine; but, strangely, when I call the shortcut (with Gnome 'Keyboard' settings), it fails, telling me "Error while trying to run (pulseaudio_volume-decrease.sh;rm pavolume) which is linked to the key (Shift + F5)".

What have I done wrong?

I am running on Ubuntu 2D (Unity) 11.10

  • The gnome keyboard settings does not run the command in a shell, hence shell code won't work. Anyway, the script you linked to does not create any files, which suggests your pulseaudio_volume-decrease.sh may be the one accidentally creating that file. Could you post that script? – geirha Apr 16 '12 at 22:14
  • Here it is: pulseaudio_volume > pavolume increase... – SyS Apr 17 '12 at 10:11
  • As you can see, I'm a bit lost in all this... – SyS Apr 17 '12 at 10:12
  • That runs pulseaudio_volume increase and writes the output (if any) to the file pavolume, creating the file if it doesn't exist. So if you don't want that file to appear, remove > pavolume from that line. – geirha Apr 17 '12 at 13:14
  • Okay! I understood. I think it's working now. I was really confused as for writing those scripts. Thanks for the help!! – SyS Apr 18 '12 at 6:15

That was simply me making a beginner mistake in my script: I had written pulseaudio_volume > pavolume increase instead of pulseaudio_volume increase.

While the latter would merely call the script pulseaudio_volume and its method increase, the first would

[run] pulseaudio_volume increase and write the output (if any) to the file pavolume, creating the file if it doesn't exist.

That's why I had that pavolume file created in my home directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.