Ubuntu – How to minimize all windows from command line in LXDE

command linelubuntulxdeminimizewindows

I need to minimize all windows from command line, I have heard about

wmctrl -k on

but I think it will only work for gnome, is there any possibility of doing this?

Best Answer

Your command, wmctrl -k on is respected by Openbox which is the window manager used in LXDE and it works for me (Openbox session of Lubuntu 14.04 LTS).

If it doesn't work for some reason, install xdotool from the software center and use this command:

xdotool key super+d

What this command does is the same as simultaneously pressing Super+d which is the Openbox toggle for minimizing all windows or showing all windows unless you've modified your lxde-rc.xml or lubuntu-rc.xml or rc.xml, a file normally located in ~/.config/openbox.