You are not logged in.
I'm trying to get "scrot -s" to trigger which I click "Cntrl+Alt+4" however it doesn't work when the "-s" - meaning select area of the screen with the mouse - is added.
In .xbindkeysrc I have:
# Screenshot of a section of a screen (Cntrl+Alt+4)
"scrot -sh"
m:0xc + c:13
Control+Alt+4
Any ideas?
Last edited by anthillsocial (2013-03-19 13:35:46)
Offline
-h is the help option, so you just get the help returned.
Try opening a terminal and running it in that. Once that's working, you could try the working command without one.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Thanks for that - though perhaps should have elaborated more.
"scrot -s" works perfectly from the terminal, its only when its triggered via a key bind that it fails.
Offline
Thanks for that - though perhaps should have elaborated more.
"scrot -s" works perfectly from the terminal, its only when its triggered via a key bind that it fails.
Your code snippet above has the -h option, is that a typo?
I'm not sure how scrot works, but you may need to launch a terminal that runs the command:
# Screenshot of a section of a screen (Cntrl+Alt+4)
"urxvtc -e bash -i -c 'scrot -sh'"
m:0xc + c:13
Control+Alt+4
Completely untested.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
Scrot does not need a terminal - but the "-sh" option will not take a screen shot, it will simply display the help information. I suspect scrots help info is dumped to tty1, or .Xsession-errors, or to wherever your output from X is dumped.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
RE: Your code snippet above has the -h option, is that a typo?
Ahh now I see what you mean - yes the -h option was a typo it actually reads:
# Screenshot of a section of a screen (Cntrl+Alt+4)
"urxvtc -e bash -i -c 'scrot -s'"
m:0xc + c:13
Control+Alt+4
Here's a bit more info elaborating what I mentioned above:
- Doesn't trigger: scrot -s
- Does trigger: scrot
- Does trigger: scrot '%Y-%m-%d_$wx$h.png' -e 'mv $f ~/Desktop'
So there seems to be something going on with the "-s" option
[EDIT] Oops. Have read the post properly. Will try suggestion then properly respond....
Last edited by anthillsocial (2013-03-19 12:26:35)
Offline
Scrot does not need a terminal - but the "-sh" option will not take a screen shot, it will simply display the help information. I suspect scrots help info is dumped to tty1, or .Xsession-errors, or to wherever your output from X is dumped.
Just tested with urxvtc and that doesn't work either. It seems that scrot isn't being allowed to pause until mouse input is received.
Last edited by anthillsocial (2013-03-19 12:49:44)
Offline
Send the output somewhere useful.
"scrot -s > ~/scrot_error 2>&1"
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Send the output somewhere useful.
"scrot -s > ~/scrot_error 2>&1"
It outputs:
giblib error: couldn't grab keyboard:Resource temporarily unavailable
Offline
Try putting a sleep of a second or so before the call to scrot:
sleep 1
scrot -s
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
skanky - fantastic - that sorted it!
Thanks everyone.
Offline