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:

killall chrome
rm ~/.config/google-chrome/Default/Cookies

Open in new window

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"

Open in new window

Who is Participating?
bhilgenkampAuthor Commented:
Well, it seems I have answered my own question. I used a different command:

gnome-terminal -x /home/mvp/Desktop/test.sh

All seems to work now.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.