I answered on Ask Ubuntu Quit all instances of gnome-terminal
via a command but as you all can read gnome-terminal
didn't seems to have a SIG
call I could use to simulate this "Close" event. So this lead me to ask, is there a way in GNOME/KDE/LXDE/{put your window/desktop manager/environment here} to simulate the "Click in close button" event? I have read different questions that could have any relation to this, but don't answer this.
What I'm looking is for a global command (if exist) to do this in different scenarios. If none exist, please explain how the "Close" button works.
Posible uses:
- I open a set of applications for a determinated task, and want to close all of them (when no longer used) in a single stroke/command without suppress any You want to save your work? alerts.
- Close all the
gnome-terminal
instances but warn me if there is child process still running. - Nothing else comes into my mind right now...
xdotool search --name "saml@grinchy:~" key alt+f4
, problem is that I haven't found how to do this with several windows that have the same name... – Braiam Aug 01 '13 at 16:26wmctrl -r :ACTIVE: -N "MyWindowTitle
– slm Aug 01 '13 at 16:34key alt+F4
to all the windows (if resize can be done, why not alt+F4), but without luck. And thanks :D. – Braiam Aug 01 '13 at 16:46xdotool search --name gedit key --window %@ alt+F4
to close all gedit instances successfully, now looking for a way to close windows that have nothing in common. – Braiam Aug 01 '13 at 16:54xdotool search --name "gedit|terminal|office" key --window %@ alt+F4
will look for any window that has gedit, terminal or office in it's title name and send the alt+F4 command. – Braiam Aug 01 '13 at 17:24