Automated screenshot?
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Automated screenshot?
I have with my 3.1 XFCe x86-64 Porteus two programs that can take a screen shot: xfce4-screenshooter and mtpaint.
Both can be started from the terminal, which is what I want... but both are not able to do that fully automatic, as in: start up, take the screenshot and save it in a given folder, then exit by itself.
At least both man pages don't tell me how that can be done. There is always the "save file as" window open when using xfce4-screenshooter, or mtpaint just opens the screenshot in its edit window.
But I need it fully automated, e.g. have a screenshot every 30 minutes, and then after some hours take a screenshot every minute prior putting the machine into suspend, the idea being that no one is at the PC at that time so the screen shooter needs to do the screenshot, saving in given folder and exiting all by itself.
Any ideas? Is there a hidden feature in xfce4-screenshooter or mtpaint that the man page omits?
The versions I use:
mtPaint 3.40
xfce4-screenshooter 1.8.1
Hope someone has a solution. I presume that would be a 3rd program... *plays melody of ´the third man` in his head*
Both can be started from the terminal, which is what I want... but both are not able to do that fully automatic, as in: start up, take the screenshot and save it in a given folder, then exit by itself.
At least both man pages don't tell me how that can be done. There is always the "save file as" window open when using xfce4-screenshooter, or mtpaint just opens the screenshot in its edit window.
But I need it fully automated, e.g. have a screenshot every 30 minutes, and then after some hours take a screenshot every minute prior putting the machine into suspend, the idea being that no one is at the PC at that time so the screen shooter needs to do the screenshot, saving in given folder and exiting all by itself.
Any ideas? Is there a hidden feature in xfce4-screenshooter or mtpaint that the man page omits?
The versions I use:
mtPaint 3.40
xfce4-screenshooter 1.8.1
Hope someone has a solution. I presume that would be a 3rd program... *plays melody of ´the third man` in his head*
Cheers!
Yours Rava
Yours Rava
Re: Automated screenshot?
hi rava seem you have to use crontab to run a script that allow to take a screeshoot every x time...
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Re: Automated screenshot?
Coding the script is not the issue, but none of the two programs do a screenshot fully automated, they both want the user to save the file. That's the issue, not starting the screen shooter at time X...beny wrote:hi rava seem you have to use crontab to run a script that allow to take a screeshoot every x time...
Sorry for being not clear enough on the issue.
Cheers!
Yours Rava
Yours Rava
-
- Full of knowledge
- Posts: 2067
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: Automated screenshot?
Hi Rava
(package is "default".. see /var/log/packages)
(EXAMPLE) as an inspiration..
I'm sure you are able to modify this snipped and add the time steps you need.
..make a lot of screenshots or overwrite the last etc...
maybe better without asking for a filename -- just date and time as the filename
You do not need mtpaint for this...you can use "imagemagick"both want the user to save the file
(package is "default".. see /var/log/packages)
(EXAMPLE) as an inspiration..
Code: Select all
#!/bin/bash
echo "Enter a file name"
read filename
import -window root $HOME/Desktop/$filename.png
..make a lot of screenshots or overwrite the last etc...
maybe better without asking for a filename -- just date and time as the filename
Code: Select all
#!/bin/bash
filename=$(date '+%d.%m.%Y_%H:%M')
import -window root $HOME/Screenshots/$filename.png
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Re: Automated screenshot?
Dank Dir und thanks Donald, I know that imagemagick (or GraphicsMagick xD) "GraphicsMagick is a fork of ImageMagick, emphasizing stability of both programming API and command-line options." (source: wikipedia Dr. Copy & Mr. Paste) is able to do so but... compressed module size of 6.46 MB for imagemagick or 2.29 MB for GraphicsMagick is quite the overkill for just a screen shooter...
I hope there is yet another small program that can handle screenshots like *magick does... 8)
And yes, I would have also used.
Code: Select all
$ du -h *magi*
2.3M graphicsmagick-1.3.17-x86_64-1cf.xzm
6.5M imagemagick-6.7.7_10-x86_64-1.xzm
And yes, I would have also used
Code: Select all
filename=${screenshotsave}/$(date '+%d.%m.%Y_%H:%M')
Cheers!
Yours Rava
Yours Rava
-
- Full of knowledge
- Posts: 2067
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: Automated screenshot?
imagemagick-6.9.4_9-i586-1 is already included in stock porteus 3.2.2 (xfce)
-- no need to install extra/additional packages.
I don't know if it is the same in 3.1 you are (still) using..?..
search for imagemagick in /var/log/packages
-- no need to install extra/additional packages.
I don't know if it is the same in 3.1 you are (still) using..?..
search for imagemagick in /var/log/packages
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Re: Automated screenshot?
Finally I realized the errors of my way, and why 3.2.2 (and newer) won't start: initrd wants the sgn file in a folder named "/porteus/", just having /Porteus:3.2.2/ won't work...
So yes, *magic is not by default for me. Because not enough time to setup the new system the way I want. After the move out of this flat I will do so, aka next month.
So yes, *magic is not by default for me. Because not enough time to setup the new system the way I want. After the move out of this flat I will do so, aka next month.
Cheers!
Yours Rava
Yours Rava
- ncmprhnsbl
- DEV Team
- Posts: 3933
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
Re: Automated screenshot?
not sure if imlib2 is included in 3.1, if not , easy to get and is quite small ...has some basic tools including a screen grabber...
(some screenshooters actually use this(scrot)
this page has lots of info: https://wiki.archlinux.org/index.php/Ta ... Screenshot
you can even use ffmpeg...
Code: Select all
$ imlib2_grab screenshot.png
this page has lots of info: https://wiki.archlinux.org/index.php/Ta ... Screenshot
you can even use ffmpeg...
Code: Select all
$ ffmpeg -f x11grab -video_size widthxheight -i $DISPLAY -vframes 1 screen.png
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
- Rava
- Contributor
- Posts: 5401
- Joined: 11 Jan 2011, 02:46
- Distribution: XFCE 5.01 x86_64 + 4.0 i586
- Location: Forests of Germany
Re: Automated screenshot?
Thanks,
imlib2_grab $(date '+%Y.%m.%d_%H:%M:%S').png is just what I wanted. <B
imlib2_grab $(date '+%Y.%m.%d_%H:%M:%S').png is just what I wanted. <B
Cheers!
Yours Rava
Yours Rava