Xr = subprocess.check_output().decode("utf-8").split() The script below therefore looks up the gnome-terminal windows on the current workspace and takes care of them as explained above. You can however make a script raise (all) gnome-terminal windows and simulate Ctrl+ Shift+ Q.Ī complexity is that this will not work when the windows are spread over different workspaces. Also man gnome-terminal does not give any solution to close the window like in the GUI. (And please forgive me if I am not following any stylistic formats correctly, as I am new.)Įven the "friendliest" kill- command will close the terminal without asking. Surely there is a way to do this in Ubuntu 14.04? Either in the command line or using a keyboard shortcut (or both)? This question has been asked in one form or another before, it has not been answered satisfactorily (unless I misunderstood the answer). In other words, it acts as though I have clicked the close button on each window. This way I can make sure I don't kill a process I forgot about (e.g. On that platform, when I hit "command-Q" (a/k/a "Apple-Q") in Terminal, all the windows are closed, but if there are processes running in any particular Terminal window, I get a dialog box warning me and asking me if I still want to close the window. What I want to do is to make it behave as the Terminal application behaves in Mac OS X. By "cleanly", I mean that it doesn't just simply kill all the instances at once, which is what I already have with this alias: alias poof='/usr/bin/killall gnome-terminal'
VIM CLOSE ALL WINDOWS EXCEPT CURRENT HOW TO
I am trying to find out how to close all windows of Terminal (quit all instances of gnome-terminal) at once, cleanly.