Hexa's Blog

Run gnome-terminal and open new program

14/10/2014 Linux

This is script which open a new gnome-terminal window and automatically run, execute program on this gnome-terminal.

gnome-terminal  -x zsh -c "echo hello;pwd;whoami;zsh"

The workflow of this script is:

1. Open new gnome-terminal
2. execute command `echo hello`
3. execute command `pwd`
4. execute command `whoami`
5. execute command `zsh`

!!!NOTE: THE END OF EXECUTE SENTENCE SHOULD END WITH zsh