[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: screen capture

What program is "import" in I don't seem to have that on my system and tried a apt-get install import on testing and it was not there then I looked for it on freshmeat and could not find it.


Justin R. Miller wrote:

Said Crispin Wellington on Thu, Apr 11, 2002 at 06:03:32PM +0800:

I use import.

import -window root filename.png

It automatically saves in the format specified in the filename
extension. png, jpg etc.

To wait before a capture go...

sleep 5; import -window root filename.png

I just mention it because knowing things on the command line will come
in useful one day. (like capturing a screen remotely).

I wrote the attached script years ago to do the same thing, but to name
the shot according to the date and time, as well as increment the
filename if a similarly-named shot exists.



umask 133
DATE=`date +%m%d%y@%I%M%S%p`

if [ $# -ne 1 ]; then
       printf "Usage:\n  screenshot delay (in seconds)\n\n"
       if [ -f /tmp/$DATE.jpg ]; then
               COUNT=`ls /tmp/$DATE*.jpg |wc -w |awk '{printf $1}'`
               sleep $1
               import -silent -window root /tmp/$DATE'.'$COUNT.jpg
               sleep $1
               import -silent -window root /tmp/$DATE.jpg


To UNSUBSCRIBE, email to debian-kde-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: