I'm in the terminal emulator. I want to open another terminal to run a specified command.
gnome-terminal -e "zsh -c 'pwd; zsh;'"
zsh consecutively and successfully in another terminal. After
pwd terminates, zsh launches and I can run other commands in that second terminal instance.
However, when a different app is launched instead of
pwd, I can't end that long-running program properly.
For example when I type CtrlC to exit from node.js server in below command, it also closes the terminal. It seems that
SIGINT is passed to first
gnome-terminal -e "zsh -c 'node server.js; zsh;'"
How can I fix this?
gnome-terminal -e "bash -c \"node server.js; zsh\""so that you still have your favorite shell.