1

I am running 16 debug processes simultaneously with our adapted gdb (called e-gdb). The processes are invoked by a bash script, using:

gnome-terminal -e 'e-gdb -x gdbNN.cmd progNN.e'

To manage the multiple sessions I can open multiple terminals using the --geometry option to arrange them tiled on my screen. Alternatively, I can use the --tab option to have them all in one terminal.

When the sessions end I close the terminal(s) with a click (I don't want it to auto-close).

So, with multiple terms I need to click 16 times while with tabs I click once, but I have to switch between tabs to see the session results. I would like tiled tabs in a terminal so I can view them simultaneously and close all in a single click.

Is there a way to tile tabs? If not, can I close all debug terminals in one action?

UPDATE: Is there an easy way to kill multiple terminals based on their title? I am using the -t option to name the windows. Is there something like kill -name '*DBG*'?

7
  • OP are you still looking for an answer? If so, you may need to repost your question as this is flagged for closeure. =)
    – Ringtail
    Mar 3, 2012 at 1:06
  • @BlueXrider - Although I am no longer disturbed by this problem, obviously the question was not answered. The way I see it, it is still open.
    – ysap
    Mar 6, 2012 at 19:50
  • It may not be entirely possible to achieve exactly what you want, if either of the answers was useful and closed multiple tabs you should accept the answer or at least upvote it. Mar 18, 2012 at 1:14
  • @MarkRooney - I am a big supporter of upvoting answers of some usefulness, but in this case (reading my own comments, as it was a long time ago and my memory is not that good), it seems like none really helped, hence my (non)vote. The answers certainly bare good info, but totally not helpful here.
    – ysap
    Mar 19, 2012 at 22:35
  • Maybe you want to add this askubuntu answer to your soution: askubuntu.com/questions/19397/… . It works for me. What I wanted is to close properly all the tabs on a terminal that I opened using an "sh script" and the "gnome-temrinal" command. The problem is that if I just closed the whole window (with the close button), only the active tab would be closed properly. My solution now is to go to the desired window and use the shortcut control+shift+w many times and just close the last tab (and terminal window) with control+shift+q
    – jespestana
    Jun 13, 2013 at 1:36

3 Answers 3

1

The solution that I found for myself to this problem was to use wmctrl. It allows for very granular control over your windows. So I have a set of terminals titled Acyrid-Live and Acyrid-Beta.

wmctrl -F -c Acyrid-Live will only close that window

It's a pretty useful set of tools.

http://tomas.styblo.name/wmctrl/

Edit: Yes I realize this is an oldish thread, but it's also one of the most popular results when searching how to close terminals by title, so I figured I would post a successful solution.

2
  • Looks like a useful utility, although not a basic Linux command. Nice first post!
    – ysap
    Apr 3, 2012 at 18:17
  • Thank you ysap I hope this helps you in what you're trying to accomplish.
    – JDD
    Apr 3, 2012 at 20:02
1

One could close all of them with killall gnome-terminal, but that would also close other running gnome-terminals.

1
  • Thanks, but I need my work terminal to remain open.
    – ysap
    Nov 5, 2011 at 7:30
0

If the controlling script you mentioned allows for it, you could try adding the following to it:

# When this exits, exit all back ground process also.
trap 'kill $(jobs -p)' EXIT

Credit: http://www.thegeekstuff.com/2009/09/multitail-to-view-tail-f-output-of-multiple-log-files-in-one-terminal/

1
  • Thanks. I tries to add the trap line to the beginning of my master script and (as the post you linked to suggests) a wait command at the end, thinking it will wait for Ctrl-C, but it did not wait for Ctrl-C, nor did it kill the 16 terminals when finished running (immediately after the wait command).
    – ysap
    Nov 5, 2011 at 7:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .