Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.linux.misc > #28093 > unrolled thread
| Started by | "V. Dorokhin" <vdor@nyet.net> |
|---|---|
| First post | 2019-09-04 21:04 +0000 |
| Last post | 2019-09-05 13:24 -0400 |
| Articles | 8 — 5 participants |
Back to article view | Back to comp.os.linux.misc
Automatically capturing screenshots "V. Dorokhin" <vdor@nyet.net> - 2019-09-04 21:04 +0000
Re: Automatically capturing screenshots John McCue <jmccue@jmclin1.hsd1.ma.comcast.net> - 2019-09-04 21:59 +0000
Re: Automatically capturing screenshots Aragorn <thorongil@telenet.be> - 2019-09-05 00:14 +0200
Re: Automatically capturing screenshots marrgol <marrgol@address.invalid> - 2019-09-05 01:07 +0200
Re: Automatically capturing screenshots "V. Dorokhin" <vdor@nyet.net> - 2019-09-05 13:53 +0000
Re: Automatically capturing screenshots John McCue <jmccue@jmclin1.hsd1.ma.comcast.net> - 2019-09-06 00:44 +0000
Re: Automatically capturing screenshots "V. Dorokhin" <vdor@nyet.net> - 2019-09-06 15:02 +0000
Re: Automatically capturing screenshots Andreas Kohlbach <ank@spamfence.net> - 2019-09-05 13:24 -0400
| From | "V. Dorokhin" <vdor@nyet.net> |
|---|---|
| Date | 2019-09-04 21:04 +0000 |
| Subject | Automatically capturing screenshots |
| Message-ID | <qkp8t0$t3u$1@news.albasani.net> |
I have an Xfce desktop with a number (8, actually) different workspaces. Every so often I would like to capture and save a screenshot of each of the workspaces. I know how to do this by hand, but I would like to put together a shell-script to do it for me, so that I could invoke it automatically from cron. I have no clue how this can be done. If anybody does, I would be most grateful to learn how.
[toc] | [next] | [standalone]
| From | John McCue <jmccue@jmclin1.hsd1.ma.comcast.net> |
|---|---|
| Date | 2019-09-04 21:59 +0000 |
| Message-ID | <qkpc4j$nar$1@dont-email.me> |
| In reply to | #28093 |
V. Dorokhin <vdor@nyet.net> wrote: > I have an Xfce desktop with a number (8, actually) different > workspaces. Every so often I would like to capture and save a screenshot > of each of the workspaces. I know how to do this by hand, but I would > like to put together a shell-script to do it for me, so that I could > invoke it automatically from cron. > > I have no clue how this can be done. If anybody does, I would be > most grateful to learn how. I doubt it can be done, maybe as root you can read /dev/*mem*, but I doubt that is possible these days. IIRC, a long time ago, I thought there was a device /dev/kmem(?) that could be ready by root. John
[toc] | [prev] | [next] | [standalone]
| From | Aragorn <thorongil@telenet.be> |
|---|---|
| Date | 2019-09-05 00:14 +0200 |
| Message-ID | <20190905001440.7b579e73@nx-74205> |
| In reply to | #28093 |
On 04.09.2019 at 21:04, V. Dorokhin scribbled: > I have an Xfce desktop with a number (8, actually) different > workspaces. Every so often I would like to capture and save a > screenshot of each of the workspaces. I know how to do this by hand, > but I would like to put together a shell-script to do it for me, so > that I could invoke it automatically from cron. > > I have no clue how this can be done. If anybody does, I would > be most grateful to learn how. Install xorg-xwd. It's a command-line utility for making screenshots. -- With respect, = Aragorn =
[toc] | [prev] | [next] | [standalone]
| From | marrgol <marrgol@address.invalid> |
|---|---|
| Date | 2019-09-05 01:07 +0200 |
| Message-ID | <5d7043bd$0$17347$65785112@news.neostrada.pl> |
| In reply to | #28093 |
On 2019-09-04 at 23:04, V. Dorokhin wrote: > I have an Xfce desktop with a number (8, actually) different > workspaces. Every so often I would like to capture and save a screenshot > of each of the workspaces. I know how to do this by hand, but I would > like to put together a shell-script to do it for me, so that I could > invoke it automatically from cron. > > I have no clue how this can be done. If anybody does, I would be > most grateful to learn how. I don’t know if this can be done without switching desktops but if you don’t mind such "visual disturbance" you can certainly automate it using 'xdotool' and 'xfce4-screenshooter'. You could build around something like this: xdotool set_desktop 2 xfce4-screenshooter -f -s /path/to/screenshots/ & xdotool sleep 1\ type 'desktop_2_screenshot' ; xdotool key alt+s -- mrg
[toc] | [prev] | [next] | [standalone]
| From | "V. Dorokhin" <vdor@nyet.net> |
|---|---|
| Date | 2019-09-05 13:53 +0000 |
| Message-ID | <qkr402$30p$1@news.albasani.net> |
| In reply to | #28093 |
On Wed, 04 Sep 2019 21:04:32 +0000, V. Dorokhin wrote: > I have an Xfce desktop with a number (8, actually) different workspaces. > Every so often I would like to capture and save a screenshot of each of > the workspaces. I know how to do this by hand, but I would like to put > together a shell-script to do it for me, so that I could invoke it > automatically from cron. > > I have no clue how this can be done. If anybody does, I would be > most grateful to learn how. I got this working with a combination of xdotool and scrot - xfce4-screenshooter insists in prompting for confirmation on where to save the screenshot file, which will necessitate human intervention. Anyway, the following little script does it for me: #! /bin/sh export DISPLAY=localhost:0.0 WORKSPACES=8 CURRENT=`xdotool get_desktop` COUNT=0 while [ $COUNT -lt $WORKSPACES ]; do FILENAME=`date +'%Y%m%d%H%M%S'`_$COUNT.jpg xdotool set_desktop $COUNT scrot -q 100 -d 1 /tmp/$FILENAME COUNT=$(($COUNT + 1)) done xdotool set_desktop $CURRENT Provided that your desktop is running, this works even when invoked by the cron daemon. It will be somewhat annoying if it is invoked when you are at your desktop, but at least you end up in the same workspace that you originally were.
[toc] | [prev] | [next] | [standalone]
| From | John McCue <jmccue@jmclin1.hsd1.ma.comcast.net> |
|---|---|
| Date | 2019-09-06 00:44 +0000 |
| Message-ID | <qksa5i$k3r$1@dont-email.me> |
| In reply to | #28120 |
V. Dorokhin <vdor@nyet.net> wrote: > On Wed, 04 Sep 2019 21:04:32 +0000, V. Dorokhin wrote: > <snip> > > I got this working with a combination of xdotool and scrot - never heard of xdotool <snip> > > Provided that your desktop is running, this works even when invoked by > the cron daemon. Nice, I did not think it was possible via cron, will play with the script when I have time :) John
[toc] | [prev] | [next] | [standalone]
| From | "V. Dorokhin" <vdor@nyet.net> |
|---|---|
| Date | 2019-09-06 15:02 +0000 |
| Message-ID | <qktsf3$som$1@news.albasani.net> |
| In reply to | #28124 |
On Fri, 06 Sep 2019 00:44:34 +0000, John McCue wrote: > V. Dorokhin <vdor@nyet.net> wrote: >> On Wed, 04 Sep 2019 21:04:32 +0000, V. Dorokhin wrote: >> > <snip> >> >> I got this working with a combination of xdotool and scrot - > > never heard of xdotool > > <snip> >> >> Provided that your desktop is running, this works even when invoked by >> the cron daemon. > > Nice, I did not think it was possible via cron, > will play with the script when I have time :) > > John Bear in mind that, in order to get it to work from crontab at any time, I had to make sure to disable the Xfce screensaver, and the screen blanking feature built into X: xset -dpms xset s noblank xset s off Otherwise, I would just get blank snapshots.
[toc] | [prev] | [next] | [standalone]
| From | Andreas Kohlbach <ank@spamfence.net> |
|---|---|
| Date | 2019-09-05 13:24 -0400 |
| Message-ID | <871rwumzay.fsf@usenet.ankman.de> |
| In reply to | #28093 |
On Wed, 4 Sep 2019 21:04:32 +0000 (UTC), V. Dorokhin wrote: > > I have an Xfce desktop with a number (8, actually) different > workspaces. Every so often I would like to capture and save a screenshot > of each of the workspaces. I know how to do this by hand, but I would > like to put together a shell-script to do it for me, so that I could > invoke it automatically from cron. Am not sure I really understand what you want. For taking screenshots I usually us import, which is part of ImageMagick. Checkout the man page <https://linux.die.net/man/1/import> and see, if any of its vast number of options can do that. I find for example: -pause value - seconds delay between snapshots -frame - include window manager frame -page - geometry size and location of an image canvas -screen - select image from root window -window id - select window with this id or name May be one could create something with these or other options. You could probably run one instance on every desktop in an x-term which you then minimize. -- Andreas My random thoughts and comments https://news-commentaries.blogspot.com/
[toc] | [prev] | [standalone]
Back to top | Article view | comp.os.linux.misc
csiph-web