There lots of little ways to take a screenshot from the Openbox right-click menu. Mine all involve scrot, which is a fabulous little command-line-driven snapshot utility from the maker of feh. Like most command-line programs, it’s immensely flexible and lightning-fast, regardless of the machine you use.
The first suggestion for taking a screenshot from the command line is only a mixed blessing. There’s a mini-GUI program called gscreenshot that will do all the interactions with scrot for you, giving you options for snapping the whole screen or selecting one window or one area, and so forth.
It’s useful and it works well; the problem is that it’s pretty much unmaintained, and has no installation instructions aside from the PKGBUILD on its AUR page. The standing PKGBUILD will fail too, since it doesn’t have an
arch=() line and the installation steps use brackets, which are a no-no.
Regardless, if you insert your architecture and you change the first line of the build sequence to
mkdir -p $startdir/pkg/usr/bin $startdir/pkg/usr/share/gscreenshot
it will install perfectly and work fine. Ubuntu users can follow the steps and commands shown in the PKGBUILD, and it should (I won’t say “will”) install properly.
And to be honest, in spite of the messy installation, I like it — it gives you all the functions of scrot without having to reference all the
--help options, does only one thing, needs almost no dependencies, and so forth. You get to preview your image, save in different formats, etc.
So aside from the gnarled installation routine, it’s actually quite a nice little program.
Of course, if you’re willing to go without a GUI and you just want a one-liner for your right-click menu, insert this into your menu.xml file somewhere, or with ObMenu.
scrot -q 100 -d 1 screenshot-%F-%H%M%S.jpg
That’s what I use for my screenshots; it snaps a full-quality, full-screen image in JPG format, with the date and time imprinted in the file name. That command will drop it into your home directory, and from there you can upload it, resize, crop or what have you. If you have a special location where you like to put screenshots, prefix the filename with the path you want.
(The one-second delay with the -d flag is just because Openbox takes a split second to un-draw its frames, and otherwise the ghosts appear in the screenshot. 😉 )
Remember that with a one-line command like that, you can automate the process of snapping, uploading and so forth. You could even set up a cron job that takes a picture of your desktop at regular intervals and then uploads it to a web page. Ooh!
See, isn’t the command line amazing? 😀