is there a linux equivalent of iTerm(mac) sending command to multiple tabs functionality?

5

2

in iTerm, you can send a command to execute simultaneously on a set of already opened tabs. Is there a way to do this in linux (with gnome-terminal preferably)?

for instance, supposed that I had 10 tabs already ssh'd into foo@host1.com and sudoed to root and wanted to send a command to run on all 10 tabs.

The goal of this is to be able to stay within a set of tabs and command them, rather than having to use expect scripts to ssh and elevate and run commands. Basically, like how you could do in iTerm.

jabbertalker

Posted 2012-06-05T18:10:31.360

Reputation: 51

The answer will probably depend on what terminal emulator you are using. – chepner – 2012-06-05T23:47:08.147

use cluster ssh (cssh)? Not really want you want, but kinda close. – Zoredache – 2012-06-06T00:20:20.280

@chepner this would be for gnome-terminal – jabbertalker – 2012-06-08T17:57:37.560

From the little searching I've done, it does not appear that gnome-terminal supports sending input to multiple tabs. I think you'd have to switch to something like Terminator or konsole – chepner – 2012-06-08T19:19:26.267

While not a direct answer to your question, rundeck lets you run commands on dozens or hundreds of servers at once. http://rundeck.org I use it on all the servers I administer

– spuder – 2013-08-19T04:48:13.043

Answers

3

If you can use tmux, then you can "set-window-option synchronize-panes". From the manual, it "duplicate[s] input to any pane to all other panes in the same window, except for panes that are not in output mode".

This isn't quite the same as duplicating input to tabs in gnome-terminal, but it gets you the same result.

p00ya

Posted 2012-06-05T18:10:31.360

Reputation: 173

0

Sounds like you're looking for Terminator

It does multiple tabs or window splits, and grouping them, and then sending a single command that gets sent to single tab, a group of tabs/windows or broadcast to all you got open.

Marcin

Posted 2012-06-05T18:10:31.360

Reputation: 678