bhilgenkamp
asked on
Ubuntu keyboard shortcut to open terminal window and run shell script
I have a simple bash script that I want to run when I use a certain keyboard shortcut. Right now it seems to kind of work - I see a terminal window open momentarily but the commands don't seem to run correctly. This is the script I'm using:
Basically all it does it kills Chrome, gets rid of the cookies, then relaunches Chrome. I want this to run with a simply keyboard shortcut. The script itself runs fine inside of Terminal. The only problem I'm having is when trying to run it as the shortcut.
The command I'm using for the shortcut is
#!/bin/bash
killall chrome
rm ~/.config/google-chrome/Default/Cookies
google-chrome
Basically all it does it kills Chrome, gets rid of the cookies, then relaunches Chrome. I want this to run with a simply keyboard shortcut. The script itself runs fine inside of Terminal. The only problem I'm having is when trying to run it as the shortcut.
The command I'm using for the shortcut is
gnome-terminal -e "bash ~/Desktop/test.sh"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.