Custom plasma shortcut to run a simple bash script

Hi,
I'm trying to make a custom shortcut via the plasma custom shortcut module to run a simple bash script but I am having issues with making it correctly fire.
If I set the shortcut action to "dolphin" or such it correctly fires (dolphin opens), but if I point it to a script file nothing seems to happen and I don't get why. I have set execution permissions on the file.
The script works if I run it from the command line.

[gianni@gianni-macmini scripts]$ pwd
/home/gianni/scripts
[gianni@gianni-macmini scripts]$ ls -lh test.sh 
-rwxr-xr-x 1 gianni gianni 30 11 gen 12.16 test.sh
[gianni@gianni-macmini scripts]$ cat test.sh 
echo something > testfile.txt
[gianni@gianni-macmini scripts]$ ls
test.sh
[gianni@gianni-macmini scripts]$ ./test.sh 
[gianni@gianni-macmini scripts]$ ls
testfile.txt  test.sh

attivazione azione

I'd greatly appreciate some help.

tried this, the script works, just in wrong path
the script would write to ~, not your scripts dir

3 Likes

Oh, that was a decisive hint, thank you for that!

I have to add that in order to make the script work (besides from putting the full path in the script) I also had to modify the action from "/home/gianni/scripts/test.sh" to "sh /home/gianni/scripts/test.sh".

I guess that was it, thank you again for your help.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by