custom shortcut key ignores commands
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
unity-control-center (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu 16.04 LTS. I have tried to run this python script from github:
https:/
by defining a custom shortcut key and placing the command:
python ~/my_pythons_
in the command box. Nothing happens when I use the designated shortcut key.
The same happens when I try to run a bash script by custom shortcut keys
Both the python script and my own bash script run from terminal successfully.
In fact none of the shell commands placed inside the command box of custom shortcut keys is executed
Oddly enough there is no problem launching installed programs, such as skype or firefox.
In other word if your command is, say, firefox then you are ok. But not when you want to run your own scripts.
Initially I assumed I was not binding the keys properly and posted this question in Askubuntu:
https:/
unsurprisingly I have had no solutions offered.
tags: | added: keys shortcut |
I have now found out that the shell commands placed in the command box of Custom Shortcut Key must be inside single quote marks AND preceded by bash -c
this rule also applies to running scripts, e.g.
bash -c 'python ~/my_pythons_ scripts/ append_ clipboard. py' folder/ script1. sh'
bash -c 'bash ~/my_scripts_
None of this is explained in any documentations. It should at least be added as examples of how to assign custom shortcut keys to run commands and scripts