Saturday, February 20, 2010

xwd

Hi All,

Ever thought of giving a complete command oriented work - on a presentation with lots of snapshots???

Ha???

But U just want the command line outputs and nothing more??? I mean to say - the regular printscreen would grab the whole desktop? Or it would cover the active desktop - but the snap would not be clear to look at...

Faced these??? Ha??

So finally you thought - oh ok fine.. Let me write down the outputs???

No need!!! Here is the 'xwd' tool....

xwd tool was designed just for this purpose - and as the name says it is the - dump of a 'X' window..

http://www.xfree86.org/current/xwd.1.html

You can get a whole lot of information in this above link / site.

But for the problem I presented - here is the solution :

Issue this command - and the output is saved in the 'pwd' [present working directory]

xwd | convert - 1.png

The moment you issue above command - you would notice a plus mark or a Christ Cross mark on the screen - above / on your konsole..

Now move your mouse pointer - to the place you want to grab the snap.

For taking a great clear picture of the gnome-terminal or for what work - you folks are doing..

Click the mouse on the terminal - and it would grab your terminal full clear and clean!!!

So let me explain the command in detail

1. xwd - is the tool we are using ...
2. Next we are grep-in the output of xwd ...
3. By converting - using 'convert' tool ...
4. Into the file 1.png

Note: Most Linux systems have convert tool installed by default. But if your system does not have one - do install it using your package managers. :)

Don't forget to 'man' to know more options of xwd... :)

Cheers :)
Ananth Gouri

No comments:

Post a Comment