Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • I am using Gnome. I went to settings > devices > keyboard > keyboard shortcuts and added a custom shortcut. I added the following as the command: "/home/nuc/shell_scripts/test.sh" and binded it to ctrl + 1, however it still does not work. test.sh is a shell script i wrote that just runs "pwd" my actual robot_launch.sh runs a bunch of roslaunch commands. The terminal output is not necessary. However, when I press run "ps" it shows that there is no roslaunch running in the background. Commented Jun 2, 2022 at 16:22
  • @user528125 You have to make the script executable: chmod +x script. Though depending on what the script does the problem could be elsewhere. Commented Jun 2, 2022 at 16:30
  • I have done that. The shell script runs perfectly when I run it in the terminal. If I change the script to one line: firefox "google.com" the script can be binded to a key. It looks like gnome keybinds allow me to launch apps. Even through shell scripts. Is it possible for me to run a sequence of commands in the terminal through a gnome keybind? My original idea was to write a shell script which runs a sequence of commands. And that shell script works perfectly, if i run it in the terminal. But it does not work when binded to a key. Commented Jun 2, 2022 at 17:22
  • The issue has been resolved, the "~" was half the problem. The other half was that the script would need to be ran in a terminal. So a new script was created which launched a terminal and then ran my original script in it. That new script was then binded to my controller Commented Jun 2, 2022 at 19:40