Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using wmctrl to close windows

Tags:

window

wine

Can I close a window using wmctrl that is running in wine on Ubuntu?

For context:

$ wmctrl -m
Name: compiz
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: OFF

Also:

$ wmctrl -l
0x0240a3be -1 mjol N/A
0x02000003  0 mjol Top Expanded Edge Panel
0x0200004c  0 mjol Bottom Expanded Edge Panel
0x01e00024  0 mjol x-nautilus-desktop
0x04800253  0 mjol using wmctrl to close windows - Stack Overflow - Google Chrome
0x03c0c8c3  0 mjol Terminal
0x03c53f25  0 mjol Terminal
0x04400001  0 mjol Untitled - SketchUp
0x04400003  0 mjol Instructor
0x04400009  0 mjol SketchUp

The window I want to close is the last one:

0x04400009  0 mjol SketchUp

I've tried the following:

$ wmctrl -c "SketchUp"

$ wmctrl -c 0x04400009

$ wmctrl -i 0x04400009

$ wmctrl -c -i 0x04400009

But nothing works.

like image 913
dsg Avatar asked Mar 16 '11 17:03

dsg


People also ask

How to close a window from command line linux?

Type exit at the command line and press Return. Or, choose Exit from the Terminal Window menu.

How do I close all windows in Linux?

You can use the Ctrl + Q keyboard shortcut which will close all opened windows of Archive Manager. The Ctrl + Q shortcut is common on Ubuntu (and lots of other distributions as well). It works the same with most of the applications I've used thus far. That is, it will close all windows of a running application.

How do I close multiple windows in Ubuntu?

To minimize all windows in ubuntu press Ctrl + Super + D (ctrl+windows+D). its default shortcut to minimize all windows. Save this answer.


1 Answers

Maybe a little late, but first seen now. Reading the info for wmctrl, it says that the correct syntax is 'options' before actions, and -i is an option, -c an action. Try wmctrl -i -c 0x04400009

like image 121
bjc Avatar answered Sep 29 '22 00:09

bjc