Taking screenshot in firefox.

Couple of days back, I was trying to take screenshot with Firefox. As usual I started out with searching for plugins which could take a screen shot for the whole page and not just the visible portion of the page. Installed couple of them, some did not work. Finally I found something called Development Bar.

So, here is a simple way to take a screenshot. Press “Shift+F12”. This will bring up a bar in the bottom of the firefox window. To take a screenshot, type:

screenshot --fullpage

You can also provide the filename for the screenshot as an argument and find more help about development tool at

Image representing Firefox as depicted in Crun...
Image via CrunchBase


Enhanced by Zemanta

Take a screenshot of the window the user clicks on and name the file the same as the window title

Take a screenshot of the window the user clicks on and name the file the same as the window title

 sleep 4; xwd >foo.xwd; mv foo.xwd "$(dd skip=100 if=foo.xwd bs=1 count=256 2>/dev/null | egrep -ao '^[[:print:]]+' | tr / :).xwd"

In general, this is actually not better than the “scrot -d4” command I’m listing it as an alternative to, so please don’t vote it down for that. I’m adding this command because xwd (X window dumper) comes with X11, so it is already installed on your machine, whereas scrot probably is not. I’ve found xwd handy on boxen that I don’t want to (or am not allowed to) install packages on.

NOTE: The dd junk for renaming the file is completely optional. I just did that for fun and because it’s interesting that xwd embeds the window title in its metadata. I probably should have just parsed the output from file(1) instead of cutting it out with dd(1), but this was more fun and less error prone.

NOTE2: Many programs don’t know what to do with an xwd format image file. You can convert it to something normal using NetPBM‘s xwdtopnm(1) or ImageMagick‘s convert(1). For example, this would work: “xwd | convert fd:0 foo.jpg”. Of course, if you have ImageMagick already installed, you’d probably use import(1) instead of xwd.

NOTE3: Xwd files can be viewed using the X Window UnDumper: “xwud

NOTE4: The sleep is not strictly necessary, I put it in there so that one has time to raise the window above any others before clicking on it.

* View this command to comment, vote or add to favourites * View all commands by hackerb9


by David Winterbottom (codeinthehole.com)

URL: http://feedproxy.google.com/~r/Command-line-fu/~3/RK7WEj8ydPg/take-a-screenshot-of-the-window-the-user-clicks-on-and-name-the-file-the-same-as-the-window-title

Enhanced by Zemanta

bash – change theme for gtk in gnome and take screenshot from script.

I wrote a blog on bash script to change the icon/cursor theme using a bash script. Lets extend the same concept a little more and use the script to change the gtk theme for gnome and at the same time take a screenshot also.

[[ \”$1\” == \”\” ]] && time=5 || time=$1
[[ \”$2\” == \”\” ]] && (
cd ~/.themes
echo \”Select one of the icon themes\”
echo \”When you like some theme just press Ctrl+c\”
for i in *
[[ -d $i/cursors ]] || (
echo \”Now trying …. : $i\”
gconftool-2 –type string -s  /desktop/gnome/interface/gtk_theme \”$i\”
sleep 1
j=$(echo \”$path/$i\”).jpg
import -window root -quality 95 \”$j\”
sleep $time
) || gconftool-2 –type string -s  /desktop/gnome/interface/gtk_theme \”$2\”

This use\’s the import command to take the screenshot. Hope you like it. You can specify the path for the screenshots in the path variable at the begining of the script.