Qube Window Manager; unable to list all open windows

21 views
Skip to first unread message

Franz

unread,
Jan 27, 2019, 9:33:03 AM1/27/19
to qubes-users
Command `wmctrl -l` gives the following error
Cannot get client list properties.
(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)

But when I use wmctrl to display info about the window manager, Qubes is indeed found:
[user@personal ~]$ wmctrl -m
Name: Qubes
Class: N/A
PID: N/A
Window manager's "showing the desktop" mode: N/A

What I am trying to do is to gracefully close firefox, but I get the same error:

[user@personal ~]$ wmctrl -c firefox
Cannot get client list properties.
(_NET_CLIENT_LIST or _WIN_CLIENT_LIST)

Best


Chris Laprise

unread,
Jan 27, 2019, 11:16:59 AM1/27/19
to Franz, qubes-users
On 01/27/2019 09:32 AM, Franz wrote:
> Command `wmctrl -l` gives the following error
>
> |Cannot get client list properties. (_NET_CLIENT_LIST or _WIN_CLIENT_LIST)|

This works for me with KDE.


>
> But when I use |wmctrl| to display info about the window manager, Qubes
> is indeed found:
> [user@personal ~]$ wmctrl -m
> Name: Qubes
> Class: N/A
> PID: N/A
> Window manager's "showing the desktop" mode: N/A
>
> What I am trying to do is to gracefully close firefox, but I get the
> same error:
>
> [user@personal ~]$ wmctrl -c firefox
> Cannot get client list properties.
> (_NET_CLIENT_LIST or _WIN_CLIENT_LIST)

You could try using 'xdotool' instead:
xdotool search --name Firefox

See my 'halt-vm-by-window' script from 'Qubes-scripts' project for
examples. You could go through the list of matching windows, find the VM
name with 'xprop', then issue a command like "qvm-run $vmname 'pkill
firefox'" which should send a normal TERM signal to Firefox. Its best to
wait about 5 seconds before trying to shut down the VM so the browser
state has time to be written to disk.

--

Chris Laprise, tas...@posteo.net
https://github.com/tasket
https://twitter.com/ttaskett
PGP: BEE2 20C5 356E 764A 73EB 4AB3 1DC4 D106 F07F 1886

Franz

unread,
Jan 28, 2019, 8:40:16 AM1/28/19
to Chris Laprise, qubes-users
thanks Chris
xdotool does not seem to work either


but it give this error:
Defaulting to search window name, class, and classname
Your windowmanager claims not to support _NET_ACTIVE_WINDOW, so the attempt to activate the window was aborted.
xdo_activate_window on window:18874384 reported an error

It may be a xfce problem since you wrote it works with KDE
Best

Franz

unread,
Jan 30, 2019, 4:01:02 PM1/30/19
to Chris Laprise, qubes-users
On Sun, Jan 27, 2019 at 1:16 PM Chris Laprise <tas...@posteo.net> wrote:
On 01/27/2019 09:32 AM, Franz wrote:
> Command `wmctrl -l` gives the following error
>
> |Cannot get client list properties. (_NET_CLIENT_LIST or _WIN_CLIENT_LIST)|

This works for me with KDE.


>
> But when I use |wmctrl| to display info about the window manager, Qubes
> is indeed found:
> [user@personal ~]$ wmctrl -m
> Name: Qubes
> Class: N/A
> PID: N/A
> Window manager's "showing the desktop" mode: N/A
>
> What I am trying to do is to gracefully close firefox, but I get the
> same error:
>
> [user@personal ~]$ wmctrl -c firefox
> Cannot get client list properties.
> (_NET_CLIENT_LIST or _WIN_CLIENT_LIST)

You could try using 'xdotool' instead:
xdotool search --name Firefox

See my 'halt-vm-by-window' script from 'Qubes-scripts' project for
examples. You could go through the list of matching windows, find the VM
name with 'xprop', then issue a command like "qvm-run $vmname 'pkill
firefox'" which should send a normal TERM signal to Firefox.

I tried most of the 60 signals that can be associated to pkill and none is able to close firefox gracefully. The closer one is number 3, SIGQUIT that at least waits a little bit before closing firefox. I suppose the way kill and pkill work is just to crash the program you want to close.

Well perhaps it may not be as bad as it seems. I wonder why wmctrl does not work with xfce. Is that a bug?

Reply all
Reply to author
Forward
0 new messages