Launch a shell script
Hi,
Pehaps i miss something but if i want to launch a shell script from synapse, it open only it in editor.
Thanks for help.
Regards
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Synapse Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- rcspam
- Solved:
- 2015-11-15
- Last query:
- 2015-11-15
- Last reply:
- 2015-11-14
Jeremy Munsch (jeremy-munsch) said : | #1 |
Well the file plugin is actually handling the request, pressing tab will show you options for it.
However the command plugin is responsible for providing exec.
Im not sure yet how to hack this or provide a better way of doing this. Maybe the file plugin could provide and option to execute the file.
This needs some thinking, if you have some ideas it would be welcome though.
rcspam (rcspam) said : | #2 |
Hi,
When we pass to application tab, it should be proposed to launch it. Perhaps in setting a path to explore personal scripts in preferences... I dont know really. I only was surprised synapse didn't launch my bash scripts which are set to be executable.
Regards
rcspam (rcspam) said : | #3 |
When we pass to application tab | sed 's/pass/switch'
.... sorry
Jeremy Munsch (jeremy-munsch) said : | #4 |
I have two more tricks, synapse is ignoring non hidden file (it handles it with file plugin), so hidden file should be handled to be executed.
Edit: just tested hidden file in home folder, it is not working
Also putting your scripts in /usr/bin is working the way you want. ex :
~/.supertest
#!/bin/sh
yad
sudo ln -s ~/.yad /usr/bin
Jeremy Munsch (jeremy-munsch) said : | #5 |
Sorry typo :
~/.supertest
#!/bin/sh
yad
sudo ln -s ~/.supertest /usr/bin
Then search supertest, it should allow you to run as command
rcspam (rcspam) said : | #6 |
I have lot of scripts, so create a link to /usr/bin for each is not a good solution...
Jeremy Munsch (jeremy-munsch) said : | #7 |
It is a matter of how synapse is handling results.
The current behaviours is the the file Plugin have priority over the application plugin.
So your i agree :
Desktop file plugin should have execute option when file is executable.
My guess is also that it should be executed by default by the fileplugin when it is executable.
But i'm still not sure if this would be wanted.
Maybe you could submit a blueprint so we could start from there to make this happen properly.
rcspam (rcspam) said : | #8 |
My guess is also that it should be executed by default by the fileplugin when it is executable. +1
Jeremy Munsch (jeremy-munsch) said : | #9 |
A fix is now commited
You can have it by using ppa:synapse-
rcspam (rcspam) said : | #10 |
Thanx, it works ! :)
It would be cool to have choice in the list: "execute or open".