Guide: Screenshots


Joined
May 17, 2010
Messages
2,198
Location
:|
GuSec said:
It would be strange however, to assign the same path to all cards read and written through the same slot, wouldn't it?

Well that's what it does currently. Ed wants to change it by default to the name of the card.
 
Last edited by a moderator:

MasterLinux

Still Fresh
Joined
Jun 17, 2010
Messages
1
That's what i need :) Thank you. I have modify the script a little bit. So it takes all 25 seconds a screenshot. So i can take screenshots from the inside of any emulator or other programm. It's not a perfect solution, but it works fine ;)

Here is it:
Code:
#!/bin/bash
i=1
while [ $i -le 25 ]
do
sleep 25
fbgrab ~/screen`date +%y%m%d-%H%M%S`.png
notify-send screen $i
i=`expr $i + 1`
done

Is there any application that will control the led?
 

Pleng

Very Active Member
Joined
Dec 28, 2006
Messages
3,030
I really don't understand what's wrong with using SD1 and SD2 as sensible mount points for the SD cards. I mean, from an end user's perspective, that's surely the easiest to understand?
 
Joined
May 17, 2010
Messages
2,198
Location
:|
Pleng said:
I really don't understand what's wrong with using SD1 and SD2 as sensible mount points for the SD cards. I mean, from an end user's perspective, that's surely the easiest to understand?

Wasn't designed by end users was it?

Coders often forget the human aspect of the stuff they make. It's pretty easy to do when your mind is wrapped up in abstracts, algorithms and data structures.

The delayed script looks pretty cool too. Why not have both scripts and map them to different keys? You gotta love Linux.

Want me to add it to the end of my guide? That may be a good idea in general: 'user gallery of scripts'. I need some Tony Hart music.
 
Last edited by a moderator:

daniel3000

Still Fresh
Joined
Mar 20, 2009
Messages
89
Hi all,

even in times of changing mountpoints we can set an SD card as the target for the screenshots with something like (untested!):

Code:
MOUNTPOINT = `mount | grep /dev/mmcblk0p1 | cut -d ' ' -f 3`
(this gives the mountpoint path of the first SD card's first partition)


And we can also let the script create the directory if it doesn't exist:

Code:
mkdir -p "$MOUNTPOINT"/Screenshots

Maybe we should add some error handling, in case the card is not inserted at all (with fallback to NAND maybe) etc.


Linux is flexible enough!

BTW: Great idea to assign a hotkey to a screenshot script!


Daniel
 

todd

Member
Joined
Sep 5, 2008
Messages
187
SomeGuy99 said:
Now one final thing

screen100718-084210.png
 
Last edited by a moderator:

Vitel

Active Member
Joined
May 16, 2009
Messages
561
Website
vminko.org
BTW it's quite hard to draw in xournal (at least for me). Drawing in ts_test is much easier. So I'm looking for another sketching tool.
 

urjaman

"I Know. We're going for a ride."
Joined
Jan 6, 2009
Messages
1,111
Age
30
Location
Finland
Website
urjaman.dy.fi
Vitel said:
BTW it's quite hard to draw in xournal (at least for me). Drawing in ts_test is much easier. So I'm looking for another sketching tool.
Thanks for reminding me of Xournal, though I might have gotten a bit too carried away :p :
 
Last edited by a moderator:

Chaser

Member
Joined
Jun 13, 2006
Messages
408
Location
Manchester
MasterLinux said:
That's what i need :) Thank you. I have modify the script a little bit. So it takes all 25 seconds a screenshot. So i can take screenshots from the inside of any emulator or other programm. It's not a perfect solution, but it works fine ;)

Here is it:
Code:
#!/bin/bash
i=1
while [ $i -le 25 ]
do
sleep 25
fbgrab ~/screen`date +%y%m%d-%H%M%S`.png
notify-send screen $i
i=`expr $i + 1`
done

Is there any application that will control the led?

I've bin having a bash at this script but with no joy joy. Anyone else managed to get this working?
All I get from the terminal when attempting to run it via "./ name.sh" is the message "Bash: /bin/bash^M:Bad Interpreter :no such file or directory" or thereabouts, as I cant wrestle my kid off Charlie Blast's Territory to re-check it, as I just lost my prior post. :)

Would be a handy script to hotkey.
 
Last edited by a moderator:

sebt3

homebrew player (P. & C.)
Joined
Sep 9, 2008
Messages
4,819
Age
40
Location
France
Website
sebt3.openpandora.org
Chaser said:
is the message "Bash: /bin/bash^M:Bad Interpreter :no such file or directory"
Editing the script on Windows I guess :p
try a dos2unix on your script (not sure if that is avail on the pandora)
Else edit it directly on your P. :p
 
Last edited by a moderator:

urjaman

"I Know. We're going for a ride."
Joined
Jan 6, 2009
Messages
1,111
Age
30
Location
Finland
Website
urjaman.dy.fi
sebt3 said:
Chaser said:
is the message "Bash: /bin/bash^M:Bad Interpreter :no such file or directory"
Editing the script on Windows I guess :p
try a dos2unix on your script (not sure if that is avail on the pandora)
Else edit it directly on your P. :p
:huh: I guess I'm too linux'd. I couldnt even guess that it might be with windows line endings, even though it is obvious now. (I actually just skimmed "no such file or directory"...)
 
Last edited by a moderator:

Chaser

Member
Joined
Jun 13, 2006
Messages
408
Location
Manchester
Cheers for the help . I had copied the script on my laptop then over to the panda, as I cant seem to highlight sometimes and forgot to redo it afresh. All sorted now and writing to sd directories, very useful ty all :)
 

daniel3000

Still Fresh
Joined
Mar 20, 2009
Messages
89
Chaser said:
I've bin having a bash at this script but with no joy joy. Anyone else managed to get this working?
All I get from the terminal when attempting to run it via "./ name.sh" is the message "Bash: /bin/bash^M:Bad Interpreter :no such file or directory" or thereabouts, as I cant wrestle my kid off Charlie Blast's Territory to re-check it, as I just lost my prior post. :)

Would be a handy script to hotkey.

The ^M indicates that you seem to have saved the script with a Windows editor or something like that, because the line endings are not Linux compliant (CR/LF instead of LF only).
Try to convert the file somehow. Maybe load it into a Linux editor which is capable to recognize CR/LF correctly and save it again. I am not sure if e.g. nano does that correctly.

Or use a Windows editor such as Notepad++ which can be configured to save with LF line endings.

Daniel
 
Last edited by a moderator:

valhalla

Member
Joined
Jul 17, 2008
Messages
305
SomeGuy99 said:
Oh well. I thought dumping a script into /usr/bin was bad form. Thanks for correcting me :)

I edited all my guides anyway.

Actually, it is bad form to dump anything in /usr/bin, since it is supposed to contain executables (and scripts) installed by the package manager; the best place for such a script would be either /usr/local/bin (/usr/local is for anything installed from sources or otherwise not using package managers) or somewhere in home, e.g. ~/bin
 
Last edited by a moderator:

Mycohl

Still Fresh
Joined
Oct 3, 2009
Messages
19
I hope you don't mind SomeGuy99, but I have included your snapsnap script in the default scripts for my pndhotkey utility, which I posted here.

I think that it will work inside a full-screen game/emulator even under minimenu with this system, but any feedback to the contrary would be appreciated.
 
Top