Jump to content


Photo

Guide: Screenshots


  • Please log in to reply
37 replies to this topic

#16 paddy

paddy

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 762 posts
  • Gender:Male

Posted 15 June 2010 - 08:07 PM


/usr/sbin is where scripts live. From here they can be executed anywhere on your system.

Err, no. "sbin" stands for "system binaries", and the folder was originally intended to only be accessible by root (because all of the binaries there only concern the system admin, and normal users should therefore only have to see /usr/bin). So, the script *should* be copied to /usr/bin.


does this mean i should put the snapsnap script in usr/bin ?

#17 SomeGuy99

SomeGuy99

    :)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2186 posts
  • Gender:Male
  • Location::|
  • Interests::D
    :/

Posted 15 June 2010 - 08:17 PM


/usr/sbin is where scripts live. From here they can be executed anywhere on your system.

Err, no. "sbin" stands for "system binaries", and the folder was originally intended to only be accessible by root (because all of the binaries there only concern the system admin, and normal users should therefore only have to see /usr/bin). So, the script *should* be copied to /usr/bin.


Fair enough. I need knowledgable people to tell me this stuff!

I'll edit all my guides accordingly. :)

EDIT: I got it a little mixed up.

I was thinking of /usr/local/sbin, which is the location for installing scripts. Easy to confuse no?

does this mean i should put the snapsnap script in usr/bin ?


It works from both, but to please Linux gurus then... yeah B)

I don't think anything will bad will happen if you leave it in /usr/sbin.

Edited by SomeGuy99, 15 June 2010 - 08:26 PM.


#18 dflemstr

dflemstr

    It's a ball.

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2249 posts
  • Gender:Male
  • Location:Stockholm, Sweden

Posted 15 June 2010 - 08:30 PM

I was thinking of /usr/local/sbin, which is the location for installing scripts. Easy to confuse no?

That is the location for user-common locally-generated system-binaries (See, folder names in Linux *do* make sense once you learn the scheme ;)), so no, still not a place for scripts. Scripts are like any other executable; they aren't treated differently from ELF binaries.

#19 SomeGuy99

SomeGuy99

    :)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2186 posts
  • Gender:Male
  • Location::|
  • Interests::D
    :/

Posted 15 June 2010 - 08:49 PM


I was thinking of /usr/local/sbin, which is the location for installing scripts. Easy to confuse no?

That is the location for user-common locally-generated system-binaries (See, folder names in Linux *do* make sense once you learn the scheme ;) ), so no, still not a place for scripts. Scripts are like any other executable; they aren't treated differently from ELF binaries.


Oh well. I thought dumping a script into /usr/bin was bad form. Thanks for correcting me :)

I edited all my guides anyway.

Edited by SomeGuy99, 15 June 2010 - 08:51 PM.


#20 GuSec

GuSec

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 115 posts
  • Gender:Male
  • Location:Northern Sweden
  • Interests:Philosophy, debates, electronics, ethnobotany, good films and music ;)

Posted 15 June 2010 - 11:37 PM

Random paths aren't strange at all. The SD CARDS contain the filesystems the Pandora mounts in a path in it's root tree ("/"), commonly in a folder for such mounts ("/media/"). The SD SLOTS on the other hand, are merely the physical tools the device make use of to be able to read and write to the filesystems. Again, located inside every individual card (one card can even have several filesystems, via partitioning!).

Therefore, it's quite easy to understand why each individual card will get a new path. When the same card is inserted again, it isn't automatically remembered and assigned the same path, it's incremented to ensure two filesystems doesn't collide. It would be strange however, to assign the same path to all cards read and written through the same slot, wouldn't it?

Edited by GuSec, 15 June 2010 - 11:38 PM.


#21 SomeGuy99

SomeGuy99

    :)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2186 posts
  • Gender:Male
  • Location::|
  • Interests::D
    :/

Posted 15 June 2010 - 11:52 PM

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.

#22 MasterLinux

MasterLinux

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 17 June 2010 - 08:35 PM

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:
#!/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?

#23 Pleng

Pleng

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2944 posts

Posted 17 June 2010 - 09:00 PM

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?

#24 SomeGuy99

SomeGuy99

    :)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2186 posts
  • Gender:Male
  • Location::|
  • Interests::D
    :/

Posted 17 June 2010 - 10:55 PM

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.

#25 daniel3000

daniel3000

    GP32 User

  • Members
  • PipPipPip
  • 38 posts

Posted 17 July 2010 - 06:38 PM

Hi all,

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

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:

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

Edited by daniel3000, 17 July 2010 - 06:39 PM.


#26 todd

todd

    GP32 Hardcore

  • Members
  • PipPipPipPip
  • 183 posts

Posted 18 July 2010 - 03:49 PM

Now one final thing


Posted Image

#27 SomeGuy99

SomeGuy99

    :)

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2186 posts
  • Gender:Male
  • Location::|
  • Interests::D
    :/

Posted 18 July 2010 - 04:09 PM

B)

#28 Vitel

Vitel

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 360 posts
  • Gender:Male

Posted 18 July 2010 - 04:34 PM

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.

#29 urjaman

urjaman

    "I Know. We're going for a ride."

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 680 posts
  • Gender:Male
  • Location:Finland

Posted 18 July 2010 - 09:14 PM

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 :
Posted Image

#30 Chaser

Chaser

    GP Mania

  • GP32 Hardcore
  • PipPipPipPipPip
  • 408 posts
  • Gender:Male
  • Location:Manchester
  • Interests:Retro consoles

Posted 01 September 2010 - 07:57 PM

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:

#!/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.