LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to take a screenshot of a window that is not visible in batch mode? (https://www.linuxquestions.org/questions/linux-software-2/how-to-take-a-screenshot-of-a-window-that-is-not-visible-in-batch-mode-4175627421/)

FlinchX 04-14-2018 02:10 PM

Quote:

Originally Posted by keefaz (Post 5843043)
Ok, it's seems dwm doesn't support sticky feature. I was worth a try though

And what about (say window is on workspace 2 and you work on workspace 1
Code:

wmctrl -i -r <window id> -t 1
import -window <window id> window_image.png
wmctrl -i -r <window id> -t 2

You may want to use wmctrl -d to verify workspaces numbers

Code:

$ wmctrl -d
Cannot get number of desktops properties. (_NET_NUMBER_OF_DESKTOPS or _WIN_WORKSPACE_COUNT)

IIRC there used to be a patch for dwm that adds this feature, but I'm using vanilla dwm. I'm afraid patching dwm to get support for this feature goes out of the scope of my goal. For now at least.

FlinchX 04-14-2018 02:30 PM

Quote:

Originally Posted by allend (Post 5842574)
Just got this to work on my little netbook.
I started a nested session running Windowmaker with
Code:

exec xinit /usr/bin/wmaker -- /usr/bin/Xephyr :1 -screen 1000x500

I tried this, but with glxgears, it did not start:

Code:

$ exec xinit /usr/bin/glxgears -- /usr/bin/Xephyr :1               

xinit: XFree86_VT property unexpectedly has 0 items instead of 1
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  150 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  25
  Current serial number in output stream:  26
xinit: connection to X server lost

waiting for X server to shut down


keefaz 04-14-2018 03:22 PM

What about open window in same workspace but put it out of screen view?
Code:

wmctrl -i -r <window id> -e 0,-2000,-1,-1,-1
import -window <window id> window_image.png
# if you want to move window back in screen view
# wmctrl -i -r <window id> -e 0,5,-1,-1,-1


FlinchX 04-14-2018 05:46 PM

Quote:

Originally Posted by keefaz (Post 5843189)
What about open window in same workspace but put it out of screen view?
Code:

wmctrl -i -r <window id> -e 0,-2000,-1,-1,-1

this doesn't seem to work at all with dwm, the window remains visible

allend 04-14-2018 10:05 PM

Code:

exec xinit /usr/bin/glxgears -- /usr/bin/Xephyr :1
Where you have used '/usr/bin/glxgears', change to the command to start a window manager. I do not use dwm, so I do not have that command.
Here:
'/usr/bin/wmaker' starts WindowMaker
'/usr/bin/startxfce4 starts XFCE
'usr/bin/startfluxbox' starts fluxbox
'/usr/bin/startfvwm2' starts FVWM.
From within the Xephyr session, glxgears works for me.

FlinchX 04-15-2018 09:16 AM

Quote:

Originally Posted by allend (Post 5843270)
Code:

exec xinit /usr/bin/glxgears -- /usr/bin/Xephyr :1
Where you have used '/usr/bin/glxgears', change to the command to start a window manager. I do not use dwm, so I do not have that command.
Here:
'/usr/bin/wmaker' starts WindowMaker
'/usr/bin/startxfce4 starts XFCE
'usr/bin/startfluxbox' starts fluxbox
'/usr/bin/startfvwm2' starts FVWM.
From within the Xephyr session, glxgears works for me.

Running dwm inside the Xephyr session is not essential for me indeed. Since I need the wm just for running the command (glxgears) in this case.

After this command

Code:

exec xinit /usr/bin/startfluxbox -- /usr/bin/Xephyr :1
fluxbox starts inside the Xephyr session. I right click to bring up the popup menu. Select rxvt to launch a terminal. Run glxgears from it. The error is exactly like above, when I start glxgears directly.

allend 04-15-2018 12:28 PM

Are you being deliberately perverse?

If you want to break things then use rxvt (recently removed from Slackware-current). If you want to use the common denominator then use 'xterm'.
If you do not want to configure fluxbox, then start your preferred dwm.

This is now your problem. You have been offered two viable solutions that will work with a modicum of effort on your part.

Your posting history be damned!


All times are GMT -5. The time now is 11:39 AM.