How to make `--new-tab -x` terminals persist?

Asked by Sparhawk

I'm attempting to make terminator open a new tab with a particular command executed, then persist until I close it manually. I'm not sure if I'm using the right options. I presumed one uses `--new-tab -x` or `--new-tab -e`?

I have dbus server enabled. If I run `terminator --new-tab`, I get a new tab as expected. However, if I run `terminator --new-tab -x touch /tmp/foo`, I can see a quick blink of a new tab, then it disappears. I can see `/tmp/foo` created.

I've also tried the following:

terminator --new-tab -x echo foo
    This creates a blink of a new tab that disappears, with nothing echoed on the screen.
terminator --new-tab -x echo foo; sleep 1; echo bar
    This creates a blink of a new tab that disappears, pauses for a second, then echoes "bar" on the original terminal.
terminator --new-tab -e 'echo foo; sleep 1; echo bar'
    This creates a new tab that echoes "foo", persists for a second, then closes.

Question information

Language:
English Edit question
Status:
Solved
For:
Terminator Edit question
Assignee:
No assignee Edit question
Solved by:
Stephen Boddy
Solved:
Last query:
Last reply:
Revision history for this message
Best Stephen Boddy (stephen-j-boddy) said :
#1

You need to end your command with "; bash"

When you pass a command like this it *replaces* the default bash. So when your command exits it is the same as exiting a normal bash session. The terminal exits and terminator cleans up. By adding bash you will run your command, then start a bash instance.

Alternatively you can use a new profile, and in that profile set the Command -> When command exits: dropdown to Hold the terminal open. This would also work.

Revision history for this message
Sparhawk (sparhawkthesecond) said :
#2

Thanks Stephen Boddy, that solved my question.