Newtron Malayalam Asked: 2020-01-20 06:54:56 +0800 CST2020-01-20 06:54:56 +0800 CST 2020-01-20 06:54:56 +0800 CST How to get a screen shot of a window from command line using window id 772 How to get a screenshot of only one window from the command line if I have window id? I want to show a preview screen like this for a specific window with qml and pyqt5. What can I do then? command-line screenshot pyqt5 qml 1 Answers Voted FedKad 2020-01-20T08:48:40+08:002020-01-20T08:48:40+08:00 You can raise the relevant window with the wmctrl command and take its screenshot using the gnome-screenshot command. For example, assuming that the window id is 0x02600010, you can use: wmctrl -i -a 0x02600010 && gnome-screenshot -w
You can raise the relevant window with the
wmctrl
command and take its screenshot using thegnome-screenshot
command. For example, assuming that the window id is0x02600010
, you can use: