LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-12-2010, 12:44 AM   #1
Supreme1012
LQ Newbie
 
Registered: Jun 2007
Location: Florida, USA
Distribution: Ubuntu 7.04, Kubuntu 7.04, Kubuntu 7.10
Posts: 22

Rep: Reputation: 15
Command to automatically save screenshot after pressing hotkey


I've been pulling my teeth out trying to find out a way to automatically save a screenshot to a folder by pressing a hotkey, and append a counter or timestamp to the end of the filename. I found this which works well

import -window root ~/screenshot.png

but I need a way to add a counter so that it doesnt constantly override the same file when I press the hotkey, but will save a new screenshot in the same folder.

I've been looking at bash commands and scripts for the past 3 hours but havent found it yet, and it seems like it should be an easy task to perform.

Help would be appreciated. Thanks!

P.S. Also, If I wanted to change the command for the print screen key <Print> from "ksnapshot" to this command, how would I write it?
 
Old 08-12-2010, 01:53 AM   #2
Supreme1012
LQ Newbie
 
Registered: Jun 2007
Location: Florida, USA
Distribution: Ubuntu 7.04, Kubuntu 7.04, Kubuntu 7.10
Posts: 22

Original Poster
Rep: Reputation: 15
solved.

import -window root ~/Pictures/Screenshots/`date +%H-%M-%S-%N`.png
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to save an LQ page after pressing button 'Click here to find similar threads". stf92 Linux - Software 14 06-20-2010 09:53 PM
save screenshot? Rita G. Linux - Software 4 07-28-2009 01:03 PM
I Took A Screenshot... But, I Can't Save/ Find It taurusx5 Linux - Software 6 09-25-2008 12:12 AM
Pressing a direction key of keyboard doesnt move the cursor automatically dying4004 Mandriva 1 01-20-2007 08:55 AM
Possible to have hotkey for screenshot? ryedunn Linux - Newbie 2 04-24-2004 05:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration