1

I want to create a shortcut to run a command with keyboard shortcut But when I press "alt+ctrl+a" terminal open and immediately close.

Please help me to edit below command for prevent from close after ran it.

gnome-terminal -e "vnstat -ru -i wlan0 -h"

Daniyal Javani
  • 1,588
  • 4
  • 20
  • 38

2 Answers2

1

Try it with this command instead:

gnome-terminal -e "bash -c 'vnstat -ru -i wlan0 -h; exec bash'"

The exec bash part at the end causes to start a bash that replaces the current shell (also a bash).

chaos
  • 27,106
  • 12
  • 74
  • 77
-1

create a keyboard shortcut with the following command : gnome-terminal . Thats it.

Julien Chau
  • 1,174
  • 1
  • 11
  • 23