Taking screenshot on just vanilla X11 system

scrot

scrot 1.png

error

Can’t open X display. It *is* running, yeah?

mine was

startx ./application — :0 vt8 &

So it was not coming

Then I started with simple

startx ./application
and scrot worked as a charm

I didn’t find a way to specify display and virtual terminal in scrot that is why it didn’t work out in the first try. I didn’t experiment a lot on this.

 

 

Another way is by using xwd command

 

xwd -root -display :0 > good_image.xwd

Then you need to convert xwd image to png or jpeg

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s